Lines Matching defs:range
181 * of_pci_parse_bus_range() - parse the bus-range property of a PCI device
183 * @res: address to a struct resource to return the bus-range
192 error = of_property_read_u32_array(node, "bus-range", bus_range,
220 * Returns the associated domain number from DT in the range [0-0xffff], or
267 * @resources: list where the range of resources will be added after DT parsing
268 * @ib_resources: list where the range of inbound resources (with addresses
271 * address for the start of the I/O range. Can be NULL if the caller doesn't
278 * It returns zero if the range parsing has been successful or a standard error
290 struct of_pci_range range;
309 dev_info(dev, " No bus range found for %pOF, using %pR\n",
323 for_each_of_pci_range(&parser, &range) {
325 if ((range.flags & IORESOURCE_TYPE_BITS) == IORESOURCE_IO)
327 else if ((range.flags & IORESOURCE_TYPE_BITS) == IORESOURCE_MEM)
332 range_type, range.cpu_addr,
333 range.cpu_addr + range.size - 1, range.pci_addr);
337 * then skip this range
339 if (range.cpu_addr == OF_BAD_ADDR || range.size == 0)
342 err = of_pci_range_to_resource(&range, dev_node, &tmp_res);
354 dev_err(dev, "I/O range found for %pOF. Please provide an io_base pointer to save CPU base address\n",
360 dev_warn(dev, "More than one I/O resource converted for %pOF. CPU base address for old range lost!\n",
362 *io_base = range.cpu_addr;
367 pci_add_resource_offset(resources, res, res->start - range.pci_addr);
378 for_each_of_pci_range(&parser, &range) {
381 * then skip this range
383 if (((range.flags & IORESOURCE_TYPE_BITS) != IORESOURCE_MEM) ||
384 range.cpu_addr == OF_BAD_ADDR || range.size == 0)
388 "IB MEM", range.cpu_addr,
389 range.cpu_addr + range.size - 1, range.pci_addr);
392 err = of_pci_range_to_resource(&range, dev_node, &tmp_res);
403 res->start - range.pci_addr);