diff options
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc8313_rdb.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc832x_mds.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc834x_itx.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc834x_mds.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc836x_mds.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ads.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_cds.c | 18 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ds.c | 18 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_mds.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/linkstation.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 2 |
13 files changed, 45 insertions, 27 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/arch/powerpc/platforms/83xx/mpc8313_rdb.c index 140b46ffdb19..33766b8f2594 100644 --- a/arch/powerpc/platforms/83xx/mpc8313_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc8313_rdb.c | |||
@@ -43,7 +43,7 @@ static void __init mpc8313_rdb_setup_arch(void) | |||
43 | ppc_md.progress("mpc8313_rdb_setup_arch()", 0); | 43 | ppc_md.progress("mpc8313_rdb_setup_arch()", 0); |
44 | 44 | ||
45 | #ifdef CONFIG_PCI | 45 | #ifdef CONFIG_PCI |
46 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 46 | for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") |
47 | mpc83xx_add_bridge(np); | 47 | mpc83xx_add_bridge(np); |
48 | #endif | 48 | #endif |
49 | mpc831x_usb_cfg(); | 49 | mpc831x_usb_cfg(); |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index d494bc456458..b8d8c914569b 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c | |||
@@ -73,7 +73,7 @@ static void __init mpc832x_sys_setup_arch(void) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | #ifdef CONFIG_PCI | 75 | #ifdef CONFIG_PCI |
76 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 76 | for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") |
77 | mpc83xx_add_bridge(np); | 77 | mpc83xx_add_bridge(np); |
78 | #endif | 78 | #endif |
79 | 79 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index 24a790c79ec0..4da0698487c0 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c | |||
@@ -93,7 +93,7 @@ static void __init mpc832x_rdb_setup_arch(void) | |||
93 | ppc_md.progress("mpc832x_rdb_setup_arch()", 0); | 93 | ppc_md.progress("mpc832x_rdb_setup_arch()", 0); |
94 | 94 | ||
95 | #ifdef CONFIG_PCI | 95 | #ifdef CONFIG_PCI |
96 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 96 | for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") |
97 | mpc83xx_add_bridge(np); | 97 | mpc83xx_add_bridge(np); |
98 | #endif | 98 | #endif |
99 | 99 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index 870fd20461ce..aa768199432d 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c | |||
@@ -52,7 +52,7 @@ static void __init mpc834x_itx_setup_arch(void) | |||
52 | ppc_md.progress("mpc834x_itx_setup_arch()", 0); | 52 | ppc_md.progress("mpc834x_itx_setup_arch()", 0); |
53 | 53 | ||
54 | #ifdef CONFIG_PCI | 54 | #ifdef CONFIG_PCI |
55 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 55 | for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") |
56 | mpc83xx_add_bridge(np); | 56 | mpc83xx_add_bridge(np); |
57 | #endif | 57 | #endif |
58 | 58 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index a9140b64b98a..00aed7c2269e 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c | |||
@@ -83,7 +83,7 @@ static void __init mpc834x_mds_setup_arch(void) | |||
83 | ppc_md.progress("mpc834x_mds_setup_arch()", 0); | 83 | ppc_md.progress("mpc834x_mds_setup_arch()", 0); |
84 | 84 | ||
85 | #ifdef CONFIG_PCI | 85 | #ifdef CONFIG_PCI |
86 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 86 | for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") |
87 | mpc83xx_add_bridge(np); | 87 | mpc83xx_add_bridge(np); |
88 | #endif | 88 | #endif |
89 | 89 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index db6957611585..0b18a75e9200 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c | |||
@@ -79,7 +79,7 @@ static void __init mpc836x_mds_setup_arch(void) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | #ifdef CONFIG_PCI | 81 | #ifdef CONFIG_PCI |
82 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 82 | for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") |
83 | mpc83xx_add_bridge(np); | 83 | mpc83xx_add_bridge(np); |
84 | #endif | 84 | #endif |
85 | 85 | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index c22bc1c4f591..acb1ef932240 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -204,8 +204,9 @@ static void __init mpc85xx_ads_setup_arch(void) | |||
204 | #endif | 204 | #endif |
205 | 205 | ||
206 | #ifdef CONFIG_PCI | 206 | #ifdef CONFIG_PCI |
207 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 207 | for_each_compatible_node(np, "pci", "fsl,mpc8540-pci") |
208 | fsl_add_bridge(np, 1); | 208 | fsl_add_bridge(np, 1); |
209 | |||
209 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | 210 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; |
210 | #endif | 211 | #endif |
211 | } | 212 | } |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 665e8df05dc5..abc85b8d9f8a 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -283,14 +283,18 @@ static void __init mpc85xx_cds_setup_arch(void) | |||
283 | } | 283 | } |
284 | 284 | ||
285 | #ifdef CONFIG_PCI | 285 | #ifdef CONFIG_PCI |
286 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { | 286 | for_each_node_by_type(np, "pci") { |
287 | struct resource rsrc; | 287 | if (of_device_is_compatible(np, "fsl,mpc8540-pci") || |
288 | of_address_to_resource(np, 0, &rsrc); | 288 | of_device_is_compatible(np, "fsl,mpc8548-pcie")) { |
289 | if ((rsrc.start & 0xfffff) == 0x8000) | 289 | struct resource rsrc; |
290 | fsl_add_bridge(np, 1); | 290 | of_address_to_resource(np, 0, &rsrc); |
291 | else | 291 | if ((rsrc.start & 0xfffff) == 0x8000) |
292 | fsl_add_bridge(np, 0); | 292 | fsl_add_bridge(np, 1); |
293 | else | ||
294 | fsl_add_bridge(np, 0); | ||
295 | } | ||
293 | } | 296 | } |
297 | |||
294 | ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup; | 298 | ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup; |
295 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | 299 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; |
296 | #endif | 300 | #endif |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 4d449022ac9b..d60bb2beeb55 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -149,14 +149,18 @@ static void __init mpc85xx_ds_setup_arch(void) | |||
149 | ppc_md.progress("mpc85xx_ds_setup_arch()", 0); | 149 | ppc_md.progress("mpc85xx_ds_setup_arch()", 0); |
150 | 150 | ||
151 | #ifdef CONFIG_PCI | 151 | #ifdef CONFIG_PCI |
152 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { | 152 | for_each_node_by_type(np, "pci") { |
153 | struct resource rsrc; | 153 | if (of_device_is_compatible(np, "fsl,mpc8540-pci") || |
154 | of_address_to_resource(np, 0, &rsrc); | 154 | of_device_is_compatible(np, "fsl,mpc8548-pcie")) { |
155 | if ((rsrc.start & 0xfffff) == primary_phb_addr) | 155 | struct resource rsrc; |
156 | fsl_add_bridge(np, 1); | 156 | of_address_to_resource(np, 0, &rsrc); |
157 | else | 157 | if ((rsrc.start & 0xfffff) == primary_phb_addr) |
158 | fsl_add_bridge(np, 0); | 158 | fsl_add_bridge(np, 1); |
159 | else | ||
160 | fsl_add_bridge(np, 0); | ||
161 | } | ||
159 | } | 162 | } |
163 | |||
160 | uses_fsl_uli_m1575 = 1; | 164 | uses_fsl_uli_m1575 = 1; |
161 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | 165 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; |
162 | #endif | 166 | #endif |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index c379286c3730..f8b6b08af848 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -83,9 +83,17 @@ static void __init mpc85xx_mds_setup_arch(void) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | #ifdef CONFIG_PCI | 85 | #ifdef CONFIG_PCI |
86 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 86 | for_each_node_by_type(np, "pci") { |
87 | fsl_add_bridge(np, 1); | 87 | if (of_device_is_compatible(np, "fsl,mpc8540-pci") || |
88 | of_node_put(np); | 88 | of_device_is_compatible(np, "fsl,mpc8548-pcie")) { |
89 | struct resource rsrc; | ||
90 | of_address_to_resource(np, 0, &rsrc); | ||
91 | if ((rsrc.start & 0xfffff) == 0x8000) | ||
92 | fsl_add_bridge(np, 1); | ||
93 | else | ||
94 | fsl_add_bridge(np, 0); | ||
95 | } | ||
96 | } | ||
89 | #endif | 97 | #endif |
90 | 98 | ||
91 | #ifdef CONFIG_QUICC_ENGINE | 99 | #ifdef CONFIG_QUICC_ENGINE |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index 3ec9d5a25750..6879b83ef95a 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -140,7 +140,7 @@ mpc86xx_hpcn_setup_arch(void) | |||
140 | ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); | 140 | ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); |
141 | 141 | ||
142 | #ifdef CONFIG_PCI | 142 | #ifdef CONFIG_PCI |
143 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { | 143 | for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") { |
144 | struct resource rsrc; | 144 | struct resource rsrc; |
145 | of_address_to_resource(np, 0, &rsrc); | 145 | of_address_to_resource(np, 0, &rsrc); |
146 | if ((rsrc.start & 0xfffff) == 0x8000) | 146 | if ((rsrc.start & 0xfffff) == 0x8000) |
@@ -148,6 +148,7 @@ mpc86xx_hpcn_setup_arch(void) | |||
148 | else | 148 | else |
149 | fsl_add_bridge(np, 0); | 149 | fsl_add_bridge(np, 0); |
150 | } | 150 | } |
151 | |||
151 | uses_fsl_uli_m1575 = 1; | 152 | uses_fsl_uli_m1575 = 1; |
152 | ppc_md.pci_exclude_device = mpc86xx_exclude_device; | 153 | ppc_md.pci_exclude_device = mpc86xx_exclude_device; |
153 | 154 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c index f392374309b3..eb5d74e26fe9 100644 --- a/arch/powerpc/platforms/embedded6xx/linkstation.c +++ b/arch/powerpc/platforms/embedded6xx/linkstation.c | |||
@@ -91,7 +91,7 @@ static void __init linkstation_setup_arch(void) | |||
91 | #endif | 91 | #endif |
92 | 92 | ||
93 | /* Lookup PCI host bridges */ | 93 | /* Lookup PCI host bridges */ |
94 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 94 | for_each_compatible_node(np, "pci", "mpc10x-pci") |
95 | linkstation_add_bridge(np); | 95 | linkstation_add_bridge(np); |
96 | 96 | ||
97 | printk(KERN_INFO "BUFFALO Network Attached Storage Series\n"); | 97 | printk(KERN_INFO "BUFFALO Network Attached Storage Series\n"); |
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c index 96737e5608d3..a2c04b9d42b1 100644 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | |||
@@ -74,7 +74,7 @@ static void __init mpc7448_hpc2_setup_arch(void) | |||
74 | 74 | ||
75 | /* setup PCI host bridge */ | 75 | /* setup PCI host bridge */ |
76 | #ifdef CONFIG_PCI | 76 | #ifdef CONFIG_PCI |
77 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 77 | for_each_compatible_node(np, "pci", "tsi108-pci") |
78 | tsi108_setup_pci(np, MPC7448HPC2_PCI_CFG_PHYS, 0); | 78 | tsi108_setup_pci(np, MPC7448HPC2_PCI_CFG_PHYS, 0); |
79 | 79 | ||
80 | ppc_md.pci_exclude_device = mpc7448_hpc2_exclude_device; | 80 | ppc_md.pci_exclude_device = mpc7448_hpc2_exclude_device; |