]> git.baikalelectronics.ru Git - kernel.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)
commit64860e0ee70560003e3939b0ccce59f79ffaf3ae
tree2480b5ade8937d18104c5ecc1423ca1eac1b154e
parent635f080adb78bf6258a89ef5db544451ef8ab37b
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