diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2011-11-17 12:56:17 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-11-24 03:01:41 -0500 |
commit | 46d026ac1029daa89dd3bf8a3b458fdaab0a3893 (patch) | |
tree | eaaef690800400178534868069ff289e908ff9dc /arch/powerpc | |
parent | 543a07b17389d751dbe2683d34e79be7c10ab6ac (diff) |
powerpc/85xx: consolidate of_platform_bus_probe calls
85xx board files have a lot of duplication in *_publish_devices()/
*_declare_of_platform_devices() functions. Merge that into a single
function common to most of the boards.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/85xx/ksi8560.c | 17 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc8536_ds.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx.h | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ads.c | 18 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_cds.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_common.c | 16 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ds.c | 18 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_mds.c | 44 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 16 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/p1022_ds.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/sbc8548.c | 18 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/sbc8560.c | 18 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/socrates.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/stx_gp3.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/tqm85xx.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/xes_mpc85xx.c | 18 |
16 files changed, 40 insertions, 218 deletions
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c index bf9b1e5f10f9..0f3e68832657 100644 --- a/arch/powerpc/platforms/85xx/ksi8560.c +++ b/arch/powerpc/platforms/85xx/ksi8560.c | |||
@@ -190,22 +190,7 @@ static void ksi8560_show_cpuinfo(struct seq_file *m) | |||
190 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 190 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
191 | } | 191 | } |
192 | 192 | ||
193 | static struct of_device_id __initdata of_bus_ids[] = { | 193 | machine_device_initcall(ksi8560, mpc85xx_common_publish_devices); |
194 | { .type = "soc", }, | ||
195 | { .type = "simple-bus", }, | ||
196 | { .name = "cpm", }, | ||
197 | { .name = "localbus", }, | ||
198 | { .compatible = "gianfar", }, | ||
199 | {}, | ||
200 | }; | ||
201 | |||
202 | static int __init declare_of_platform_devices(void) | ||
203 | { | ||
204 | of_platform_bus_probe(NULL, of_bus_ids, NULL); | ||
205 | |||
206 | return 0; | ||
207 | } | ||
208 | machine_device_initcall(ksi8560, declare_of_platform_devices); | ||
209 | 194 | ||
210 | /* | 195 | /* |
211 | * Called very early, device-tree isn't unflattened | 196 | * Called very early, device-tree isn't unflattened |
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c index 6a4b2c1372f4..9ee6455c2f1e 100644 --- a/arch/powerpc/platforms/85xx/mpc8536_ds.c +++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c | |||
@@ -106,19 +106,7 @@ static void __init mpc8536_ds_setup_arch(void) | |||
106 | printk("MPC8536 DS board from Freescale Semiconductor\n"); | 106 | printk("MPC8536 DS board from Freescale Semiconductor\n"); |
107 | } | 107 | } |
108 | 108 | ||
109 | static struct of_device_id __initdata mpc8536_ds_ids[] = { | 109 | machine_device_initcall(mpc8536_ds, mpc85xx_common_publish_devices); |
110 | { .type = "soc", }, | ||
111 | { .compatible = "soc", }, | ||
112 | { .compatible = "simple-bus", }, | ||
113 | { .compatible = "gianfar", }, | ||
114 | {}, | ||
115 | }; | ||
116 | |||
117 | static int __init mpc8536_ds_publish_devices(void) | ||
118 | { | ||
119 | return of_platform_bus_probe(NULL, mpc8536_ds_ids, NULL); | ||
120 | } | ||
121 | machine_device_initcall(mpc8536_ds, mpc8536_ds_publish_devices); | ||
122 | 110 | ||
123 | machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier); | 111 | machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier); |
124 | 112 | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h index fa55e8b08505..2aa7c5dc2c7f 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx.h +++ b/arch/powerpc/platforms/85xx/mpc85xx.h | |||
@@ -1,5 +1,7 @@ | |||
1 | #ifndef MPC85xx_H | 1 | #ifndef MPC85xx_H |
2 | #define MPC85xx_H | 2 | #define MPC85xx_H |
3 | extern int mpc85xx_common_publish_devices(void); | ||
4 | |||
3 | #ifdef CONFIG_CPM2 | 5 | #ifdef CONFIG_CPM2 |
4 | extern void mpc85xx_cpm2_pic_init(void); | 6 | extern void mpc85xx_cpm2_pic_init(void); |
5 | #else | 7 | #else |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index 8b8f7a201166..986554b74d3f 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -193,23 +193,7 @@ static void mpc85xx_ads_show_cpuinfo(struct seq_file *m) | |||
193 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 193 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
194 | } | 194 | } |
195 | 195 | ||
196 | static struct of_device_id __initdata of_bus_ids[] = { | 196 | machine_device_initcall(mpc85xx_ads, mpc85xx_common_publish_devices); |
197 | { .name = "soc", }, | ||
198 | { .type = "soc", }, | ||
199 | { .name = "cpm", }, | ||
200 | { .name = "localbus", }, | ||
201 | { .compatible = "simple-bus", }, | ||
202 | { .compatible = "gianfar", }, | ||
203 | {}, | ||
204 | }; | ||
205 | |||
206 | static int __init declare_of_platform_devices(void) | ||
207 | { | ||
208 | of_platform_bus_probe(NULL, of_bus_ids, NULL); | ||
209 | |||
210 | return 0; | ||
211 | } | ||
212 | machine_device_initcall(mpc85xx_ads, declare_of_platform_devices); | ||
213 | 197 | ||
214 | /* | 198 | /* |
215 | * Called very early, device-tree isn't unflattened | 199 | * Called very early, device-tree isn't unflattened |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 4f68bb7b381f..f24926b00451 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -332,19 +332,7 @@ static int __init mpc85xx_cds_probe(void) | |||
332 | return of_flat_dt_is_compatible(root, "MPC85xxCDS"); | 332 | return of_flat_dt_is_compatible(root, "MPC85xxCDS"); |
333 | } | 333 | } |
334 | 334 | ||
335 | static struct of_device_id __initdata of_bus_ids[] = { | 335 | machine_device_initcall(mpc85xx_cds, mpc85xx_common_publish_devices); |
336 | { .type = "soc", }, | ||
337 | { .compatible = "soc", }, | ||
338 | { .compatible = "simple-bus", }, | ||
339 | { .compatible = "gianfar", }, | ||
340 | {}, | ||
341 | }; | ||
342 | |||
343 | static int __init declare_of_platform_devices(void) | ||
344 | { | ||
345 | return of_platform_bus_probe(NULL, of_bus_ids, NULL); | ||
346 | } | ||
347 | machine_device_initcall(mpc85xx_cds, declare_of_platform_devices); | ||
348 | 336 | ||
349 | define_machine(mpc85xx_cds) { | 337 | define_machine(mpc85xx_cds) { |
350 | .name = "MPC85xx CDS", | 338 | .name = "MPC85xx CDS", |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_common.c b/arch/powerpc/platforms/85xx/mpc85xx_common.c index 49d781c36966..fe4066817105 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_common.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_common.c | |||
@@ -11,6 +11,22 @@ | |||
11 | 11 | ||
12 | #include "mpc85xx.h" | 12 | #include "mpc85xx.h" |
13 | 13 | ||
14 | static struct of_device_id __initdata mpc85xx_common_ids[] = { | ||
15 | { .type = "soc", }, | ||
16 | { .compatible = "soc", }, | ||
17 | { .compatible = "simple-bus", }, | ||
18 | { .name = "cpm", }, | ||
19 | { .name = "localbus", }, | ||
20 | { .compatible = "gianfar", }, | ||
21 | { .compatible = "fsl,qe", }, | ||
22 | { .compatible = "fsl,cpm2", }, | ||
23 | {}, | ||
24 | }; | ||
25 | |||
26 | int __init mpc85xx_common_publish_devices(void) | ||
27 | { | ||
28 | return of_platform_bus_probe(NULL, mpc85xx_common_ids, NULL); | ||
29 | } | ||
14 | #ifdef CONFIG_CPM2 | 30 | #ifdef CONFIG_CPM2 |
15 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) | 31 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) |
16 | { | 32 | { |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 55075b966b62..2113120c5a7d 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -221,21 +221,9 @@ static int __init mpc8544_ds_probe(void) | |||
221 | return 0; | 221 | return 0; |
222 | } | 222 | } |
223 | 223 | ||
224 | static struct of_device_id __initdata mpc85xxds_ids[] = { | 224 | machine_device_initcall(mpc8544_ds, mpc85xx_common_publish_devices); |
225 | { .type = "soc", }, | 225 | machine_device_initcall(mpc8572_ds, mpc85xx_common_publish_devices); |
226 | { .compatible = "soc", }, | 226 | machine_device_initcall(p2020_ds, mpc85xx_common_publish_devices); |
227 | { .compatible = "simple-bus", }, | ||
228 | { .compatible = "gianfar", }, | ||
229 | {}, | ||
230 | }; | ||
231 | |||
232 | static int __init mpc85xxds_publish_devices(void) | ||
233 | { | ||
234 | return of_platform_bus_probe(NULL, mpc85xxds_ids, NULL); | ||
235 | } | ||
236 | machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices); | ||
237 | machine_device_initcall(mpc8572_ds, mpc85xxds_publish_devices); | ||
238 | machine_device_initcall(p2020_ds, mpc85xxds_publish_devices); | ||
239 | 227 | ||
240 | machine_arch_initcall(mpc8544_ds, swiotlb_setup_bus_notifier); | 228 | machine_arch_initcall(mpc8544_ds, swiotlb_setup_bus_notifier); |
241 | machine_arch_initcall(mpc8572_ds, swiotlb_setup_bus_notifier); | 229 | machine_arch_initcall(mpc8572_ds, swiotlb_setup_bus_notifier); |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index 9270da42b8bf..38cb473a52d9 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -160,25 +160,6 @@ extern void __init mpc85xx_smp_init(void); | |||
160 | #endif | 160 | #endif |
161 | 161 | ||
162 | #ifdef CONFIG_QUICC_ENGINE | 162 | #ifdef CONFIG_QUICC_ENGINE |
163 | static struct of_device_id mpc85xx_qe_ids[] __initdata = { | ||
164 | { .type = "qe", }, | ||
165 | { .compatible = "fsl,qe", }, | ||
166 | { }, | ||
167 | }; | ||
168 | |||
169 | static void __init mpc85xx_publish_qe_devices(void) | ||
170 | { | ||
171 | struct device_node *np; | ||
172 | |||
173 | np = of_find_compatible_node(NULL, NULL, "fsl,qe"); | ||
174 | if (!of_device_is_available(np)) { | ||
175 | of_node_put(np); | ||
176 | return; | ||
177 | } | ||
178 | |||
179 | of_platform_bus_probe(NULL, mpc85xx_qe_ids, NULL); | ||
180 | } | ||
181 | |||
182 | static void __init mpc85xx_mds_reset_ucc_phys(void) | 163 | static void __init mpc85xx_mds_reset_ucc_phys(void) |
183 | { | 164 | { |
184 | struct device_node *np; | 165 | struct device_node *np; |
@@ -349,7 +330,6 @@ static void __init mpc85xx_mds_qeic_init(void) | |||
349 | of_node_put(np); | 330 | of_node_put(np); |
350 | } | 331 | } |
351 | #else | 332 | #else |
352 | static void __init mpc85xx_publish_qe_devices(void) { } | ||
353 | static void __init mpc85xx_mds_qe_init(void) { } | 333 | static void __init mpc85xx_mds_qe_init(void) { } |
354 | static void __init mpc85xx_mds_qeic_init(void) { } | 334 | static void __init mpc85xx_mds_qeic_init(void) { } |
355 | #endif /* CONFIG_QUICC_ENGINE */ | 335 | #endif /* CONFIG_QUICC_ENGINE */ |
@@ -431,24 +411,12 @@ machine_arch_initcall(mpc8568_mds, board_fixups); | |||
431 | machine_arch_initcall(mpc8569_mds, board_fixups); | 411 | machine_arch_initcall(mpc8569_mds, board_fixups); |
432 | 412 | ||
433 | static struct of_device_id mpc85xx_ids[] = { | 413 | static struct of_device_id mpc85xx_ids[] = { |
434 | { .type = "soc", }, | ||
435 | { .compatible = "soc", }, | ||
436 | { .compatible = "simple-bus", }, | ||
437 | { .compatible = "gianfar", }, | ||
438 | { .compatible = "fsl,srio", }, | 414 | { .compatible = "fsl,srio", }, |
439 | { .compatible = "fsl,mpc8548-guts", }, | 415 | { .compatible = "fsl,mpc8548-guts", }, |
440 | { .compatible = "gpio-leds", }, | 416 | { .compatible = "gpio-leds", }, |
441 | {}, | 417 | {}, |
442 | }; | 418 | }; |
443 | 419 | ||
444 | static struct of_device_id p1021_ids[] = { | ||
445 | { .type = "soc", }, | ||
446 | { .compatible = "soc", }, | ||
447 | { .compatible = "simple-bus", }, | ||
448 | { .compatible = "gianfar", }, | ||
449 | {}, | ||
450 | }; | ||
451 | |||
452 | static int __init mpc85xx_publish_devices(void) | 420 | static int __init mpc85xx_publish_devices(void) |
453 | { | 421 | { |
454 | if (machine_is(mpc8568_mds)) | 422 | if (machine_is(mpc8568_mds)) |
@@ -456,23 +424,15 @@ static int __init mpc85xx_publish_devices(void) | |||
456 | if (machine_is(mpc8569_mds)) | 424 | if (machine_is(mpc8569_mds)) |
457 | simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio"); | 425 | simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio"); |
458 | 426 | ||
427 | mpc85xx_common_publish_devices(); | ||
459 | of_platform_bus_probe(NULL, mpc85xx_ids, NULL); | 428 | of_platform_bus_probe(NULL, mpc85xx_ids, NULL); |
460 | mpc85xx_publish_qe_devices(); | ||
461 | |||
462 | return 0; | ||
463 | } | ||
464 | |||
465 | static int __init p1021_publish_devices(void) | ||
466 | { | ||
467 | of_platform_bus_probe(NULL, p1021_ids, NULL); | ||
468 | mpc85xx_publish_qe_devices(); | ||
469 | 429 | ||
470 | return 0; | 430 | return 0; |
471 | } | 431 | } |
472 | 432 | ||
473 | machine_device_initcall(mpc8568_mds, mpc85xx_publish_devices); | 433 | machine_device_initcall(mpc8568_mds, mpc85xx_publish_devices); |
474 | machine_device_initcall(mpc8569_mds, mpc85xx_publish_devices); | 434 | machine_device_initcall(mpc8569_mds, mpc85xx_publish_devices); |
475 | machine_device_initcall(p1021_mds, p1021_publish_devices); | 435 | machine_device_initcall(p1021_mds, mpc85xx_common_publish_devices); |
476 | 436 | ||
477 | machine_arch_initcall(mpc8568_mds, swiotlb_setup_bus_notifier); | 437 | machine_arch_initcall(mpc8568_mds, swiotlb_setup_bus_notifier); |
478 | machine_arch_initcall(mpc8569_mds, swiotlb_setup_bus_notifier); | 438 | machine_arch_initcall(mpc8569_mds, swiotlb_setup_bus_notifier); |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index 824d2b676d56..9feccbbd4d96 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c | |||
@@ -111,20 +111,8 @@ static void __init mpc85xx_rdb_setup_arch(void) | |||
111 | printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n"); | 111 | printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n"); |
112 | } | 112 | } |
113 | 113 | ||
114 | static struct of_device_id __initdata mpc85xxrdb_ids[] = { | 114 | machine_device_initcall(p2020_rdb, mpc85xx_common_publish_devices); |
115 | { .type = "soc", }, | 115 | machine_device_initcall(p1020_rdb, mpc85xx_common_publish_devices); |
116 | { .compatible = "soc", }, | ||
117 | { .compatible = "simple-bus", }, | ||
118 | { .compatible = "gianfar", }, | ||
119 | {}, | ||
120 | }; | ||
121 | |||
122 | static int __init mpc85xxrdb_publish_devices(void) | ||
123 | { | ||
124 | return of_platform_bus_probe(NULL, mpc85xxrdb_ids, NULL); | ||
125 | } | ||
126 | machine_device_initcall(p2020_rdb, mpc85xxrdb_publish_devices); | ||
127 | machine_device_initcall(p1020_rdb, mpc85xxrdb_publish_devices); | ||
128 | 116 | ||
129 | /* | 117 | /* |
130 | * Called very early, device-tree isn't unflattened | 118 | * Called very early, device-tree isn't unflattened |
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c index c75ec1c8ea65..2bf4342ab656 100644 --- a/arch/powerpc/platforms/85xx/p1022_ds.c +++ b/arch/powerpc/platforms/85xx/p1022_ds.c | |||
@@ -327,10 +327,6 @@ static void __init p1022_ds_setup_arch(void) | |||
327 | } | 327 | } |
328 | 328 | ||
329 | static struct of_device_id __initdata p1022_ds_ids[] = { | 329 | static struct of_device_id __initdata p1022_ds_ids[] = { |
330 | { .type = "soc", }, | ||
331 | { .compatible = "soc", }, | ||
332 | { .compatible = "simple-bus", }, | ||
333 | { .compatible = "gianfar", }, | ||
334 | /* So that the DMA channel nodes can be probed individually: */ | 330 | /* So that the DMA channel nodes can be probed individually: */ |
335 | { .compatible = "fsl,eloplus-dma", }, | 331 | { .compatible = "fsl,eloplus-dma", }, |
336 | {}, | 332 | {}, |
@@ -338,6 +334,7 @@ static struct of_device_id __initdata p1022_ds_ids[] = { | |||
338 | 334 | ||
339 | static int __init p1022_ds_publish_devices(void) | 335 | static int __init p1022_ds_publish_devices(void) |
340 | { | 336 | { |
337 | mpc85xx_common_publish_devices(); | ||
341 | return of_platform_bus_probe(NULL, p1022_ds_ids, NULL); | 338 | return of_platform_bus_probe(NULL, p1022_ds_ids, NULL); |
342 | } | 339 | } |
343 | machine_device_initcall(p1022_ds, p1022_ds_publish_devices); | 340 | machine_device_initcall(p1022_ds, p1022_ds_publish_devices); |
diff --git a/arch/powerpc/platforms/85xx/sbc8548.c b/arch/powerpc/platforms/85xx/sbc8548.c index 14632a971225..845ed3b89462 100644 --- a/arch/powerpc/platforms/85xx/sbc8548.c +++ b/arch/powerpc/platforms/85xx/sbc8548.c | |||
@@ -48,6 +48,8 @@ | |||
48 | #include <sysdev/fsl_soc.h> | 48 | #include <sysdev/fsl_soc.h> |
49 | #include <sysdev/fsl_pci.h> | 49 | #include <sysdev/fsl_pci.h> |
50 | 50 | ||
51 | #include "mpc85xx.h" | ||
52 | |||
51 | static int sbc_rev; | 53 | static int sbc_rev; |
52 | 54 | ||
53 | static void __init sbc8548_pic_init(void) | 55 | static void __init sbc8548_pic_init(void) |
@@ -149,21 +151,7 @@ static void sbc8548_show_cpuinfo(struct seq_file *m) | |||
149 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 151 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
150 | } | 152 | } |
151 | 153 | ||
152 | static struct of_device_id __initdata of_bus_ids[] = { | 154 | machine_device_initcall(sbc8548, mpc85xx_common_publish_devices); |
153 | { .name = "soc", }, | ||
154 | { .type = "soc", }, | ||
155 | { .compatible = "simple-bus", }, | ||
156 | { .compatible = "gianfar", }, | ||
157 | {}, | ||
158 | }; | ||
159 | |||
160 | static int __init declare_of_platform_devices(void) | ||
161 | { | ||
162 | of_platform_bus_probe(NULL, of_bus_ids, NULL); | ||
163 | |||
164 | return 0; | ||
165 | } | ||
166 | machine_device_initcall(sbc8548, declare_of_platform_devices); | ||
167 | 155 | ||
168 | /* | 156 | /* |
169 | * Called very early, device-tree isn't unflattened | 157 | * Called very early, device-tree isn't unflattened |
diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c index 43711f895778..e9a7ed228d73 100644 --- a/arch/powerpc/platforms/85xx/sbc8560.c +++ b/arch/powerpc/platforms/85xx/sbc8560.c | |||
@@ -180,23 +180,7 @@ static void sbc8560_show_cpuinfo(struct seq_file *m) | |||
180 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 180 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
181 | } | 181 | } |
182 | 182 | ||
183 | static struct of_device_id __initdata of_bus_ids[] = { | 183 | machine_device_initcall(sbc8560, mpc85xx_common_publish_devices); |
184 | { .name = "soc", }, | ||
185 | { .type = "soc", }, | ||
186 | { .name = "cpm", }, | ||
187 | { .name = "localbus", }, | ||
188 | { .compatible = "simple-bus", }, | ||
189 | { .compatible = "gianfar", }, | ||
190 | {}, | ||
191 | }; | ||
192 | |||
193 | static int __init declare_of_platform_devices(void) | ||
194 | { | ||
195 | of_platform_bus_probe(NULL, of_bus_ids, NULL); | ||
196 | |||
197 | return 0; | ||
198 | } | ||
199 | machine_device_initcall(sbc8560, declare_of_platform_devices); | ||
200 | 184 | ||
201 | /* | 185 | /* |
202 | * Called very early, device-tree isn't unflattened | 186 | * Called very early, device-tree isn't unflattened |
diff --git a/arch/powerpc/platforms/85xx/socrates.c b/arch/powerpc/platforms/85xx/socrates.c index 9d0fc283c1a1..fec496ad79c0 100644 --- a/arch/powerpc/platforms/85xx/socrates.c +++ b/arch/powerpc/platforms/85xx/socrates.c | |||
@@ -97,17 +97,7 @@ static void __init socrates_setup_arch(void) | |||
97 | #endif | 97 | #endif |
98 | } | 98 | } |
99 | 99 | ||
100 | static struct of_device_id __initdata socrates_of_bus_ids[] = { | 100 | machine_device_initcall(socrates, mpc85xx_common_publish_devices); |
101 | { .compatible = "simple-bus", }, | ||
102 | { .compatible = "gianfar", }, | ||
103 | {}, | ||
104 | }; | ||
105 | |||
106 | static int __init socrates_publish_devices(void) | ||
107 | { | ||
108 | return of_platform_bus_probe(NULL, socrates_of_bus_ids, NULL); | ||
109 | } | ||
110 | machine_device_initcall(socrates, socrates_publish_devices); | ||
111 | 101 | ||
112 | /* | 102 | /* |
113 | * Called very early, device-tree isn't unflattened | 103 | * Called very early, device-tree isn't unflattened |
diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c b/arch/powerpc/platforms/85xx/stx_gp3.c index d24192b70823..b44c936c2653 100644 --- a/arch/powerpc/platforms/85xx/stx_gp3.c +++ b/arch/powerpc/platforms/85xx/stx_gp3.c | |||
@@ -113,19 +113,7 @@ static void stx_gp3_show_cpuinfo(struct seq_file *m) | |||
113 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | 113 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); |
114 | } | 114 | } |
115 | 115 | ||
116 | static struct of_device_id __initdata of_bus_ids[] = { | 116 | machine_device_initcall(stx_gp3, mpc85xx_common_publish_devices); |
117 | { .compatible = "simple-bus", }, | ||
118 | { .compatible = "gianfar", }, | ||
119 | {}, | ||
120 | }; | ||
121 | |||
122 | static int __init declare_of_platform_devices(void) | ||
123 | { | ||
124 | of_platform_bus_probe(NULL, of_bus_ids, NULL); | ||
125 | |||
126 | return 0; | ||
127 | } | ||
128 | machine_device_initcall(stx_gp3, declare_of_platform_devices); | ||
129 | 117 | ||
130 | /* | 118 | /* |
131 | * Called very early, device-tree isn't unflattened | 119 | * Called very early, device-tree isn't unflattened |
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c index b9e53ccf1143..2418bf8d074b 100644 --- a/arch/powerpc/platforms/85xx/tqm85xx.c +++ b/arch/powerpc/platforms/85xx/tqm85xx.c | |||
@@ -142,19 +142,7 @@ static void __init tqm85xx_ti1520_fixup(struct pci_dev *pdev) | |||
142 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1520, | 142 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1520, |
143 | tqm85xx_ti1520_fixup); | 143 | tqm85xx_ti1520_fixup); |
144 | 144 | ||
145 | static struct of_device_id __initdata of_bus_ids[] = { | 145 | machine_device_initcall(tqm85xx, mpc85xx_common_publish_devices); |
146 | { .compatible = "simple-bus", }, | ||
147 | { .compatible = "gianfar", }, | ||
148 | {}, | ||
149 | }; | ||
150 | |||
151 | static int __init declare_of_platform_devices(void) | ||
152 | { | ||
153 | of_platform_bus_probe(NULL, of_bus_ids, NULL); | ||
154 | |||
155 | return 0; | ||
156 | } | ||
157 | machine_device_initcall(tqm85xx, declare_of_platform_devices); | ||
158 | 146 | ||
159 | static const char *board[] __initdata = { | 147 | static const char *board[] __initdata = { |
160 | "tqc,tqm8540", | 148 | "tqc,tqm8540", |
diff --git a/arch/powerpc/platforms/85xx/xes_mpc85xx.c b/arch/powerpc/platforms/85xx/xes_mpc85xx.c index ab7025a7e9a5..4632c1b27da7 100644 --- a/arch/powerpc/platforms/85xx/xes_mpc85xx.c +++ b/arch/powerpc/platforms/85xx/xes_mpc85xx.c | |||
@@ -179,21 +179,9 @@ static void __init xes_mpc85xx_setup_arch(void) | |||
179 | #endif | 179 | #endif |
180 | } | 180 | } |
181 | 181 | ||
182 | static struct of_device_id __initdata xes_mpc85xx_ids[] = { | 182 | machine_device_initcall(xes_mpc8572, mpc85xx_common_publish_devices); |
183 | { .type = "soc", }, | 183 | machine_device_initcall(xes_mpc8548, mpc85xx_common_publish_devices); |
184 | { .compatible = "soc", }, | 184 | machine_device_initcall(xes_mpc8540, mpc85xx_common_publish_devices); |
185 | { .compatible = "simple-bus", }, | ||
186 | { .compatible = "gianfar", }, | ||
187 | {}, | ||
188 | }; | ||
189 | |||
190 | static int __init xes_mpc85xx_publish_devices(void) | ||
191 | { | ||
192 | return of_platform_bus_probe(NULL, xes_mpc85xx_ids, NULL); | ||
193 | } | ||
194 | machine_device_initcall(xes_mpc8572, xes_mpc85xx_publish_devices); | ||
195 | machine_device_initcall(xes_mpc8548, xes_mpc85xx_publish_devices); | ||
196 | machine_device_initcall(xes_mpc8540, xes_mpc85xx_publish_devices); | ||
197 | 185 | ||
198 | /* | 186 | /* |
199 | * Called very early, device-tree isn't unflattened | 187 | * Called very early, device-tree isn't unflattened |