• Russell King's avatar
    [PCI] pci-8: pci_resource_to_bus() · 2ef9c88b
    Russell King authored
    Convert pcibios_fixup_pbus_ranges() into something more generic, namely
    pcibios_resource_to_bus() - we are really trying to convert resources
    to something to program into bus registers for bridge windows, and in
    fact, PCI device BARs.
    
    This is necessary since some architectures, namely Alpha, ARM and PARISC
    have an offset between PCI addressing and host-based addressing, so
    resources need to be adjusted when read or when written back to the bus.
    
    We provide a generic version in asm-generic/pci.h, which most
    architectures use.
    
    This patch finds the following architectures with something to think
    consider:
    
            - ppc, ppc64
                    adjusts resources for devices, but not buses.
    		This is inconsistent, and leads to improperly
    		programmed windows/BARs.
    
    PPC people (Anton) has a replacement PCI resource implementation
    which should do the right thing.
    2ef9c88b
pci.c 12.4 KB