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
..
2014-05-06 17:54:53 -04:00
2014-08-07 17:17:39 -07:00
2014-08-14 09:15:53 -06:00
2014-08-13 18:13:19 -06:00
2014-08-01 22:35:55 +08:00
2014-08-05 15:59:35 -07:00
2014-07-08 13:36:52 -07:00
2014-06-26 15:46:55 -03:00
2014-06-04 13:34:30 +09:00
2014-04-01 23:19:14 -04:00
2014-03-10 11:44:42 -04:00
2014-08-07 14:40:08 -04:00
2014-04-18 14:20:48 +02:00
2014-08-06 18:01:24 -07:00
2014-05-20 10:30:40 +09:00
2014-08-06 18:01:19 -07:00
2014-08-19 10:19:39 -05:00
2014-06-06 16:08:13 -07:00
2014-06-02 16:05:24 -07:00
2014-06-02 14:56:01 -07:00
2014-07-08 09:40:06 +02:00
2014-04-17 12:30:40 -07:00
2014-06-16 16:26:54 +02:00
2014-03-13 12:11:00 +10:30
2014-07-22 21:55:45 +01:00
2014-07-03 12:02:14 -07:00
2014-05-27 17:38:11 -07:00
2014-07-17 22:07:37 +02:00
2014-03-04 13:51:06 -05:00
2014-04-01 23:19:10 -04:00
2014-04-07 10:59:19 -07:00
2014-06-10 14:35:22 -07:00
2014-08-04 17:32:24 -07:00
2014-07-09 14:58:37 +01:00
2014-06-04 16:54:07 -07:00
2014-06-04 16:54:21 -07:00
2014-07-15 22:40:22 +02:00
2014-03-19 22:24:08 -04:00
2014-06-04 16:54:12 -07:00
2014-08-08 15:57:26 -07:00
2014-08-08 15:57:31 -07:00
2014-08-06 13:03:44 +02:00
2014-06-12 00:21:11 -04:00
2014-08-08 15:57:17 -07:00
2014-06-04 16:53:57 -07:00
2014-08-08 15:57:24 -07:00
2014-06-04 16:53:56 -07:00
2014-05-14 09:46:32 -07:00
2014-08-08 15:57:22 -07:00
2014-06-04 16:53:57 -07:00
2014-04-07 16:35:53 -07:00
2014-06-04 16:53:57 -07:00