Lines Matching defs:range

167  * of_pci_parse_bus_range() - parse the bus-range property of a PCI device
169 * @res: address to a struct resource to return the bus-range
178 error = of_property_read_u32_array(node, "bus-range", bus_range,
198 * Returns the associated domain number from DT in the range [0-0xffff], or
245 * @resources: list where the range of resources will be added after DT parsing
246 * @ib_resources: list where the range of inbound resources (with addresses
249 * address for the start of the I/O range. Can be NULL if the caller doesn't
256 * It returns zero if the range parsing has been successful or a standard error
268 struct of_pci_range range;
287 dev_info(dev, " No bus range found for %pOF, using %pR\n",
301 for_each_of_pci_range(&parser, &range) {
303 if ((range.flags & IORESOURCE_TYPE_BITS) == IORESOURCE_IO)
305 else if ((range.flags & IORESOURCE_TYPE_BITS) == IORESOURCE_MEM)
310 range_type, range.cpu_addr,
311 range.cpu_addr + range.size - 1, range.pci_addr);
315 * then skip this range
317 if (range.cpu_addr == OF_BAD_ADDR || range.size == 0)
320 err = of_pci_range_to_resource(&range, dev_node, &tmp_res);
332 dev_err(dev, "I/O range found for %pOF. Please provide an io_base pointer to save CPU base address\n",
338 dev_warn(dev, "More than one I/O resource converted for %pOF. CPU base address for old range lost!\n",
340 *io_base = range.cpu_addr;
343 pci_add_resource_offset(resources, res, res->start - range.pci_addr);
354 for_each_of_pci_range(&parser, &range) {
358 * then skip this range
360 if (((range.flags & IORESOURCE_TYPE_BITS) != IORESOURCE_MEM) ||
361 range.cpu_addr == OF_BAD_ADDR || range.size == 0)
365 "IB MEM", range.cpu_addr,
366 range.cpu_addr + range.size - 1, range.pci_addr);
369 err = of_pci_range_to_resource(&range, dev_node, &tmp_res);
385 res->start - range.pci_addr);