Lines Matching defs:res
23 struct resource *res, local_res;
25 res = pnp_get_resource(dev, IORESOURCE_IO, idx);
26 if (res) {
28 "flags %#lx\n", idx, (unsigned long long) res->start,
29 (unsigned long long) res->end, res->flags);
33 res = &local_res;
34 res->flags = rule->flags | IORESOURCE_AUTO;
35 res->start = 0;
36 res->end = 0;
39 res->flags |= IORESOURCE_DISABLED;
44 res->start = rule->min;
45 res->end = res->start + rule->size - 1;
47 while (!pnp_check_port(dev, res)) {
48 res->start += rule->align;
49 res->end = res->start + rule->size - 1;
50 if (res->start > rule->max || !rule->align) {
60 pnp_add_io_resource(dev, res->start, res->end, res->flags);
66 struct resource *res, local_res;
68 res = pnp_get_resource(dev, IORESOURCE_MEM, idx);
69 if (res) {
71 "flags %#lx\n", idx, (unsigned long long) res->start,
72 (unsigned long long) res->end, res->flags);
76 res = &local_res;
77 res->flags = rule->flags | IORESOURCE_AUTO;
78 res->start = 0;
79 res->end = 0;
82 res->flags |= IORESOURCE_READONLY;
84 res->flags |= IORESOURCE_CACHEABLE;
86 res->flags |= IORESOURCE_RANGELENGTH;
88 res->flags |= IORESOURCE_SHADOWABLE;
91 res->flags |= IORESOURCE_DISABLED;
96 res->start = rule->min;
97 res->end = res->start + rule->size - 1;
99 while (!pnp_check_mem(dev, res)) {
100 res->start += rule->align;
101 res->end = res->start + rule->size - 1;
102 if (res->start > rule->max || !rule->align) {
112 pnp_add_mem_resource(dev, res->start, res->end, res->flags);
118 struct resource *res, local_res;
126 res = pnp_get_resource(dev, IORESOURCE_IRQ, idx);
127 if (res) {
129 idx, (int) res->start, res->flags);
133 res = &local_res;
134 res->flags = rule->flags | IORESOURCE_AUTO;
135 res->start = -1;
136 res->end = -1;
139 res->flags |= IORESOURCE_DISABLED;
145 res->start = find_next_bit(rule->map.bits, PNP_IRQ_NR, 16);
146 if (res->start < PNP_IRQ_NR) {
147 res->end = res->start;
152 res->start = res->end = xtab[i];
153 if (pnp_check_irq(dev, res))
159 res->start = -1;
160 res->end = -1;
161 res->flags |= IORESOURCE_DISABLED;
170 pnp_add_irq_resource(dev, res->start, res->flags);
176 struct resource *res, local_res;
184 res = pnp_get_resource(dev, IORESOURCE_DMA, idx);
185 if (res) {
187 idx, (int) res->start, res->flags);
191 res = &local_res;
192 res->flags = rule->flags | IORESOURCE_AUTO;
193 res->start = -1;
194 res->end = -1;
198 res->start = res->end = xtab[i];
199 if (pnp_check_dma(dev, res))
204 res->start = res->end = MAX_DMA_CHANNELS;
206 res->flags |= IORESOURCE_DISABLED;
210 pnp_add_dma_resource(dev, res->start, res->flags);
224 if (pnp_res->res.flags & IORESOURCE_AUTO)