diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-06-27 02:56:50 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-06-29 02:58:39 -0400 |
commit | dbf8471f5294b27ba9b6232ffc177dcd4e0a2fa5 (patch) | |
tree | fdecc58118c69b522c44cc654aaadb89e69771fc /arch | |
parent | 5516b540e98de6f7474a4e7149470ad6a0bbc54a (diff) |
[POWERPC] Merge ppc32 and ppc64 pcibios_alloc_controller() prototypes
Make the ppc32 pcibios_alloc_controller take a device node to match
the ppc64 prototypes and have it set arch_data.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/pci_32.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/efika.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_pci.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/82xx/mpc82xx_ads.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/pci.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/pci.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/pci.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/pci.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/linkstation.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/pci.c | 6 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mv64x60_pci.c | 4 | ||||
-rw-r--r-- | arch/powerpc/sysdev/tsi108_pci.c | 3 |
12 files changed, 13 insertions, 30 deletions
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 56deb316efd3..df3251ccca0f 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -610,7 +610,7 @@ pcibios_enable_resources(struct pci_dev *dev, int mask) | |||
610 | static int next_controller_index; | 610 | static int next_controller_index; |
611 | 611 | ||
612 | struct pci_controller * __init | 612 | struct pci_controller * __init |
613 | pcibios_alloc_controller(void) | 613 | pcibios_alloc_controller(struct device_node *dev) |
614 | { | 614 | { |
615 | struct pci_controller *hose; | 615 | struct pci_controller *hose; |
616 | 616 | ||
@@ -621,6 +621,7 @@ pcibios_alloc_controller(void) | |||
621 | hose_tail = &hose->next; | 621 | hose_tail = &hose->next; |
622 | 622 | ||
623 | hose->global_number = next_controller_index++; | 623 | hose->global_number = next_controller_index++; |
624 | hose->arch_data = dev; | ||
624 | 625 | ||
625 | return hose; | 626 | return hose; |
626 | } | 627 | } |
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c index 010be5c082d5..0256423c99d6 100644 --- a/arch/powerpc/platforms/52xx/efika.c +++ b/arch/powerpc/platforms/52xx/efika.c | |||
@@ -128,7 +128,7 @@ void __init efika_pcisetup(void) | |||
128 | printk(" controlled by %s\n", pcictrl->full_name); | 128 | printk(" controlled by %s\n", pcictrl->full_name); |
129 | printk("\n"); | 129 | printk("\n"); |
130 | 130 | ||
131 | hose = pcibios_alloc_controller(); | 131 | hose = pcibios_alloc_controller(of_node_get(pcictrl)); |
132 | if (!hose) { | 132 | if (!hose) { |
133 | printk(KERN_WARNING EFIKA_PLATFORM_NAME | 133 | printk(KERN_WARNING EFIKA_PLATFORM_NAME |
134 | ": Can't allocate PCI controller structure for %s\n", | 134 | ": Can't allocate PCI controller structure for %s\n", |
@@ -136,7 +136,6 @@ void __init efika_pcisetup(void) | |||
136 | return; | 136 | return; |
137 | } | 137 | } |
138 | 138 | ||
139 | hose->arch_data = of_node_get(pcictrl); | ||
140 | hose->first_busno = bus_range[0]; | 139 | hose->first_busno = bus_range[0]; |
141 | hose->last_busno = bus_range[1]; | 140 | hose->last_busno = bus_range[1]; |
142 | hose->ops = &rtas_pci_ops; | 141 | hose->ops = &rtas_pci_ops; |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c index 69a04217c79d..4c6c82a684b1 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c | |||
@@ -385,12 +385,10 @@ mpc52xx_add_bridge(struct device_node *node) | |||
385 | * tree are needed to configure the 52xx PCI controller. Rather | 385 | * tree are needed to configure the 52xx PCI controller. Rather |
386 | * than parse the tree here, let pci_process_bridge_OF_ranges() | 386 | * than parse the tree here, let pci_process_bridge_OF_ranges() |
387 | * do it for us and extract the values after the fact */ | 387 | * do it for us and extract the values after the fact */ |
388 | hose = pcibios_alloc_controller(); | 388 | hose = pcibios_alloc_controller(node); |
389 | if (!hose) | 389 | if (!hose) |
390 | return -ENOMEM; | 390 | return -ENOMEM; |
391 | 391 | ||
392 | hose->arch_data = node; | ||
393 | |||
394 | hose->first_busno = bus_range ? bus_range[0] : 0; | 392 | hose->first_busno = bus_range ? bus_range[0] : 0; |
395 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 393 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |
396 | 394 | ||
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c index d1e0919a3dee..da20832b27f1 100644 --- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c +++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c | |||
@@ -543,13 +543,11 @@ static void __init mpc82xx_add_bridge(struct device_node *np) | |||
543 | 543 | ||
544 | pci_assign_all_buses = 1; | 544 | pci_assign_all_buses = 1; |
545 | 545 | ||
546 | hose = pcibios_alloc_controller(); | 546 | hose = pcibios_alloc_controller(np); |
547 | 547 | ||
548 | if (!hose) | 548 | if (!hose) |
549 | return; | 549 | return; |
550 | 550 | ||
551 | hose->arch_data = np; | ||
552 | |||
553 | hose->first_busno = bus_range ? bus_range[0] : 0; | 551 | hose->first_busno = bus_range ? bus_range[0] : 0; |
554 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 552 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |
555 | 553 | ||
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c index f49ed277e843..c0e2b89154e5 100644 --- a/arch/powerpc/platforms/83xx/pci.c +++ b/arch/powerpc/platforms/83xx/pci.c | |||
@@ -62,10 +62,9 @@ int __init mpc83xx_add_bridge(struct device_node *dev) | |||
62 | } | 62 | } |
63 | 63 | ||
64 | pci_assign_all_buses = 1; | 64 | pci_assign_all_buses = 1; |
65 | hose = pcibios_alloc_controller(); | 65 | hose = pcibios_alloc_controller(dev); |
66 | if (!hose) | 66 | if (!hose) |
67 | return -ENOMEM; | 67 | return -ENOMEM; |
68 | hose->arch_data = dev; | ||
69 | 68 | ||
70 | hose->first_busno = bus_range ? bus_range[0] : 0; | 69 | hose->first_busno = bus_range ? bus_range[0] : 0; |
71 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 70 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c index a25b3e77a7d2..8118417b7364 100644 --- a/arch/powerpc/platforms/85xx/pci.c +++ b/arch/powerpc/platforms/85xx/pci.c | |||
@@ -56,10 +56,9 @@ int __init mpc85xx_add_bridge(struct device_node *dev) | |||
56 | } | 56 | } |
57 | 57 | ||
58 | pci_assign_all_buses = 1; | 58 | pci_assign_all_buses = 1; |
59 | hose = pcibios_alloc_controller(); | 59 | hose = pcibios_alloc_controller(dev); |
60 | if (!hose) | 60 | if (!hose) |
61 | return -ENOMEM; | 61 | return -ENOMEM; |
62 | hose->arch_data = dev; | ||
63 | 62 | ||
64 | hose->first_busno = bus_range ? bus_range[0] : 0; | 63 | hose->first_busno = bus_range ? bus_range[0] : 0; |
65 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 64 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |
diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c index 2d7254c91ad9..5cb2188ee406 100644 --- a/arch/powerpc/platforms/86xx/pci.c +++ b/arch/powerpc/platforms/86xx/pci.c | |||
@@ -196,10 +196,10 @@ int __init mpc86xx_add_bridge(struct device_node *dev) | |||
196 | " bus 0\n", dev->full_name); | 196 | " bus 0\n", dev->full_name); |
197 | 197 | ||
198 | pci_assign_all_buses = 1; | 198 | pci_assign_all_buses = 1; |
199 | hose = pcibios_alloc_controller(); | 199 | hose = pcibios_alloc_controller(dev); |
200 | if (!hose) | 200 | if (!hose) |
201 | return -ENOMEM; | 201 | return -ENOMEM; |
202 | hose->arch_data = dev; | 202 | |
203 | hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG | | 203 | hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG | |
204 | PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS; | 204 | PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS; |
205 | 205 | ||
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index d8408632b1a9..3690624e49d4 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -254,13 +254,12 @@ chrp_find_bridges(void) | |||
254 | printk(" at %llx", (unsigned long long)r.start); | 254 | printk(" at %llx", (unsigned long long)r.start); |
255 | printk("\n"); | 255 | printk("\n"); |
256 | 256 | ||
257 | hose = pcibios_alloc_controller(); | 257 | hose = pcibios_alloc_controller(dev); |
258 | if (!hose) { | 258 | if (!hose) { |
259 | printk("Can't allocate PCI controller structure for %s\n", | 259 | printk("Can't allocate PCI controller structure for %s\n", |
260 | dev->full_name); | 260 | dev->full_name); |
261 | continue; | 261 | continue; |
262 | } | 262 | } |
263 | hose->arch_data = dev; | ||
264 | hose->first_busno = bus_range[0]; | 263 | hose->first_busno = bus_range[0]; |
265 | hose->last_busno = bus_range[1]; | 264 | hose->last_busno = bus_range[1]; |
266 | 265 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c index 885c789a8c2d..f4d0a7a603f5 100644 --- a/arch/powerpc/platforms/embedded6xx/linkstation.c +++ b/arch/powerpc/platforms/embedded6xx/linkstation.c | |||
@@ -68,12 +68,11 @@ static int __init linkstation_add_bridge(struct device_node *dev) | |||
68 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | 68 | printk(KERN_WARNING "Can't get bus-range for %s, assume" |
69 | " bus 0\n", dev->full_name); | 69 | " bus 0\n", dev->full_name); |
70 | 70 | ||
71 | hose = pcibios_alloc_controller(); | 71 | hose = pcibios_alloc_controller(dev); |
72 | if (hose == NULL) | 72 | if (hose == NULL) |
73 | return -ENOMEM; | 73 | return -ENOMEM; |
74 | hose->first_busno = bus_range ? bus_range[0] : 0; | 74 | hose->first_busno = bus_range ? bus_range[0] : 0; |
75 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 75 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |
76 | hose->arch_data = dev; | ||
77 | setup_indirect_pci(hose, 0xfec00000, 0xfee00000); | 76 | setup_indirect_pci(hose, 0xfec00000, 0xfee00000); |
78 | 77 | ||
79 | /* Interpret the "ranges" property */ | 78 | /* Interpret the "ranges" property */ |
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index fb853c0affcc..92586db19754 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -916,15 +916,9 @@ static int __init pmac_add_bridge(struct device_node *dev) | |||
916 | " bus 0\n", dev->full_name); | 916 | " bus 0\n", dev->full_name); |
917 | } | 917 | } |
918 | 918 | ||
919 | /* XXX Different prototypes, to be merged */ | ||
920 | #ifdef CONFIG_PPC64 | ||
921 | hose = pcibios_alloc_controller(dev); | 919 | hose = pcibios_alloc_controller(dev); |
922 | #else | ||
923 | hose = pcibios_alloc_controller(); | ||
924 | #endif | ||
925 | if (!hose) | 920 | if (!hose) |
926 | return -ENOMEM; | 921 | return -ENOMEM; |
927 | hose->arch_data = dev; | ||
928 | hose->first_busno = bus_range ? bus_range[0] : 0; | 922 | hose->first_busno = bus_range ? bus_range[0] : 0; |
929 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 923 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |
930 | 924 | ||
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c index 2e7738455ae5..45db86c2363c 100644 --- a/arch/powerpc/sysdev/mv64x60_pci.c +++ b/arch/powerpc/sysdev/mv64x60_pci.c | |||
@@ -137,12 +137,10 @@ static int __init mv64x60_add_bridge(struct device_node *dev) | |||
137 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | 137 | printk(KERN_WARNING "Can't get bus-range for %s, assume" |
138 | " bus 0\n", dev->full_name); | 138 | " bus 0\n", dev->full_name); |
139 | 139 | ||
140 | hose = pcibios_alloc_controller(); | 140 | hose = pcibios_alloc_controller(dev); |
141 | if (!hose) | 141 | if (!hose) |
142 | return -ENOMEM; | 142 | return -ENOMEM; |
143 | 143 | ||
144 | hose->arch_data = dev; | ||
145 | |||
146 | hose->first_busno = bus_range ? bus_range[0] : 0; | 144 | hose->first_busno = bus_range ? bus_range[0] : 0; |
147 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 145 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |
148 | 146 | ||
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c index 298e2dd34e89..90db8a720fed 100644 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ b/arch/powerpc/sysdev/tsi108_pci.c | |||
@@ -221,13 +221,12 @@ int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary) | |||
221 | " bus 0\n", dev->full_name); | 221 | " bus 0\n", dev->full_name); |
222 | } | 222 | } |
223 | 223 | ||
224 | hose = pcibios_alloc_controller(); | 224 | hose = pcibios_alloc_controller(dev); |
225 | 225 | ||
226 | if (!hose) { | 226 | if (!hose) { |
227 | printk("PCI Host bridge init failed\n"); | 227 | printk("PCI Host bridge init failed\n"); |
228 | return -ENOMEM; | 228 | return -ENOMEM; |
229 | } | 229 | } |
230 | hose->arch_data = dev; | ||
231 | 230 | ||
232 | hose->first_busno = bus_range ? bus_range[0] : 0; | 231 | hose->first_busno = bus_range ? bus_range[0] : 0; |
233 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 232 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |