diff options
| author | Russell King <rmk@flint.arm.linux.org.uk> | 2003-03-16 21:56:53 +0000 |
|---|---|---|
| committer | Russell King <rmk@flint.arm.linux.org.uk> | 2003-03-16 21:56:53 +0000 |
| commit | 2ef9c88bfaee6fbd7f9d5da32f9b93794be49185 (patch) | |
| tree | c09ef1129d46914b80fbbdc6e49703ad3e13b5ab /include/linux/pci.h | |
| parent | 032d6c6ef2b24013633f987cdf2d8fb88eadc202 (diff) | |
[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.
Diffstat (limited to 'include/linux/pci.h')
| -rw-r--r-- | include/linux/pci.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 0bc50220c102..b01ae2e4df9c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -485,11 +485,9 @@ struct pci_ops { int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); }; -struct pbus_set_ranges_data -{ - unsigned long io_start, io_end; - unsigned long mem_start, mem_end; - unsigned long prefetch_start, prefetch_end; +struct pci_bus_region { + unsigned long start; + unsigned long end; }; struct pci_driver { @@ -533,7 +531,6 @@ void pcibios_align_resource(void *, struct resource *, unsigned long, unsigned long); void pcibios_update_resource(struct pci_dev *, struct resource *, int); void pcibios_update_irq(struct pci_dev *, int irq); -void pcibios_fixup_pbus_ranges(struct pci_bus *, struct pbus_set_ranges_data *); /* Generic PCI functions used internally */ |
