]> git.karo-electronics.de Git - linux-beck.git/commit
PCI: add struct pci_host_bridge_window with CPU/bus address offset
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 24 Feb 2012 03:19:00 +0000 (20:19 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 24 Feb 2012 03:19:00 +0000 (20:19 -0700)
commit0efd5aab41e18a1175f72641696cfda154ba6c87
tree2480b5ade8937d18104c5ecc1423ca1eac1b154e
parent5a21d70dbd33d20713fb735ad9381711b0ae2c9b
PCI: add struct pci_host_bridge_window with CPU/bus address offset

Some PCI host bridges apply an address offset, so bus addresses on PCI are
different from CPU addresses.  This patch adds a way for architectures to
tell the PCI core about this offset.  For example:

    LIST_HEAD(resources);
    pci_add_resource_offset(&resources, host->io_space, host->io_offset);
    pci_add_resource_offset(&resources, host->mem_space, host->mem_offset);
    pci_scan_root_bus(parent, bus, ops, sysdata, &resources);

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/bus.c
drivers/pci/probe.c
include/linux/pci.h