kernel-ark/drivers/of
Liviu Dudau 41f8bba7f5 of/pci: Add pci_register_io_range() and pci_pio_to_address()
Some architectures do not have a simple view of the PCI I/O space and
instead use a range of CPU addresses that map to bus addresses.  For some
architectures these ranges will be expressed by OF bindings in a device
tree file.

This patch introduces a pci_register_io_range() helper function with a
generic implementation that can be used by such architectures to keep track
of the I/O ranges described by the PCI bindings.  If the PCI_IOBASE macro
is not defined, that signals lack of support for PCI and we return an
error.

In order to retrieve the CPU address associated with an I/O port, a new
helper function pci_pio_to_address() is introduced.  This will search in
the list of ranges registered with pci_register_io_range() and return the
CPU address that corresponds to the given port.

[arnd: add dummy !CONFIG_OF pci_pio_to_address() to fix build errors]
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
CC: Grant Likely <grant.likely@linaro.org>
2014-09-30 09:42:45 -06:00
..
testcase-data Merge branch 'devicetree/next-overlay' into devicetree/next 2014-08-11 14:06:23 +01:00
address.c of/pci: Add pci_register_io_range() and pci_pio_to_address() 2014-09-30 09:42:45 -06:00
base.c Merge branch 'devicetree/next-overlay' into devicetree/next 2014-08-11 14:06:23 +01:00
device.c of: rename of_aliases_mutex to just of_mutex 2014-07-07 13:42:52 +01:00
dynamic.c of: typo fix in __of_prop_dup() 2014-07-30 18:00:14 -06:00
fdt_address.c of/fdt: add FDT address translation support 2014-05-20 15:19:25 -05:00
fdt.c of: Allow mem_reserve of memory with a base address of zero 2014-08-16 09:02:52 +01:00
irq.c of/irq: Fix lookup to use 'interrupts-extended' property first 2014-08-16 09:03:58 +01:00
Kconfig of: Fixing OF Selftest build error 2014-08-03 12:21:28 -06:00
Makefile Merge branch 'devicetree/next-overlay' into devicetree/next 2014-08-11 14:06:23 +01:00
of_mdio.c net: fix circular dependency in of_mdio code 2014-07-02 00:24:14 -07:00
of_mtd.c of_mtd: Add helpers to get ECC strength and ECC step size 2014-03-10 22:42:28 -07:00
of_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-04-02 20:53:45 -07:00
of_pci_irq.c of_pci_irq: kill useless variable in of_irq_parse_pci() 2014-05-27 12:13:34 +01:00
of_pci.c of: implement pci_address_to_pio as weak function 2013-10-09 20:04:06 -05:00
of_private.h of: Transactional DT support. 2014-07-23 17:29:15 -06:00
of_reserved_mem.c drivers: of: add automated assignment of reserved regions to client devices 2014-08-01 12:22:21 -06:00
pdt.c of: device_node kobject lifecycle fixes 2014-03-19 14:58:40 +00:00
platform.c of/platform: Fix of_platform_device_destroy iteration of devices 2014-07-07 13:33:46 +01:00
selftest.c Enabling OF selftest to run without machine's devicetree 2014-08-16 09:03:56 +01:00