]> git.neil.brown.name Git - history.git/commit
[PCI] pci-8: pci_resource_to_bus()
authorRussell King <rmk@flint.arm.linux.org.uk>
Sun, 16 Mar 2003 21:56:53 +0000 (21:56 +0000)
committerRussell King <rmk@flint.arm.linux.org.uk>
Sun, 16 Mar 2003 21:56:53 +0000 (21:56 +0000)
commit2ef9c88bfaee6fbd7f9d5da32f9b93794be49185
treec09ef1129d46914b80fbbdc6e49703ad3e13b5ab
parent032d6c6ef2b24013633f987cdf2d8fb88eadc202
[PCI] pci-8: pci_resource_to_bus()

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.
30 files changed:
arch/alpha/kernel/pci.c
arch/arm/kernel/bios32.c
arch/i386/pci/common.c
arch/ia64/pci/pci.c
arch/mips/ddb5074/pci.c
arch/mips/ddb5476/pci.c
arch/mips64/sgi-ip27/ip27-pci.c
arch/mips64/sgi-ip32/ip32-pci.c
arch/parisc/kernel/pci.c
arch/ppc/kernel/pci.c
arch/ppc64/kernel/pci.c
arch/sh/kernel/pci-dc.c
arch/sh/kernel/pci-sh7751.c
arch/sh/kernel/pci_st40.c
arch/sh/kernel/pcibios.c
drivers/pci/setup-bus.c
include/asm-alpha/pci.h
include/asm-arm/pci.h
include/asm-generic/pci.h [new file with mode: 0644]
include/asm-i386/pci.h
include/asm-ia64/pci.h
include/asm-mips/pci.h
include/asm-mips64/pci.h
include/asm-parisc/pci.h
include/asm-ppc/pci.h
include/asm-ppc64/pci.h
include/asm-sh/pci.h
include/asm-sparc64/pci.h
include/asm-x86_64/pci.h
include/linux/pci.h