aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 20:12:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 20:12:10 -0400
commit3960ef326a1838971466193ffa008ff37c1d978d (patch)
tree282b74377bccb9fa79639ce4df2dcb48652dbdec /arch/powerpc
parent62c9072bee2272232d0ed92dc8148c48c1f10f8e (diff)
parentc8f85523e70f8202ff49858bacd72fa65245f382 (diff)
Merge branch 'next/cross-platform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
* 'next/cross-platform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: ARM: Consolidate the clkdev header files ARM: set vga memory base at run-time ARM: convert PCI defines to variables ARM: pci: make pcibios_assign_all_busses use pci_has_flag ARM: remove unnecessary mach/hardware.h includes pci: move microblaze and powerpc pci flag functions into asm-generic powerpc: rename ppc_pci_*_flags to pci_*_flags Fix up conflicts in arch/microblaze/include/asm/pci-bridge.h
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/pci-bridge.h50
-rw-r--r--arch/powerpc/include/asm/pci.h2
-rw-r--r--arch/powerpc/kernel/pci-common.c22
-rw-r--r--arch/powerpc/kernel/pci_32.c2
-rw-r--r--arch/powerpc/kernel/pci_64.c4
-rw-r--r--arch/powerpc/kernel/rtas_pci.c2
-rw-r--r--arch/powerpc/platforms/40x/ep405.c2
-rw-r--r--arch/powerpc/platforms/40x/ppc40x_simple.c2
-rw-r--r--arch/powerpc/platforms/40x/walnut.c2
-rw-r--r--arch/powerpc/platforms/44x/canyonlands.c2
-rw-r--r--arch/powerpc/platforms/44x/ebony.c2
-rw-r--r--arch/powerpc/platforms/44x/ppc44x_simple.c2
-rw-r--r--arch/powerpc/platforms/44x/sam440ep.c2
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pci.c2
-rw-r--r--arch/powerpc/platforms/82xx/pq2.c2
-rw-r--r--arch/powerpc/platforms/chrp/pci.c2
-rw-r--r--arch/powerpc/platforms/powermac/pci.c6
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c4
-rw-r--r--arch/powerpc/sysdev/grackle.c2
-rw-r--r--arch/powerpc/sysdev/ppc4xx_pci.c2
20 files changed, 34 insertions, 82 deletions
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
index 90bd3ed48165..56b879ab3a40 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
@@ -10,58 +10,10 @@
10#include <linux/pci.h> 10#include <linux/pci.h>
11#include <linux/list.h> 11#include <linux/list.h>
12#include <linux/ioport.h> 12#include <linux/ioport.h>
13#include <asm-generic/pci-bridge.h>
13 14
14struct device_node; 15struct device_node;
15 16
16enum {
17 /* Force re-assigning all resources (ignore firmware
18 * setup completely)
19 */
20 PPC_PCI_REASSIGN_ALL_RSRC = 0x00000001,
21
22 /* Re-assign all bus numbers */
23 PPC_PCI_REASSIGN_ALL_BUS = 0x00000002,
24
25 /* Do not try to assign, just use existing setup */
26 PPC_PCI_PROBE_ONLY = 0x00000004,
27
28 /* Don't bother with ISA alignment unless the bridge has
29 * ISA forwarding enabled
30 */
31 PPC_PCI_CAN_SKIP_ISA_ALIGN = 0x00000008,
32
33 /* Enable domain numbers in /proc */
34 PPC_PCI_ENABLE_PROC_DOMAINS = 0x00000010,
35 /* ... except for domain 0 */
36 PPC_PCI_COMPAT_DOMAIN_0 = 0x00000020,
37};
38#ifdef CONFIG_PCI
39extern unsigned int ppc_pci_flags;
40
41static inline void ppc_pci_set_flags(int flags)
42{
43 ppc_pci_flags = flags;
44}
45
46static inline void ppc_pci_add_flags(int flags)
47{
48 ppc_pci_flags |= flags;
49}
50
51static inline int ppc_pci_has_flag(int flag)
52{
53 return (ppc_pci_flags & flag);
54}
55#else
56static inline void ppc_pci_set_flags(int flags) { }
57static inline void ppc_pci_add_flags(int flags) { }
58static inline int ppc_pci_has_flag(int flag)
59{
60 return 0;
61}
62#endif
63
64
65/* 17/*
66 * Structure of a PCI controller (host bridge) 18 * Structure of a PCI controller (host bridge)
67 */ 19 */
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index 1f522680ea17..49c3de582be0 100644
--- a/arch/powerpc/include/asm/pci.h
+++ b/arch/powerpc/include/asm/pci.h
@@ -44,7 +44,7 @@ struct pci_dev;
44 * bus numbers (don't do that on ppc64 yet !) 44 * bus numbers (don't do that on ppc64 yet !)
45 */ 45 */
46#define pcibios_assign_all_busses() \ 46#define pcibios_assign_all_busses() \
47 (ppc_pci_has_flag(PPC_PCI_REASSIGN_ALL_BUS)) 47 (pci_has_flag(PCI_REASSIGN_ALL_BUS))
48 48
49static inline void pcibios_set_master(struct pci_dev *dev) 49static inline void pcibios_set_master(struct pci_dev *dev)
50{ 50{
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 0187829c3382..32656f105250 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -50,7 +50,7 @@ static int global_phb_number; /* Global phb counter */
50resource_size_t isa_mem_base; 50resource_size_t isa_mem_base;
51 51
52/* Default PCI flags is 0 on ppc32, modified at boot on ppc64 */ 52/* Default PCI flags is 0 on ppc32, modified at boot on ppc64 */
53unsigned int ppc_pci_flags = 0; 53unsigned int pci_flags = 0;
54 54
55 55
56static struct dma_map_ops *pci_dma_ops = &dma_direct_ops; 56static struct dma_map_ops *pci_dma_ops = &dma_direct_ops;
@@ -842,9 +842,9 @@ int pci_proc_domain(struct pci_bus *bus)
842{ 842{
843 struct pci_controller *hose = pci_bus_to_host(bus); 843 struct pci_controller *hose = pci_bus_to_host(bus);
844 844
845 if (!(ppc_pci_flags & PPC_PCI_ENABLE_PROC_DOMAINS)) 845 if (!pci_has_flag(PCI_ENABLE_PROC_DOMAINS))
846 return 0; 846 return 0;
847 if (ppc_pci_flags & PPC_PCI_COMPAT_DOMAIN_0) 847 if (pci_has_flag(PCI_COMPAT_DOMAIN_0))
848 return hose->global_number != 0; 848 return hose->global_number != 0;
849 return 1; 849 return 1;
850} 850}
@@ -920,13 +920,13 @@ static void __devinit pcibios_fixup_resources(struct pci_dev *dev)
920 struct resource *res = dev->resource + i; 920 struct resource *res = dev->resource + i;
921 if (!res->flags) 921 if (!res->flags)
922 continue; 922 continue;
923 /* On platforms that have PPC_PCI_PROBE_ONLY set, we don't 923 /* On platforms that have PCI_PROBE_ONLY set, we don't
924 * consider 0 as an unassigned BAR value. It's technically 924 * consider 0 as an unassigned BAR value. It's technically
925 * a valid value, but linux doesn't like it... so when we can 925 * a valid value, but linux doesn't like it... so when we can
926 * re-assign things, we do so, but if we can't, we keep it 926 * re-assign things, we do so, but if we can't, we keep it
927 * around and hope for the best... 927 * around and hope for the best...
928 */ 928 */
929 if (res->start == 0 && !(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) { 929 if (res->start == 0 && !pci_has_flag(PCI_PROBE_ONLY)) {
930 pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] is unassigned\n", 930 pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] is unassigned\n",
931 pci_name(dev), i, 931 pci_name(dev), i,
932 (unsigned long long)res->start, 932 (unsigned long long)res->start,
@@ -973,7 +973,7 @@ static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
973 int i; 973 int i;
974 974
975 /* We don't do anything if PCI_PROBE_ONLY is set */ 975 /* We don't do anything if PCI_PROBE_ONLY is set */
976 if (ppc_pci_flags & PPC_PCI_PROBE_ONLY) 976 if (pci_has_flag(PCI_PROBE_ONLY))
977 return 0; 977 return 0;
978 978
979 /* Job is a bit different between memory and IO */ 979 /* Job is a bit different between memory and IO */
@@ -1143,7 +1143,7 @@ void __devinit pci_fixup_cardbus(struct pci_bus *bus)
1143 1143
1144static int skip_isa_ioresource_align(struct pci_dev *dev) 1144static int skip_isa_ioresource_align(struct pci_dev *dev)
1145{ 1145{
1146 if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) && 1146 if (pci_has_flag(PCI_CAN_SKIP_ISA_ALIGN) &&
1147 !(dev->bus->bridge_ctl & PCI_BRIDGE_CTL_ISA)) 1147 !(dev->bus->bridge_ctl & PCI_BRIDGE_CTL_ISA))
1148 return 1; 1148 return 1;
1149 return 0; 1149 return 0;
@@ -1271,7 +1271,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
1271 * and as such ensure proper re-allocation 1271 * and as such ensure proper re-allocation
1272 * later. 1272 * later.
1273 */ 1273 */
1274 if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC) 1274 if (pci_has_flag(PCI_REASSIGN_ALL_RSRC))
1275 goto clear_resource; 1275 goto clear_resource;
1276 pr = pci_find_parent_resource(bus->self, res); 1276 pr = pci_find_parent_resource(bus->self, res);
1277 if (pr == res) { 1277 if (pr == res) {
@@ -1456,7 +1456,7 @@ void __init pcibios_resource_survey(void)
1456 list_for_each_entry(b, &pci_root_buses, node) 1456 list_for_each_entry(b, &pci_root_buses, node)
1457 pcibios_allocate_bus_resources(b); 1457 pcibios_allocate_bus_resources(b);
1458 1458
1459 if (!(ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)) { 1459 if (!pci_has_flag(PCI_REASSIGN_ALL_RSRC)) {
1460 pcibios_allocate_resources(0); 1460 pcibios_allocate_resources(0);
1461 pcibios_allocate_resources(1); 1461 pcibios_allocate_resources(1);
1462 } 1462 }
@@ -1465,7 +1465,7 @@ void __init pcibios_resource_survey(void)
1465 * the low IO area and the VGA memory area if they intersect the 1465 * the low IO area and the VGA memory area if they intersect the
1466 * bus available resources to avoid allocating things on top of them 1466 * bus available resources to avoid allocating things on top of them
1467 */ 1467 */
1468 if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) { 1468 if (!pci_has_flag(PCI_PROBE_ONLY)) {
1469 list_for_each_entry(b, &pci_root_buses, node) 1469 list_for_each_entry(b, &pci_root_buses, node)
1470 pcibios_reserve_legacy_regions(b); 1470 pcibios_reserve_legacy_regions(b);
1471 } 1471 }
@@ -1473,7 +1473,7 @@ void __init pcibios_resource_survey(void)
1473 /* Now, if the platform didn't decide to blindly trust the firmware, 1473 /* Now, if the platform didn't decide to blindly trust the firmware,
1474 * we proceed to assigning things that were left unassigned 1474 * we proceed to assigning things that were left unassigned
1475 */ 1475 */
1476 if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) { 1476 if (!pci_has_flag(PCI_PROBE_ONLY)) {
1477 pr_debug("PCI: Assigning unassigned resources...\n"); 1477 pr_debug("PCI: Assigning unassigned resources...\n");
1478 pci_assign_unassigned_resources(); 1478 pci_assign_unassigned_resources();
1479 } 1479 }
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index e2f24badf787..bb154511db5e 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -230,7 +230,7 @@ static int __init pcibios_init(void)
230 230
231 printk(KERN_INFO "PCI: Probing PCI hardware\n"); 231 printk(KERN_INFO "PCI: Probing PCI hardware\n");
232 232
233 if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_BUS) 233 if (pci_has_flag(PCI_REASSIGN_ALL_BUS))
234 pci_assign_all_buses = 1; 234 pci_assign_all_buses = 1;
235 235
236 /* Scan all of the recorded PCI controllers. */ 236 /* Scan all of the recorded PCI controllers. */
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index fc6452b6be9f..ab34046752bf 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -55,12 +55,12 @@ static int __init pcibios_init(void)
55 ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot; 55 ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot;
56 56
57 if (pci_probe_only) 57 if (pci_probe_only)
58 ppc_pci_flags |= PPC_PCI_PROBE_ONLY; 58 pci_add_flags(PCI_PROBE_ONLY);
59 59
60 /* On ppc64, we always enable PCI domains and we keep domain 0 60 /* On ppc64, we always enable PCI domains and we keep domain 0
61 * backward compatible in /proc for video cards 61 * backward compatible in /proc for video cards
62 */ 62 */
63 ppc_pci_flags |= PPC_PCI_ENABLE_PROC_DOMAINS | PPC_PCI_COMPAT_DOMAIN_0; 63 pci_add_flags(PCI_ENABLE_PROC_DOMAINS | PCI_COMPAT_DOMAIN_0);
64 64
65 /* Scan all of the recorded PCI controllers. */ 65 /* Scan all of the recorded PCI controllers. */
66 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { 66 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 54e66da8f743..6cd8f0196b6d 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -291,7 +291,7 @@ void __init find_and_init_phbs(void)
291 prop = of_get_property(of_chosen, 291 prop = of_get_property(of_chosen,
292 "linux,pci-assign-all-buses", NULL); 292 "linux,pci-assign-all-buses", NULL);
293 if (prop && *prop) 293 if (prop && *prop)
294 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS; 294 pci_add_flags(PCI_REASSIGN_ALL_BUS);
295#endif /* CONFIG_PPC32 */ 295#endif /* CONFIG_PPC32 */
296 } 296 }
297} 297}
diff --git a/arch/powerpc/platforms/40x/ep405.c b/arch/powerpc/platforms/40x/ep405.c
index 4058fd1e7fc7..b0389bbe4f94 100644
--- a/arch/powerpc/platforms/40x/ep405.c
+++ b/arch/powerpc/platforms/40x/ep405.c
@@ -100,7 +100,7 @@ static void __init ep405_setup_arch(void)
100 /* Find & init the BCSR CPLD */ 100 /* Find & init the BCSR CPLD */
101 ep405_init_bcsr(); 101 ep405_init_bcsr();
102 102
103 ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); 103 pci_set_flags(PCI_REASSIGN_ALL_RSRC);
104} 104}
105 105
106static int __init ep405_probe(void) 106static int __init ep405_probe(void)
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c
index 2521d93ef136..e8dd5c5df7d9 100644
--- a/arch/powerpc/platforms/40x/ppc40x_simple.c
+++ b/arch/powerpc/platforms/40x/ppc40x_simple.c
@@ -61,7 +61,7 @@ static const char *board[] __initdata = {
61static int __init ppc40x_probe(void) 61static int __init ppc40x_probe(void)
62{ 62{
63 if (of_flat_dt_match(of_get_flat_dt_root(), board)) { 63 if (of_flat_dt_match(of_get_flat_dt_root(), board)) {
64 ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); 64 pci_set_flags(PCI_REASSIGN_ALL_RSRC);
65 return 1; 65 return 1;
66 } 66 }
67 67
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c
index 335df91fbee5..8b691df72f74 100644
--- a/arch/powerpc/platforms/40x/walnut.c
+++ b/arch/powerpc/platforms/40x/walnut.c
@@ -51,7 +51,7 @@ static int __init walnut_probe(void)
51 if (!of_flat_dt_is_compatible(root, "ibm,walnut")) 51 if (!of_flat_dt_is_compatible(root, "ibm,walnut"))
52 return 0; 52 return 0;
53 53
54 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; 54 pci_set_flags(PCI_REASSIGN_ALL_RSRC);
55 55
56 return 1; 56 return 1;
57} 57}
diff --git a/arch/powerpc/platforms/44x/canyonlands.c b/arch/powerpc/platforms/44x/canyonlands.c
index afc5e8ea3775..e300dd4c89bf 100644
--- a/arch/powerpc/platforms/44x/canyonlands.c
+++ b/arch/powerpc/platforms/44x/canyonlands.c
@@ -55,7 +55,7 @@ static int __init ppc460ex_probe(void)
55{ 55{
56 unsigned long root = of_get_flat_dt_root(); 56 unsigned long root = of_get_flat_dt_root();
57 if (of_flat_dt_is_compatible(root, "amcc,canyonlands")) { 57 if (of_flat_dt_is_compatible(root, "amcc,canyonlands")) {
58 ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); 58 pci_set_flags(PCI_REASSIGN_ALL_RSRC);
59 return 1; 59 return 1;
60 } 60 }
61 return 0; 61 return 0;
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c
index 88b9117fa691..6a4232bbdf88 100644
--- a/arch/powerpc/platforms/44x/ebony.c
+++ b/arch/powerpc/platforms/44x/ebony.c
@@ -54,7 +54,7 @@ static int __init ebony_probe(void)
54 if (!of_flat_dt_is_compatible(root, "ibm,ebony")) 54 if (!of_flat_dt_is_compatible(root, "ibm,ebony"))
55 return 0; 55 return 0;
56 56
57 ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); 57 pci_set_flags(PCI_REASSIGN_ALL_RSRC);
58 58
59 return 1; 59 return 1;
60} 60}
diff --git a/arch/powerpc/platforms/44x/ppc44x_simple.c b/arch/powerpc/platforms/44x/ppc44x_simple.c
index c81c19c0b3d4..8d2202763415 100644
--- a/arch/powerpc/platforms/44x/ppc44x_simple.c
+++ b/arch/powerpc/platforms/44x/ppc44x_simple.c
@@ -72,7 +72,7 @@ static int __init ppc44x_probe(void)
72 72
73 for (i = 0; i < ARRAY_SIZE(board); i++) { 73 for (i = 0; i < ARRAY_SIZE(board); i++) {
74 if (of_flat_dt_is_compatible(root, board[i])) { 74 if (of_flat_dt_is_compatible(root, board[i])) {
75 ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); 75 pci_set_flags(PCI_REASSIGN_ALL_RSRC);
76 return 1; 76 return 1;
77 } 77 }
78 } 78 }
diff --git a/arch/powerpc/platforms/44x/sam440ep.c b/arch/powerpc/platforms/44x/sam440ep.c
index a78e8eb6da41..9e09b835758b 100644
--- a/arch/powerpc/platforms/44x/sam440ep.c
+++ b/arch/powerpc/platforms/44x/sam440ep.c
@@ -51,7 +51,7 @@ static int __init sam440ep_probe(void)
51 if (!of_flat_dt_is_compatible(root, "acube,sam440ep")) 51 if (!of_flat_dt_is_compatible(root, "acube,sam440ep"))
52 return 0; 52 return 0;
53 53
54 ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC); 54 pci_set_flags(PCI_REASSIGN_ALL_RSRC);
55 55
56 return 1; 56 return 1;
57} 57}
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 5f5e69309080..bfb11e01133e 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -371,7 +371,7 @@ mpc52xx_add_bridge(struct device_node *node)
371 371
372 pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name); 372 pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name);
373 373
374 ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS); 374 pci_add_flags(PCI_REASSIGN_ALL_BUS);
375 375
376 if (of_address_to_resource(node, 0, &rsrc) != 0) { 376 if (of_address_to_resource(node, 0, &rsrc) != 0) {
377 printk(KERN_ERR "Can't get %s resources\n", node->full_name); 377 printk(KERN_ERR "Can't get %s resources\n", node->full_name);
diff --git a/arch/powerpc/platforms/82xx/pq2.c b/arch/powerpc/platforms/82xx/pq2.c
index 9761a59f175f..d111b024eafd 100644
--- a/arch/powerpc/platforms/82xx/pq2.c
+++ b/arch/powerpc/platforms/82xx/pq2.c
@@ -53,7 +53,7 @@ static void __init pq2_pci_add_bridge(struct device_node *np)
53 if (of_address_to_resource(np, 0, &r) || r.end - r.start < 0x10b) 53 if (of_address_to_resource(np, 0, &r) || r.end - r.start < 0x10b)
54 goto err; 54 goto err;
55 55
56 ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS); 56 pci_add_flags(PCI_REASSIGN_ALL_BUS);
57 57
58 hose = pcibios_alloc_controller(np); 58 hose = pcibios_alloc_controller(np);
59 if (!hose) 59 if (!hose)
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index 3f65443f1714..83285c5a2049 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -199,7 +199,7 @@ static void __init setup_peg2(struct pci_controller *hose, struct device_node *d
199 printk ("RTAS supporting Pegasos OF not found, please upgrade" 199 printk ("RTAS supporting Pegasos OF not found, please upgrade"
200 " your firmware\n"); 200 " your firmware\n");
201 } 201 }
202 ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS); 202 pci_add_flags(PCI_REASSIGN_ALL_BUS);
203 /* keep the reference to the root node */ 203 /* keep the reference to the root node */
204} 204}
205 205
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index 41a80a4fb97e..5cc83851ad06 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -732,7 +732,7 @@ static void __init setup_bandit(struct pci_controller *hose,
732static int __init setup_uninorth(struct pci_controller *hose, 732static int __init setup_uninorth(struct pci_controller *hose,
733 struct resource *addr) 733 struct resource *addr)
734{ 734{
735 ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS); 735 pci_add_flags(PCI_REASSIGN_ALL_BUS);
736 has_uninorth = 1; 736 has_uninorth = 1;
737 hose->ops = &macrisc_pci_ops; 737 hose->ops = &macrisc_pci_ops;
738 hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000); 738 hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000);
@@ -998,7 +998,7 @@ void __init pmac_pci_init(void)
998 struct device_node *np, *root; 998 struct device_node *np, *root;
999 struct device_node *ht = NULL; 999 struct device_node *ht = NULL;
1000 1000
1001 ppc_pci_set_flags(PPC_PCI_CAN_SKIP_ISA_ALIGN); 1001 pci_set_flags(PCI_CAN_SKIP_ISA_ALIGN);
1002 1002
1003 root = of_find_node_by_path("/"); 1003 root = of_find_node_by_path("/");
1004 if (root == NULL) { 1004 if (root == NULL) {
@@ -1057,7 +1057,7 @@ void __init pmac_pci_init(void)
1057 * some offset between bus number and domains for now when we 1057 * some offset between bus number and domains for now when we
1058 * assign all busses should help for now 1058 * assign all busses should help for now
1059 */ 1059 */
1060 if (ppc_pci_has_flag(PPC_PCI_REASSIGN_ALL_BUS)) 1060 if (pci_has_flag(PCI_REASSIGN_ALL_BUS))
1061 pcibios_assign_bus_offset = 0x10; 1061 pcibios_assign_bus_offset = 0x10;
1062#endif 1062#endif
1063} 1063}
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 3bba8bdb58b0..4ce547e00473 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -351,7 +351,7 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
351 printk(KERN_WARNING "Can't get bus-range for %s, assume" 351 printk(KERN_WARNING "Can't get bus-range for %s, assume"
352 " bus 0\n", dev->full_name); 352 " bus 0\n", dev->full_name);
353 353
354 ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS); 354 pci_add_flags(PCI_REASSIGN_ALL_BUS);
355 hose = pcibios_alloc_controller(dev); 355 hose = pcibios_alloc_controller(dev);
356 if (!hose) 356 if (!hose)
357 return -ENOMEM; 357 return -ENOMEM;
@@ -640,7 +640,7 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
640 " bus 0\n", dev->full_name); 640 " bus 0\n", dev->full_name);
641 } 641 }
642 642
643 ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS); 643 pci_add_flags(PCI_REASSIGN_ALL_BUS);
644 hose = pcibios_alloc_controller(dev); 644 hose = pcibios_alloc_controller(dev);
645 if (!hose) 645 if (!hose)
646 return -ENOMEM; 646 return -ENOMEM;
diff --git a/arch/powerpc/sysdev/grackle.c b/arch/powerpc/sysdev/grackle.c
index cf27df6e508b..08abe91ae798 100644
--- a/arch/powerpc/sysdev/grackle.c
+++ b/arch/powerpc/sysdev/grackle.c
@@ -57,7 +57,7 @@ void __init setup_grackle(struct pci_controller *hose)
57{ 57{
58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0); 58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0);
59 if (of_machine_is_compatible("PowerMac1,1")) 59 if (of_machine_is_compatible("PowerMac1,1"))
60 ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS); 60 pci_add_flags(PCI_REASSIGN_ALL_BUS);
61 if (of_machine_is_compatible("AAPL,PowerBook1998")) 61 if (of_machine_is_compatible("AAPL,PowerBook1998"))
62 grackle_set_loop_snoop(hose, 1); 62 grackle_set_loop_snoop(hose, 1);
63#if 0 /* Disabled for now, HW problems ??? */ 63#if 0 /* Disabled for now, HW problems ??? */
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c
index 2ec4f3bb8160..a59ba96d2c21 100644
--- a/arch/powerpc/sysdev/ppc4xx_pci.c
+++ b/arch/powerpc/sysdev/ppc4xx_pci.c
@@ -1977,7 +1977,7 @@ static int __init ppc4xx_pci_find_bridges(void)
1977{ 1977{
1978 struct device_node *np; 1978 struct device_node *np;
1979 1979
1980 ppc_pci_flags |= PPC_PCI_ENABLE_PROC_DOMAINS | PPC_PCI_COMPAT_DOMAIN_0; 1980 pci_add_flags(PCI_ENABLE_PROC_DOMAINS | PCI_COMPAT_DOMAIN_0);
1981 1981
1982#ifdef CONFIG_PPC4xx_PCI_EXPRESS 1982#ifdef CONFIG_PPC4xx_PCI_EXPRESS
1983 for_each_compatible_node(np, NULL, "ibm,plb-pciex") 1983 for_each_compatible_node(np, NULL, "ibm,plb-pciex")