Lines Matching defs:res
2 * drivers/pci/setup-res.c
35 struct resource *res = dev->resource + resno;
41 if (!res->flags)
49 if (res->flags & IORESOURCE_PCI_FIXED)
52 pcibios_resource_to_bus(dev, ®ion, res);
54 new = region.start | (res->flags & PCI_REGION_FLAG_MASK);
55 if (res->flags & IORESOURCE_IO)
64 if (!(res->flags & IORESOURCE_ROM_ENABLE))
87 res->flags &= ~IORESOURCE_UNSET;
89 resno, res, (unsigned long long)region.start,
95 struct resource *res = &dev->resource[resource];
98 root = pci_find_parent_resource(dev, res);
101 res);
105 conflict = request_resource_conflict(root, res);
109 res, conflict->name, conflict);
135 struct resource *res = dev->resource + resno;
139 size = resource_size(res);
140 min = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;
141 align = pci_resource_alignment(dev, res);
144 ret = pci_bus_alloc_resource(bus, res, size, align, min,
148 if (ret < 0 && (res->flags & IORESOURCE_PREFETCH)) {
155 ret = pci_bus_alloc_resource(bus, res, size, align, min, 0,
169 if (res->flags & IORESOURCE_IO)
174 start = res->start;
175 end = res->end;
176 res->start = dev->fw_addr[resno];
177 res->end = res->start + size - 1;
179 resno, res);
180 conflict = request_resource_conflict(root, res);
184 res, conflict->name, conflict);
185 res->start = start;
186 res->end = end;
192 res->flags &= ~IORESOURCE_STARTALIGN;
193 dev_info(&dev->dev, "BAR %d: assigned %pR\n", resno, res);
203 struct resource *res = dev->resource + resno;
209 align = pci_resource_alignment(dev, res);
212 "(bogus alignment)\n", resno, res);
228 if (res->flags & IORESOURCE_MEM)
229 if (res->flags & IORESOURCE_PREFETCH)
233 else if (res->flags & IORESOURCE_IO)
239 resno, type, (unsigned long long) resource_size(res));
274 align = pci_resource_alignment(ln->dev, ln->res);
282 tmp->res = r;