aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci_64.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-12-13 02:01:21 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 22:53:55 -0500
commitcc5d0189b9ba95260857a5018a1c2fef90008507 (patch)
tree1202c94b6b3cb81a96d0a0e54424cad10eef68bb /arch/powerpc/kernel/pci_64.c
parent9cf84d7c97992dbe5360b241327341c07ce30fc9 (diff)
[PATCH] powerpc: Remove device_node addrs/n_addr
The pre-parsed addrs/n_addrs fields in struct device_node are finally gone. Remove the dodgy heuristics that did that parsing at boot and remove the fields themselves since we now have a good replacement with the new OF parsing code. This patch also fixes a bunch of drivers to use the new code instead, so that at least pmac32, pseries, iseries and g5 defconfigs build. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
-rw-r--r--arch/powerpc/kernel/pci_64.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 4eb93fc1eef2..523f35087e81 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -896,6 +896,25 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
896 unsigned long phb_io_base_phys, 896 unsigned long phb_io_base_phys,
897 void __iomem * phb_io_base_virt) 897 void __iomem * phb_io_base_virt)
898{ 898{
899 /* Remove these asap */
900
901 struct pci_address {
902 u32 a_hi;
903 u32 a_mid;
904 u32 a_lo;
905 };
906
907 struct isa_address {
908 u32 a_hi;
909 u32 a_lo;
910 };
911
912 struct isa_range {
913 struct isa_address isa_addr;
914 struct pci_address pci_addr;
915 unsigned int size;
916 };
917
899 struct isa_range *range; 918 struct isa_range *range;
900 unsigned long pci_addr; 919 unsigned long pci_addr;
901 unsigned int isa_addr; 920 unsigned int isa_addr;
@@ -1330,8 +1349,9 @@ unsigned int pci_address_to_pio(phys_addr_t address)
1330 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { 1349 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
1331 if (address >= hose->io_base_phys && 1350 if (address >= hose->io_base_phys &&
1332 address < (hose->io_base_phys + hose->pci_io_size)) 1351 address < (hose->io_base_phys + hose->pci_io_size))
1333 return (unsigned int)hose->io_base_virt + 1352 return (unsigned int)
1334 (address - hose->io_base_phys); 1353 ((unsigned long)hose->io_base_virt +
1354 (address - hose->io_base_phys));
1335 } 1355 }
1336 return (unsigned int)-1; 1356 return (unsigned int)-1;
1337} 1357}