aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_subr.c
diff options
context:
space:
mode:
authorLiviu Dudau <[email protected]>2014-09-29 15:29:21 +0100
committerBjorn Helgaas <[email protected]>2014-09-30 09:42:45 -0600
commit41f8bba7f5552d033583777dede2df7c36e7853d (patch)
tree5ee6fe856a1cee69e751393fd4068c1a6b5e25e1 /net/lapb/lapb_subr.c
parent112eeaa7f87bbd2925e919486bb504f8954fa675 (diff)
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 <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Acked-by: Rob Herring <[email protected]> CC: Grant Likely <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions