diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-07-05 01:04:05 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-07-21 05:06:42 -0400 |
commit | 565713840445b7ccafb28dc1230d57d40bcb42a5 (patch) | |
tree | 012a5f6d943b583473f21b3390a0389a13dfea3b | |
parent | 406b0b6ae3fcd5c7946a68a9e43b470c79d292a2 (diff) |
powerpc: Move 32-bit probe() machine to later in the boot process
This converts all the 32-bit platforms to use the expanded device-tree
which is a pretty mechanical change. Unlike 64-bit, the 32-bit kernel
didn't rely on platform initializations to setup the MMU since it
sets it up entirely before probe_machine() so the move has comparatively
less consequences though it's a bigger patch.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
83 files changed, 120 insertions, 289 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 3f0aca2b7f63..e7bb4e76896a 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -113,23 +113,7 @@ notrace void __init machine_init(u64 dt_ptr) | |||
113 | 113 | ||
114 | early_init_mmu(); | 114 | early_init_mmu(); |
115 | 115 | ||
116 | probe_machine(); | ||
117 | |||
118 | setup_kdump_trampoline(); | 116 | setup_kdump_trampoline(); |
119 | |||
120 | #ifdef CONFIG_6xx | ||
121 | if (cpu_has_feature(CPU_FTR_CAN_DOZE) || | ||
122 | cpu_has_feature(CPU_FTR_CAN_NAP)) | ||
123 | ppc_md.power_save = ppc6xx_idle; | ||
124 | #endif | ||
125 | |||
126 | #ifdef CONFIG_E500 | ||
127 | if (cpu_has_feature(CPU_FTR_CAN_DOZE) || | ||
128 | cpu_has_feature(CPU_FTR_CAN_NAP)) | ||
129 | ppc_md.power_save = e500_idle; | ||
130 | #endif | ||
131 | if (ppc_md.progress) | ||
132 | ppc_md.progress("id mach(): done", 0x200); | ||
133 | } | 117 | } |
134 | 118 | ||
135 | /* Checks "l2cr=xxxx" command-line option */ | 119 | /* Checks "l2cr=xxxx" command-line option */ |
@@ -249,6 +233,21 @@ static void __init exc_lvl_early_init(void) | |||
249 | #define exc_lvl_early_init() | 233 | #define exc_lvl_early_init() |
250 | #endif | 234 | #endif |
251 | 235 | ||
236 | static void setup_power_save(void) | ||
237 | { | ||
238 | #ifdef CONFIG_6xx | ||
239 | if (cpu_has_feature(CPU_FTR_CAN_DOZE) || | ||
240 | cpu_has_feature(CPU_FTR_CAN_NAP)) | ||
241 | ppc_md.power_save = ppc6xx_idle; | ||
242 | #endif | ||
243 | |||
244 | #ifdef CONFIG_E500 | ||
245 | if (cpu_has_feature(CPU_FTR_CAN_DOZE) || | ||
246 | cpu_has_feature(CPU_FTR_CAN_NAP)) | ||
247 | ppc_md.power_save = e500_idle; | ||
248 | #endif | ||
249 | } | ||
250 | |||
252 | /* Warning, IO base is not yet inited */ | 251 | /* Warning, IO base is not yet inited */ |
253 | void __init setup_arch(char **cmdline_p) | 252 | void __init setup_arch(char **cmdline_p) |
254 | { | 253 | { |
@@ -260,6 +259,10 @@ void __init setup_arch(char **cmdline_p) | |||
260 | unflatten_device_tree(); | 259 | unflatten_device_tree(); |
261 | check_for_initrd(); | 260 | check_for_initrd(); |
262 | 261 | ||
262 | probe_machine(); | ||
263 | |||
264 | setup_power_save(); | ||
265 | |||
263 | if (ppc_md.init_early) | 266 | if (ppc_md.init_early) |
264 | ppc_md.init_early(); | 267 | ppc_md.init_early(); |
265 | 268 | ||
diff --git a/arch/powerpc/platforms/40x/ep405.c b/arch/powerpc/platforms/40x/ep405.c index ddc12a1926ef..1c8aec6e9bb7 100644 --- a/arch/powerpc/platforms/40x/ep405.c +++ b/arch/powerpc/platforms/40x/ep405.c | |||
@@ -105,9 +105,7 @@ static void __init ep405_setup_arch(void) | |||
105 | 105 | ||
106 | static int __init ep405_probe(void) | 106 | static int __init ep405_probe(void) |
107 | { | 107 | { |
108 | unsigned long root = of_get_flat_dt_root(); | 108 | if (!of_machine_is_compatible("ep405")) |
109 | |||
110 | if (!of_flat_dt_is_compatible(root, "ep405")) | ||
111 | return 0; | 109 | return 0; |
112 | 110 | ||
113 | return 1; | 111 | return 1; |
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c index b0c46375dd95..2a050007bbae 100644 --- a/arch/powerpc/platforms/40x/ppc40x_simple.c +++ b/arch/powerpc/platforms/40x/ppc40x_simple.c | |||
@@ -63,7 +63,7 @@ static const char * const board[] __initconst = { | |||
63 | 63 | ||
64 | static int __init ppc40x_probe(void) | 64 | static int __init ppc40x_probe(void) |
65 | { | 65 | { |
66 | if (of_flat_dt_match(of_get_flat_dt_root(), board)) { | 66 | if (of_device_compatible_match(of_root, board)) { |
67 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); | 67 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); |
68 | return 1; | 68 | return 1; |
69 | } | 69 | } |
diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c index 9aa7ae2f4164..91a08ea758a8 100644 --- a/arch/powerpc/platforms/40x/virtex.c +++ b/arch/powerpc/platforms/40x/virtex.c | |||
@@ -37,9 +37,7 @@ machine_device_initcall(virtex, virtex_device_probe); | |||
37 | 37 | ||
38 | static int __init virtex_probe(void) | 38 | static int __init virtex_probe(void) |
39 | { | 39 | { |
40 | unsigned long root = of_get_flat_dt_root(); | 40 | if (!of_machine_is_compatible("xlnx,virtex")) |
41 | |||
42 | if (!of_flat_dt_is_compatible(root, "xlnx,virtex")) | ||
43 | return 0; | 41 | return 0; |
44 | 42 | ||
45 | return 1; | 43 | return 1; |
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c index f7ac2d0fcb44..e5797815e2f1 100644 --- a/arch/powerpc/platforms/40x/walnut.c +++ b/arch/powerpc/platforms/40x/walnut.c | |||
@@ -46,9 +46,7 @@ machine_device_initcall(walnut, walnut_device_probe); | |||
46 | 46 | ||
47 | static int __init walnut_probe(void) | 47 | static int __init walnut_probe(void) |
48 | { | 48 | { |
49 | unsigned long root = of_get_flat_dt_root(); | 49 | if (!of_machine_is_compatible("ibm,walnut")) |
50 | |||
51 | if (!of_flat_dt_is_compatible(root, "ibm,walnut")) | ||
52 | return 0; | 50 | return 0; |
53 | 51 | ||
54 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); | 52 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); |
diff --git a/arch/powerpc/platforms/44x/canyonlands.c b/arch/powerpc/platforms/44x/canyonlands.c index 22ca5430c9cb..157f4ce46386 100644 --- a/arch/powerpc/platforms/44x/canyonlands.c +++ b/arch/powerpc/platforms/44x/canyonlands.c | |||
@@ -53,11 +53,10 @@ machine_device_initcall(canyonlands, ppc460ex_device_probe); | |||
53 | 53 | ||
54 | static int __init ppc460ex_probe(void) | 54 | static int __init ppc460ex_probe(void) |
55 | { | 55 | { |
56 | unsigned long root = of_get_flat_dt_root(); | 56 | if (of_machine_is_compatible("amcc,canyonlands")) { |
57 | if (of_flat_dt_is_compatible(root, "amcc,canyonlands")) { | ||
58 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); | 57 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); |
59 | return 1; | 58 | return 1; |
60 | } | 59 | } |
61 | return 0; | 60 | return 0; |
62 | } | 61 | } |
63 | 62 | ||
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c index ae893226392d..1070225f5f9b 100644 --- a/arch/powerpc/platforms/44x/ebony.c +++ b/arch/powerpc/platforms/44x/ebony.c | |||
@@ -49,9 +49,7 @@ machine_device_initcall(ebony, ebony_device_probe); | |||
49 | */ | 49 | */ |
50 | static int __init ebony_probe(void) | 50 | static int __init ebony_probe(void) |
51 | { | 51 | { |
52 | unsigned long root = of_get_flat_dt_root(); | 52 | if (!of_machine_is_compatible("ibm,ebony")) |
53 | |||
54 | if (!of_flat_dt_is_compatible(root, "ibm,ebony")) | ||
55 | return 0; | 53 | return 0; |
56 | 54 | ||
57 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); | 55 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); |
diff --git a/arch/powerpc/platforms/44x/iss4xx.c b/arch/powerpc/platforms/44x/iss4xx.c index c7c6758b3cfe..5f296dd6b1c0 100644 --- a/arch/powerpc/platforms/44x/iss4xx.c +++ b/arch/powerpc/platforms/44x/iss4xx.c | |||
@@ -149,9 +149,7 @@ static void __init iss4xx_setup_arch(void) | |||
149 | */ | 149 | */ |
150 | static int __init iss4xx_probe(void) | 150 | static int __init iss4xx_probe(void) |
151 | { | 151 | { |
152 | unsigned long root = of_get_flat_dt_root(); | 152 | if (!of_machine_is_compatible("ibm,iss-4xx")) |
153 | |||
154 | if (!of_flat_dt_is_compatible(root, "ibm,iss-4xx")) | ||
155 | return 0; | 153 | return 0; |
156 | 154 | ||
157 | return 1; | 155 | return 1; |
diff --git a/arch/powerpc/platforms/44x/ppc44x_simple.c b/arch/powerpc/platforms/44x/ppc44x_simple.c index 573c3d2689c6..8d6e4da9dfbe 100644 --- a/arch/powerpc/platforms/44x/ppc44x_simple.c +++ b/arch/powerpc/platforms/44x/ppc44x_simple.c | |||
@@ -67,11 +67,10 @@ static char *board[] __initdata = { | |||
67 | 67 | ||
68 | static int __init ppc44x_probe(void) | 68 | static int __init ppc44x_probe(void) |
69 | { | 69 | { |
70 | unsigned long root = of_get_flat_dt_root(); | ||
71 | int i = 0; | 70 | int i = 0; |
72 | 71 | ||
73 | for (i = 0; i < ARRAY_SIZE(board); i++) { | 72 | for (i = 0; i < ARRAY_SIZE(board); i++) { |
74 | if (of_flat_dt_is_compatible(root, board[i])) { | 73 | if (of_machine_is_compatible(board[i])) { |
75 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); | 74 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); |
76 | return 1; | 75 | return 1; |
77 | } | 76 | } |
diff --git a/arch/powerpc/platforms/44x/ppc476.c b/arch/powerpc/platforms/44x/ppc476.c index 003973f65297..e55933f9cd55 100644 --- a/arch/powerpc/platforms/44x/ppc476.c +++ b/arch/powerpc/platforms/44x/ppc476.c | |||
@@ -275,12 +275,10 @@ static void ppc47x_pci_irq_fixup(struct pci_dev *dev) | |||
275 | */ | 275 | */ |
276 | static int __init ppc47x_probe(void) | 276 | static int __init ppc47x_probe(void) |
277 | { | 277 | { |
278 | unsigned long root = of_get_flat_dt_root(); | 278 | if (of_machine_is_compatible("ibm,akebono")) |
279 | |||
280 | if (of_flat_dt_is_compatible(root, "ibm,akebono")) | ||
281 | return 1; | 279 | return 1; |
282 | 280 | ||
283 | if (of_flat_dt_is_compatible(root, "ibm,currituck")) { | 281 | if (of_machine_is_compatible("ibm,currituck")) { |
284 | ppc_md.pci_irq_fixup = ppc47x_pci_irq_fixup; | 282 | ppc_md.pci_irq_fixup = ppc47x_pci_irq_fixup; |
285 | return 1; | 283 | return 1; |
286 | } | 284 | } |
diff --git a/arch/powerpc/platforms/44x/sam440ep.c b/arch/powerpc/platforms/44x/sam440ep.c index 3ee4a03c1496..688ffeab0699 100644 --- a/arch/powerpc/platforms/44x/sam440ep.c +++ b/arch/powerpc/platforms/44x/sam440ep.c | |||
@@ -46,9 +46,7 @@ machine_device_initcall(sam440ep, sam440ep_device_probe); | |||
46 | 46 | ||
47 | static int __init sam440ep_probe(void) | 47 | static int __init sam440ep_probe(void) |
48 | { | 48 | { |
49 | unsigned long root = of_get_flat_dt_root(); | 49 | if (!of_machine_is_compatible("acube,sam440ep")) |
50 | |||
51 | if (!of_flat_dt_is_compatible(root, "acube,sam440ep")) | ||
52 | return 0; | 50 | return 0; |
53 | 51 | ||
54 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); | 52 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); |
diff --git a/arch/powerpc/platforms/44x/virtex.c b/arch/powerpc/platforms/44x/virtex.c index ad272c17c640..a7e08026097a 100644 --- a/arch/powerpc/platforms/44x/virtex.c +++ b/arch/powerpc/platforms/44x/virtex.c | |||
@@ -43,9 +43,7 @@ machine_device_initcall(virtex, virtex_device_probe); | |||
43 | 43 | ||
44 | static int __init virtex_probe(void) | 44 | static int __init virtex_probe(void) |
45 | { | 45 | { |
46 | unsigned long root = of_get_flat_dt_root(); | 46 | if (!of_machine_is_compatible("xlnx,virtex440")) |
47 | |||
48 | if (!of_flat_dt_is_compatible(root, "xlnx,virtex440")) | ||
49 | return 0; | 47 | return 0; |
50 | 48 | ||
51 | return 1; | 49 | return 1; |
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c index 501333cf42cf..5ecce543103e 100644 --- a/arch/powerpc/platforms/44x/warp.c +++ b/arch/powerpc/platforms/44x/warp.c | |||
@@ -44,9 +44,7 @@ machine_device_initcall(warp, warp_device_probe); | |||
44 | 44 | ||
45 | static int __init warp_probe(void) | 45 | static int __init warp_probe(void) |
46 | { | 46 | { |
47 | unsigned long root = of_get_flat_dt_root(); | 47 | if (!of_machine_is_compatible("pika,warp")) |
48 | |||
49 | if (!of_flat_dt_is_compatible(root, "pika,warp")) | ||
50 | return 0; | 48 | return 0; |
51 | 49 | ||
52 | /* For __dma_alloc_coherent */ | 50 | /* For __dma_alloc_coherent */ |
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c index 3e90ece10ae9..4e03f04e3a1f 100644 --- a/arch/powerpc/platforms/512x/mpc5121_ads.c +++ b/arch/powerpc/platforms/512x/mpc5121_ads.c | |||
@@ -57,9 +57,7 @@ static void __init mpc5121_ads_init_IRQ(void) | |||
57 | */ | 57 | */ |
58 | static int __init mpc5121_ads_probe(void) | 58 | static int __init mpc5121_ads_probe(void) |
59 | { | 59 | { |
60 | unsigned long root = of_get_flat_dt_root(); | 60 | return of_machine_is_compatible("fsl,mpc5121ads"); |
61 | |||
62 | return of_flat_dt_is_compatible(root, "fsl,mpc5121ads"); | ||
63 | } | 61 | } |
64 | 62 | ||
65 | define_machine(mpc5121_ads) { | 63 | define_machine(mpc5121_ads) { |
diff --git a/arch/powerpc/platforms/512x/mpc512x_generic.c b/arch/powerpc/platforms/512x/mpc512x_generic.c index ce71408781a0..87eba1753088 100644 --- a/arch/powerpc/platforms/512x/mpc512x_generic.c +++ b/arch/powerpc/platforms/512x/mpc512x_generic.c | |||
@@ -38,7 +38,7 @@ static const char * const board[] __initconst = { | |||
38 | */ | 38 | */ |
39 | static int __init mpc512x_generic_probe(void) | 39 | static int __init mpc512x_generic_probe(void) |
40 | { | 40 | { |
41 | return of_flat_dt_match(of_get_flat_dt_root(), board); | 41 | return of_device_compatible_match(of_root, board); |
42 | } | 42 | } |
43 | 43 | ||
44 | define_machine(mpc512x_generic) { | 44 | define_machine(mpc512x_generic) { |
diff --git a/arch/powerpc/platforms/512x/pdm360ng.c b/arch/powerpc/platforms/512x/pdm360ng.c index 116f2325b20b..f9cad19a33ab 100644 --- a/arch/powerpc/platforms/512x/pdm360ng.c +++ b/arch/powerpc/platforms/512x/pdm360ng.c | |||
@@ -113,9 +113,7 @@ void __init pdm360ng_init(void) | |||
113 | 113 | ||
114 | static int __init pdm360ng_probe(void) | 114 | static int __init pdm360ng_probe(void) |
115 | { | 115 | { |
116 | unsigned long root = of_get_flat_dt_root(); | 116 | return of_machine_is_compatible("ifm,pdm360ng"); |
117 | |||
118 | return of_flat_dt_is_compatible(root, "ifm,pdm360ng"); | ||
119 | } | 117 | } |
120 | 118 | ||
121 | define_machine(pdm360ng) { | 119 | define_machine(pdm360ng) { |
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c index 6af651e69129..39b49822ace1 100644 --- a/arch/powerpc/platforms/52xx/efika.c +++ b/arch/powerpc/platforms/52xx/efika.c | |||
@@ -200,8 +200,7 @@ static void __init efika_setup_arch(void) | |||
200 | 200 | ||
201 | static int __init efika_probe(void) | 201 | static int __init efika_probe(void) |
202 | { | 202 | { |
203 | const char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), | 203 | const char *model = of_get_property(of_root, "model", NULL); |
204 | "model", NULL); | ||
205 | 204 | ||
206 | if (model == NULL) | 205 | if (model == NULL) |
207 | return 0; | 206 | return 0; |
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index 7492de3cf6d0..c94c385cc919 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c | |||
@@ -183,7 +183,7 @@ static const char * const board[] __initconst = { | |||
183 | */ | 183 | */ |
184 | static int __init lite5200_probe(void) | 184 | static int __init lite5200_probe(void) |
185 | { | 185 | { |
186 | return of_flat_dt_match(of_get_flat_dt_root(), board); | 186 | return of_device_compatible_match(of_root, board); |
187 | } | 187 | } |
188 | 188 | ||
189 | define_machine(lite5200) { | 189 | define_machine(lite5200) { |
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c index 8fb95480fd73..a3227040cc86 100644 --- a/arch/powerpc/platforms/52xx/media5200.c +++ b/arch/powerpc/platforms/52xx/media5200.c | |||
@@ -242,7 +242,7 @@ static const char * const board[] __initconst = { | |||
242 | */ | 242 | */ |
243 | static int __init media5200_probe(void) | 243 | static int __init media5200_probe(void) |
244 | { | 244 | { |
245 | return of_flat_dt_match(of_get_flat_dt_root(), board); | 245 | return of_device_compatible_match(of_root, board); |
246 | } | 246 | } |
247 | 247 | ||
248 | define_machine(media5200_platform) { | 248 | define_machine(media5200_platform) { |
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c index 792a301a0bf0..a80c6278d515 100644 --- a/arch/powerpc/platforms/52xx/mpc5200_simple.c +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c | |||
@@ -70,7 +70,7 @@ static const char *board[] __initdata = { | |||
70 | */ | 70 | */ |
71 | static int __init mpc5200_simple_probe(void) | 71 | static int __init mpc5200_simple_probe(void) |
72 | { | 72 | { |
73 | return of_flat_dt_match(of_get_flat_dt_root(), board); | 73 | return of_device_compatible_match(of_root, board); |
74 | } | 74 | } |
75 | 75 | ||
76 | define_machine(mpc5200_simple_platform) { | 76 | define_machine(mpc5200_simple_platform) { |
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index 6781bda117be..cdab847749e6 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c | |||
@@ -309,8 +309,7 @@ machine_device_initcall(ep8248e, declare_of_platform_devices); | |||
309 | */ | 309 | */ |
310 | static int __init ep8248e_probe(void) | 310 | static int __init ep8248e_probe(void) |
311 | { | 311 | { |
312 | unsigned long root = of_get_flat_dt_root(); | 312 | return of_machine_is_compatible("fsl,ep8248e"); |
313 | return of_flat_dt_is_compatible(root, "fsl,ep8248e"); | ||
314 | } | 313 | } |
315 | 314 | ||
316 | define_machine(ep8248e) | 315 | define_machine(ep8248e) |
diff --git a/arch/powerpc/platforms/82xx/km82xx.c b/arch/powerpc/platforms/82xx/km82xx.c index 387b446f4161..28860e40b5db 100644 --- a/arch/powerpc/platforms/82xx/km82xx.c +++ b/arch/powerpc/platforms/82xx/km82xx.c | |||
@@ -198,8 +198,7 @@ machine_device_initcall(km82xx, declare_of_platform_devices); | |||
198 | */ | 198 | */ |
199 | static int __init km82xx_probe(void) | 199 | static int __init km82xx_probe(void) |
200 | { | 200 | { |
201 | unsigned long root = of_get_flat_dt_root(); | 201 | return of_machine_is_compatible("keymile,km82xx"); |
202 | return of_flat_dt_is_compatible(root, "keymile,km82xx"); | ||
203 | } | 202 | } |
204 | 203 | ||
205 | define_machine(km82xx) | 204 | define_machine(km82xx) |
diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c index d24deacf07d0..d23c10a96bde 100644 --- a/arch/powerpc/platforms/82xx/mpc8272_ads.c +++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c | |||
@@ -201,8 +201,7 @@ machine_device_initcall(mpc8272_ads, declare_of_platform_devices); | |||
201 | */ | 201 | */ |
202 | static int __init mpc8272_ads_probe(void) | 202 | static int __init mpc8272_ads_probe(void) |
203 | { | 203 | { |
204 | unsigned long root = of_get_flat_dt_root(); | 204 | return of_machine_is_compatible("fsl,mpc8272ads"); |
205 | return of_flat_dt_is_compatible(root, "fsl,mpc8272ads"); | ||
206 | } | 205 | } |
207 | 206 | ||
208 | define_machine(mpc8272_ads) | 207 | define_machine(mpc8272_ads) |
diff --git a/arch/powerpc/platforms/82xx/pq2fads.c b/arch/powerpc/platforms/82xx/pq2fads.c index 3a5164ad10ad..6c654dc74a4b 100644 --- a/arch/powerpc/platforms/82xx/pq2fads.c +++ b/arch/powerpc/platforms/82xx/pq2fads.c | |||
@@ -164,8 +164,7 @@ static void __init pq2fads_setup_arch(void) | |||
164 | */ | 164 | */ |
165 | static int __init pq2fads_probe(void) | 165 | static int __init pq2fads_probe(void) |
166 | { | 166 | { |
167 | unsigned long root = of_get_flat_dt_root(); | 167 | return of_machine_is_compatible("fsl,pq2fads"); |
168 | return of_flat_dt_is_compatible(root, "fsl,pq2fads"); | ||
169 | } | 168 | } |
170 | 169 | ||
171 | static const struct of_device_id of_bus_ids[] __initconst = { | 170 | static const struct of_device_id of_bus_ids[] __initconst = { |
diff --git a/arch/powerpc/platforms/83xx/asp834x.c b/arch/powerpc/platforms/83xx/asp834x.c index 464ea8e0292d..17e54339f8d9 100644 --- a/arch/powerpc/platforms/83xx/asp834x.c +++ b/arch/powerpc/platforms/83xx/asp834x.c | |||
@@ -43,8 +43,7 @@ machine_device_initcall(asp834x, mpc83xx_declare_of_platform_devices); | |||
43 | */ | 43 | */ |
44 | static int __init asp834x_probe(void) | 44 | static int __init asp834x_probe(void) |
45 | { | 45 | { |
46 | unsigned long root = of_get_flat_dt_root(); | 46 | return of_machine_is_compatible("analogue-and-micro,asp8347e"); |
47 | return of_flat_dt_is_compatible(root, "analogue-and-micro,asp8347e"); | ||
48 | } | 47 | } |
49 | 48 | ||
50 | define_machine(asp834x) { | 49 | define_machine(asp834x) { |
diff --git a/arch/powerpc/platforms/83xx/km83xx.c b/arch/powerpc/platforms/83xx/km83xx.c index 4bc6bbbe9ada..e7fbd6366abb 100644 --- a/arch/powerpc/platforms/83xx/km83xx.c +++ b/arch/powerpc/platforms/83xx/km83xx.c | |||
@@ -171,11 +171,10 @@ static char *board[] __initdata = { | |||
171 | */ | 171 | */ |
172 | static int __init mpc83xx_km_probe(void) | 172 | static int __init mpc83xx_km_probe(void) |
173 | { | 173 | { |
174 | unsigned long node = of_get_flat_dt_root(); | ||
175 | int i = 0; | 174 | int i = 0; |
176 | 175 | ||
177 | while (board[i]) { | 176 | while (board[i]) { |
178 | if (of_flat_dt_is_compatible(node, board[i])) | 177 | if (of_machine_is_compatible(board[i])) |
179 | break; | 178 | break; |
180 | i++; | 179 | i++; |
181 | } | 180 | } |
diff --git a/arch/powerpc/platforms/83xx/mpc830x_rdb.c b/arch/powerpc/platforms/83xx/mpc830x_rdb.c index 4f2d9fea77b7..040d5d085467 100644 --- a/arch/powerpc/platforms/83xx/mpc830x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc830x_rdb.c | |||
@@ -46,7 +46,7 @@ static const char *board[] __initdata = { | |||
46 | */ | 46 | */ |
47 | static int __init mpc830x_rdb_probe(void) | 47 | static int __init mpc830x_rdb_probe(void) |
48 | { | 48 | { |
49 | return of_flat_dt_match(of_get_flat_dt_root(), board); | 49 | return of_device_compatible_match(of_root, board); |
50 | } | 50 | } |
51 | 51 | ||
52 | machine_device_initcall(mpc830x_rdb, mpc83xx_declare_of_platform_devices); | 52 | machine_device_initcall(mpc830x_rdb, mpc83xx_declare_of_platform_devices); |
diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c index fa25977c52de..40e0d8307b59 100644 --- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c | |||
@@ -46,7 +46,7 @@ static const char *board[] __initdata = { | |||
46 | */ | 46 | */ |
47 | static int __init mpc831x_rdb_probe(void) | 47 | static int __init mpc831x_rdb_probe(void) |
48 | { | 48 | { |
49 | return of_flat_dt_match(of_get_flat_dt_root(), board); | 49 | return of_device_compatible_match(of_root, board); |
50 | } | 50 | } |
51 | 51 | ||
52 | machine_device_initcall(mpc831x_rdb, mpc83xx_declare_of_platform_devices); | 52 | machine_device_initcall(mpc831x_rdb, mpc83xx_declare_of_platform_devices); |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index a973b2ae5df6..cdfa47c4d394 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c | |||
@@ -102,9 +102,7 @@ machine_device_initcall(mpc832x_mds, mpc83xx_declare_of_platform_devices); | |||
102 | */ | 102 | */ |
103 | static int __init mpc832x_sys_probe(void) | 103 | static int __init mpc832x_sys_probe(void) |
104 | { | 104 | { |
105 | unsigned long root = of_get_flat_dt_root(); | 105 | return of_machine_is_compatible("MPC832xMDS"); |
106 | |||
107 | return of_flat_dt_is_compatible(root, "MPC832xMDS"); | ||
108 | } | 106 | } |
109 | 107 | ||
110 | define_machine(mpc832x_mds) { | 108 | define_machine(mpc832x_mds) { |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index ea2b87d202ca..2ef03e7d248c 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c | |||
@@ -220,9 +220,7 @@ machine_device_initcall(mpc832x_rdb, mpc83xx_declare_of_platform_devices); | |||
220 | */ | 220 | */ |
221 | static int __init mpc832x_rdb_probe(void) | 221 | static int __init mpc832x_rdb_probe(void) |
222 | { | 222 | { |
223 | unsigned long root = of_get_flat_dt_root(); | 223 | return of_machine_is_compatible("MPC832xRDB"); |
224 | |||
225 | return of_flat_dt_is_compatible(root, "MPC832xRDB"); | ||
226 | } | 224 | } |
227 | 225 | ||
228 | define_machine(mpc832x_rdb) { | 226 | define_machine(mpc832x_rdb) { |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index 80aea8c4b5a3..8fd0c1e8b182 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c | |||
@@ -70,9 +70,7 @@ static void __init mpc834x_itx_setup_arch(void) | |||
70 | */ | 70 | */ |
71 | static int __init mpc834x_itx_probe(void) | 71 | static int __init mpc834x_itx_probe(void) |
72 | { | 72 | { |
73 | unsigned long root = of_get_flat_dt_root(); | 73 | return of_machine_is_compatible("MPC834xMITX"); |
74 | |||
75 | return of_flat_dt_is_compatible(root, "MPC834xMITX"); | ||
76 | } | 74 | } |
77 | 75 | ||
78 | define_machine(mpc834x_itx) { | 76 | define_machine(mpc834x_itx) { |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index 553e793a4a93..eeaee6123bb3 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c | |||
@@ -91,9 +91,7 @@ machine_device_initcall(mpc834x_mds, mpc83xx_declare_of_platform_devices); | |||
91 | */ | 91 | */ |
92 | static int __init mpc834x_mds_probe(void) | 92 | static int __init mpc834x_mds_probe(void) |
93 | { | 93 | { |
94 | unsigned long root = of_get_flat_dt_root(); | 94 | return of_machine_is_compatible("MPC834xMDS"); |
95 | |||
96 | return of_flat_dt_is_compatible(root, "MPC834xMDS"); | ||
97 | } | 95 | } |
98 | 96 | ||
99 | define_machine(mpc834x_mds) { | 97 | define_machine(mpc834x_mds) { |
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index dd70b85f56d4..dacf4c2df069 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c | |||
@@ -209,9 +209,7 @@ machine_arch_initcall(mpc836x_mds, mpc836x_usb_cfg); | |||
209 | */ | 209 | */ |
210 | static int __init mpc836x_mds_probe(void) | 210 | static int __init mpc836x_mds_probe(void) |
211 | { | 211 | { |
212 | unsigned long root = of_get_flat_dt_root(); | 212 | return of_machine_is_compatible("MPC836xMDS"); |
213 | |||
214 | return of_flat_dt_is_compatible(root, "MPC836xMDS"); | ||
215 | } | 213 | } |
216 | 214 | ||
217 | define_machine(mpc836x_mds) { | 215 | define_machine(mpc836x_mds) { |
diff --git a/arch/powerpc/platforms/83xx/mpc836x_rdk.c b/arch/powerpc/platforms/83xx/mpc836x_rdk.c index 4cd7153a6c88..cf67ac93ddcb 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_rdk.c +++ b/arch/powerpc/platforms/83xx/mpc836x_rdk.c | |||
@@ -42,9 +42,7 @@ static void __init mpc836x_rdk_setup_arch(void) | |||
42 | */ | 42 | */ |
43 | static int __init mpc836x_rdk_probe(void) | 43 | static int __init mpc836x_rdk_probe(void) |
44 | { | 44 | { |
45 | unsigned long root = of_get_flat_dt_root(); | 45 | return of_machine_is_compatible("fsl,mpc8360rdk"); |
46 | |||
47 | return of_flat_dt_is_compatible(root, "fsl,mpc8360rdk"); | ||
48 | } | 46 | } |
49 | 47 | ||
50 | define_machine(mpc836x_rdk) { | 48 | define_machine(mpc836x_rdk) { |
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c index e53a60b6c863..652b97d699c9 100644 --- a/arch/powerpc/platforms/83xx/mpc837x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c | |||
@@ -93,9 +93,7 @@ machine_device_initcall(mpc837x_mds, mpc83xx_declare_of_platform_devices); | |||
93 | */ | 93 | */ |
94 | static int __init mpc837x_mds_probe(void) | 94 | static int __init mpc837x_mds_probe(void) |
95 | { | 95 | { |
96 | unsigned long root = of_get_flat_dt_root(); | 96 | return of_machine_is_compatible("fsl,mpc837xmds"); |
97 | |||
98 | return of_flat_dt_is_compatible(root, "fsl,mpc837xmds"); | ||
99 | } | 97 | } |
100 | 98 | ||
101 | define_machine(mpc837x_mds) { | 99 | define_machine(mpc837x_mds) { |
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c index 9813c81e8e5b..667731d81676 100644 --- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c | |||
@@ -73,7 +73,7 @@ static const char * const board[] __initconst = { | |||
73 | */ | 73 | */ |
74 | static int __init mpc837x_rdb_probe(void) | 74 | static int __init mpc837x_rdb_probe(void) |
75 | { | 75 | { |
76 | return of_flat_dt_match(of_get_flat_dt_root(), board); | 76 | return of_device_compatible_match(of_root, board); |
77 | } | 77 | } |
78 | 78 | ||
79 | define_machine(mpc837x_rdb) { | 79 | define_machine(mpc837x_rdb) { |
diff --git a/arch/powerpc/platforms/83xx/sbc834x.c b/arch/powerpc/platforms/83xx/sbc834x.c index 26cb3e934722..b867e88dfb0d 100644 --- a/arch/powerpc/platforms/83xx/sbc834x.c +++ b/arch/powerpc/platforms/83xx/sbc834x.c | |||
@@ -60,9 +60,7 @@ machine_device_initcall(sbc834x, mpc83xx_declare_of_platform_devices); | |||
60 | */ | 60 | */ |
61 | static int __init sbc834x_probe(void) | 61 | static int __init sbc834x_probe(void) |
62 | { | 62 | { |
63 | unsigned long root = of_get_flat_dt_root(); | 63 | return of_machine_is_compatible("SBC834xE"); |
64 | |||
65 | return of_flat_dt_is_compatible(root, "SBC834xE"); | ||
66 | } | 64 | } |
67 | 65 | ||
68 | define_machine(sbc834x) { | 66 | define_machine(sbc834x) { |
diff --git a/arch/powerpc/platforms/85xx/bsc913x_qds.c b/arch/powerpc/platforms/85xx/bsc913x_qds.c index dcfafd6b91ee..07dd6ae3ec52 100644 --- a/arch/powerpc/platforms/85xx/bsc913x_qds.c +++ b/arch/powerpc/platforms/85xx/bsc913x_qds.c | |||
@@ -60,9 +60,7 @@ machine_arch_initcall(bsc9132_qds, mpc85xx_common_publish_devices); | |||
60 | 60 | ||
61 | static int __init bsc9132_qds_probe(void) | 61 | static int __init bsc9132_qds_probe(void) |
62 | { | 62 | { |
63 | unsigned long root = of_get_flat_dt_root(); | 63 | return of_machine_is_compatible("fsl,bsc9132qds"); |
64 | |||
65 | return of_flat_dt_is_compatible(root, "fsl,bsc9132qds"); | ||
66 | } | 64 | } |
67 | 65 | ||
68 | define_machine(bsc9132_qds) { | 66 | define_machine(bsc9132_qds) { |
diff --git a/arch/powerpc/platforms/85xx/bsc913x_rdb.c b/arch/powerpc/platforms/85xx/bsc913x_rdb.c index 9d57bedb940c..e48f6710e6d5 100644 --- a/arch/powerpc/platforms/85xx/bsc913x_rdb.c +++ b/arch/powerpc/platforms/85xx/bsc913x_rdb.c | |||
@@ -50,9 +50,7 @@ machine_device_initcall(bsc9131_rdb, mpc85xx_common_publish_devices); | |||
50 | 50 | ||
51 | static int __init bsc9131_rdb_probe(void) | 51 | static int __init bsc9131_rdb_probe(void) |
52 | { | 52 | { |
53 | unsigned long root = of_get_flat_dt_root(); | 53 | return of_machine_is_compatible("fsl,bsc9131rdb"); |
54 | |||
55 | return of_flat_dt_is_compatible(root, "fsl,bsc9131rdb"); | ||
56 | } | 54 | } |
57 | 55 | ||
58 | define_machine(bsc9131_rdb) { | 56 | define_machine(bsc9131_rdb) { |
diff --git a/arch/powerpc/platforms/85xx/c293pcie.c b/arch/powerpc/platforms/85xx/c293pcie.c index 61bc851e9a8e..3b9e3f0f9aec 100644 --- a/arch/powerpc/platforms/85xx/c293pcie.c +++ b/arch/powerpc/platforms/85xx/c293pcie.c | |||
@@ -54,9 +54,7 @@ machine_arch_initcall(c293_pcie, mpc85xx_common_publish_devices); | |||
54 | */ | 54 | */ |
55 | static int __init c293_pcie_probe(void) | 55 | static int __init c293_pcie_probe(void) |
56 | { | 56 | { |
57 | unsigned long root = of_get_flat_dt_root(); | 57 | if (of_machine_is_compatible("fsl,C293PCIE")) |
58 | |||
59 | if (of_flat_dt_is_compatible(root, "fsl,C293PCIE")) | ||
60 | return 1; | 58 | return 1; |
61 | return 0; | 59 | return 0; |
62 | } | 60 | } |
diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c b/arch/powerpc/platforms/85xx/corenet_generic.c index a2b0bc859de0..3a6a84f07f43 100644 --- a/arch/powerpc/platforms/85xx/corenet_generic.c +++ b/arch/powerpc/platforms/85xx/corenet_generic.c | |||
@@ -170,20 +170,19 @@ static const char * const boards[] __initconst = { | |||
170 | */ | 170 | */ |
171 | static int __init corenet_generic_probe(void) | 171 | static int __init corenet_generic_probe(void) |
172 | { | 172 | { |
173 | unsigned long root = of_get_flat_dt_root(); | ||
174 | char hv_compat[24]; | 173 | char hv_compat[24]; |
175 | int i; | 174 | int i; |
176 | #ifdef CONFIG_SMP | 175 | #ifdef CONFIG_SMP |
177 | extern struct smp_ops_t smp_85xx_ops; | 176 | extern struct smp_ops_t smp_85xx_ops; |
178 | #endif | 177 | #endif |
179 | 178 | ||
180 | if (of_flat_dt_match(root, boards)) | 179 | if (of_device_compatible_match(of_root, boards)) |
181 | return 1; | 180 | return 1; |
182 | 181 | ||
183 | /* Check if we're running under the Freescale hypervisor */ | 182 | /* Check if we're running under the Freescale hypervisor */ |
184 | for (i = 0; boards[i]; i++) { | 183 | for (i = 0; boards[i]; i++) { |
185 | snprintf(hv_compat, sizeof(hv_compat), "%s-hv", boards[i]); | 184 | snprintf(hv_compat, sizeof(hv_compat), "%s-hv", boards[i]); |
186 | if (of_flat_dt_is_compatible(root, hv_compat)) { | 185 | if (of_machine_is_compatible(hv_compat)) { |
187 | ppc_md.init_IRQ = ehv_pic_init; | 186 | ppc_md.init_IRQ = ehv_pic_init; |
188 | 187 | ||
189 | ppc_md.get_irq = ehv_pic_get_irq; | 188 | ppc_md.get_irq = ehv_pic_get_irq; |
diff --git a/arch/powerpc/platforms/85xx/ge_imp3a.c b/arch/powerpc/platforms/85xx/ge_imp3a.c index 55eefef0c0c7..14af36a7fa9c 100644 --- a/arch/powerpc/platforms/85xx/ge_imp3a.c +++ b/arch/powerpc/platforms/85xx/ge_imp3a.c | |||
@@ -197,9 +197,7 @@ static void ge_imp3a_show_cpuinfo(struct seq_file *m) | |||
197 | */ | 197 | */ |
198 | static int __init ge_imp3a_probe(void) | 198 | static int __init ge_imp3a_probe(void) |
199 | { | 199 | { |
200 | unsigned long root = of_get_flat_dt_root(); | 200 | return of_machine_is_compatible("ge,IMP3A"); |
201 | |||
202 | return of_flat_dt_is_compatible(root, "ge,IMP3A"); | ||
203 | } | 201 | } |
204 | 202 | ||
205 | machine_arch_initcall(ge_imp3a, mpc85xx_common_publish_devices); | 203 | machine_arch_initcall(ge_imp3a, mpc85xx_common_publish_devices); |
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c index 867a1078b488..6ef8580fdc0e 100644 --- a/arch/powerpc/platforms/85xx/ksi8560.c +++ b/arch/powerpc/platforms/85xx/ksi8560.c | |||
@@ -176,9 +176,7 @@ machine_device_initcall(ksi8560, mpc85xx_common_publish_devices); | |||
176 | */ | 176 | */ |
177 | static int __init ksi8560_probe(void) | 177 | static int __init ksi8560_probe(void) |
178 | { | 178 | { |
179 | unsigned long root = of_get_flat_dt_root(); | 179 | return of_machine_is_compatible("emerson,KSI8560"); |
180 | |||
181 | return of_flat_dt_is_compatible(root, "emerson,KSI8560"); | ||
182 | } | 180 | } |
183 | 181 | ||
184 | define_machine(ksi8560) { | 182 | define_machine(ksi8560) { |
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c index a378ba3519e9..6ba687f19e45 100644 --- a/arch/powerpc/platforms/85xx/mpc8536_ds.c +++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c | |||
@@ -64,9 +64,7 @@ machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier); | |||
64 | */ | 64 | */ |
65 | static int __init mpc8536_ds_probe(void) | 65 | static int __init mpc8536_ds_probe(void) |
66 | { | 66 | { |
67 | unsigned long root = of_get_flat_dt_root(); | 67 | return of_machine_is_compatible("fsl,mpc8536ds"); |
68 | |||
69 | return of_flat_dt_is_compatible(root, "fsl,mpc8536ds"); | ||
70 | } | 68 | } |
71 | 69 | ||
72 | define_machine(mpc8536_ds) { | 70 | define_machine(mpc8536_ds) { |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index de72a5f464b1..8756715c7a47 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -160,9 +160,7 @@ machine_arch_initcall(mpc85xx_ads, mpc85xx_common_publish_devices); | |||
160 | */ | 160 | */ |
161 | static int __init mpc85xx_ads_probe(void) | 161 | static int __init mpc85xx_ads_probe(void) |
162 | { | 162 | { |
163 | unsigned long root = of_get_flat_dt_root(); | 163 | return of_machine_is_compatible("MPC85xxADS"); |
164 | |||
165 | return of_flat_dt_is_compatible(root, "MPC85xxADS"); | ||
166 | } | 164 | } |
167 | 165 | ||
168 | define_machine(mpc85xx_ads) { | 166 | define_machine(mpc85xx_ads) { |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 5e0a0a24d5ce..62f171c71c4c 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -367,9 +367,7 @@ static void mpc85xx_cds_show_cpuinfo(struct seq_file *m) | |||
367 | */ | 367 | */ |
368 | static int __init mpc85xx_cds_probe(void) | 368 | static int __init mpc85xx_cds_probe(void) |
369 | { | 369 | { |
370 | unsigned long root = of_get_flat_dt_root(); | 370 | return of_machine_is_compatible("MPC85xxCDS"); |
371 | |||
372 | return of_flat_dt_is_compatible(root, "MPC85xxCDS"); | ||
373 | } | 371 | } |
374 | 372 | ||
375 | machine_arch_initcall(mpc85xx_cds, mpc85xx_common_publish_devices); | 373 | machine_arch_initcall(mpc85xx_cds, mpc85xx_common_publish_devices); |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 64a7e8c16839..6bc07d837b1c 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -167,9 +167,7 @@ static void __init mpc85xx_ds_setup_arch(void) | |||
167 | */ | 167 | */ |
168 | static int __init mpc8544_ds_probe(void) | 168 | static int __init mpc8544_ds_probe(void) |
169 | { | 169 | { |
170 | unsigned long root = of_get_flat_dt_root(); | 170 | return !!of_machine_is_compatible("MPC8544DS"); |
171 | |||
172 | return !!of_flat_dt_is_compatible(root, "MPC8544DS"); | ||
173 | } | 171 | } |
174 | 172 | ||
175 | machine_arch_initcall(mpc8544_ds, mpc85xx_common_publish_devices); | 173 | machine_arch_initcall(mpc8544_ds, mpc85xx_common_publish_devices); |
@@ -185,9 +183,7 @@ machine_arch_initcall(p2020_ds, swiotlb_setup_bus_notifier); | |||
185 | */ | 183 | */ |
186 | static int __init mpc8572_ds_probe(void) | 184 | static int __init mpc8572_ds_probe(void) |
187 | { | 185 | { |
188 | unsigned long root = of_get_flat_dt_root(); | 186 | return !!of_machine_is_compatible("fsl,MPC8572DS"); |
189 | |||
190 | return !!of_flat_dt_is_compatible(root, "fsl,MPC8572DS"); | ||
191 | } | 187 | } |
192 | 188 | ||
193 | /* | 189 | /* |
@@ -195,9 +191,7 @@ static int __init mpc8572_ds_probe(void) | |||
195 | */ | 191 | */ |
196 | static int __init p2020_ds_probe(void) | 192 | static int __init p2020_ds_probe(void) |
197 | { | 193 | { |
198 | unsigned long root = of_get_flat_dt_root(); | 194 | return !!of_machine_is_compatible("fsl,P2020DS"); |
199 | |||
200 | return !!of_flat_dt_is_compatible(root, "fsl,P2020DS"); | ||
201 | } | 195 | } |
202 | 196 | ||
203 | define_machine(mpc8544_ds) { | 197 | define_machine(mpc8544_ds) { |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index f61cbe235581..fa9cd710d2ae 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -376,9 +376,7 @@ static void __init mpc85xx_mds_pic_init(void) | |||
376 | 376 | ||
377 | static int __init mpc85xx_mds_probe(void) | 377 | static int __init mpc85xx_mds_probe(void) |
378 | { | 378 | { |
379 | unsigned long root = of_get_flat_dt_root(); | 379 | return of_machine_is_compatible("MPC85xxMDS"); |
380 | |||
381 | return of_flat_dt_is_compatible(root, "MPC85xxMDS"); | ||
382 | } | 380 | } |
383 | 381 | ||
384 | define_machine(mpc8568_mds) { | 382 | define_machine(mpc8568_mds) { |
@@ -398,9 +396,7 @@ define_machine(mpc8568_mds) { | |||
398 | 396 | ||
399 | static int __init mpc8569_mds_probe(void) | 397 | static int __init mpc8569_mds_probe(void) |
400 | { | 398 | { |
401 | unsigned long root = of_get_flat_dt_root(); | 399 | return of_machine_is_compatible("fsl,MPC8569EMDS"); |
402 | |||
403 | return of_flat_dt_is_compatible(root, "fsl,MPC8569EMDS"); | ||
404 | } | 400 | } |
405 | 401 | ||
406 | define_machine(mpc8569_mds) { | 402 | define_machine(mpc8569_mds) { |
@@ -420,9 +416,7 @@ define_machine(mpc8569_mds) { | |||
420 | 416 | ||
421 | static int __init p1021_mds_probe(void) | 417 | static int __init p1021_mds_probe(void) |
422 | { | 418 | { |
423 | unsigned long root = of_get_flat_dt_root(); | 419 | return of_machine_is_compatible("fsl,P1021MDS"); |
424 | |||
425 | return of_flat_dt_is_compatible(root, "fsl,P1021MDS"); | ||
426 | 420 | ||
427 | } | 421 | } |
428 | 422 | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index 761e504d22ef..c1499cbf3786 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c | |||
@@ -147,80 +147,60 @@ machine_arch_initcall(p1024_rdb, mpc85xx_common_publish_devices); | |||
147 | */ | 147 | */ |
148 | static int __init p2020_rdb_probe(void) | 148 | static int __init p2020_rdb_probe(void) |
149 | { | 149 | { |
150 | unsigned long root = of_get_flat_dt_root(); | 150 | if (of_machine_is_compatible("fsl,P2020RDB")) |
151 | |||
152 | if (of_flat_dt_is_compatible(root, "fsl,P2020RDB")) | ||
153 | return 1; | 151 | return 1; |
154 | return 0; | 152 | return 0; |
155 | } | 153 | } |
156 | 154 | ||
157 | static int __init p1020_rdb_probe(void) | 155 | static int __init p1020_rdb_probe(void) |
158 | { | 156 | { |
159 | unsigned long root = of_get_flat_dt_root(); | 157 | if (of_machine_is_compatible("fsl,P1020RDB")) |
160 | |||
161 | if (of_flat_dt_is_compatible(root, "fsl,P1020RDB")) | ||
162 | return 1; | 158 | return 1; |
163 | return 0; | 159 | return 0; |
164 | } | 160 | } |
165 | 161 | ||
166 | static int __init p1020_rdb_pc_probe(void) | 162 | static int __init p1020_rdb_pc_probe(void) |
167 | { | 163 | { |
168 | unsigned long root = of_get_flat_dt_root(); | 164 | return of_machine_is_compatible("fsl,P1020RDB-PC"); |
169 | |||
170 | return of_flat_dt_is_compatible(root, "fsl,P1020RDB-PC"); | ||
171 | } | 165 | } |
172 | 166 | ||
173 | static int __init p1020_rdb_pd_probe(void) | 167 | static int __init p1020_rdb_pd_probe(void) |
174 | { | 168 | { |
175 | unsigned long root = of_get_flat_dt_root(); | 169 | return of_machine_is_compatible("fsl,P1020RDB-PD"); |
176 | |||
177 | return of_flat_dt_is_compatible(root, "fsl,P1020RDB-PD"); | ||
178 | } | 170 | } |
179 | 171 | ||
180 | static int __init p1021_rdb_pc_probe(void) | 172 | static int __init p1021_rdb_pc_probe(void) |
181 | { | 173 | { |
182 | unsigned long root = of_get_flat_dt_root(); | 174 | if (of_machine_is_compatible("fsl,P1021RDB-PC")) |
183 | |||
184 | if (of_flat_dt_is_compatible(root, "fsl,P1021RDB-PC")) | ||
185 | return 1; | 175 | return 1; |
186 | return 0; | 176 | return 0; |
187 | } | 177 | } |
188 | 178 | ||
189 | static int __init p2020_rdb_pc_probe(void) | 179 | static int __init p2020_rdb_pc_probe(void) |
190 | { | 180 | { |
191 | unsigned long root = of_get_flat_dt_root(); | 181 | if (of_machine_is_compatible("fsl,P2020RDB-PC")) |
192 | |||
193 | if (of_flat_dt_is_compatible(root, "fsl,P2020RDB-PC")) | ||
194 | return 1; | 182 | return 1; |
195 | return 0; | 183 | return 0; |
196 | } | 184 | } |
197 | 185 | ||
198 | static int __init p1025_rdb_probe(void) | 186 | static int __init p1025_rdb_probe(void) |
199 | { | 187 | { |
200 | unsigned long root = of_get_flat_dt_root(); | 188 | return of_machine_is_compatible("fsl,P1025RDB"); |
201 | |||
202 | return of_flat_dt_is_compatible(root, "fsl,P1025RDB"); | ||
203 | } | 189 | } |
204 | 190 | ||
205 | static int __init p1020_mbg_pc_probe(void) | 191 | static int __init p1020_mbg_pc_probe(void) |
206 | { | 192 | { |
207 | unsigned long root = of_get_flat_dt_root(); | 193 | return of_machine_is_compatible("fsl,P1020MBG-PC"); |
208 | |||
209 | return of_flat_dt_is_compatible(root, "fsl,P1020MBG-PC"); | ||
210 | } | 194 | } |
211 | 195 | ||
212 | static int __init p1020_utm_pc_probe(void) | 196 | static int __init p1020_utm_pc_probe(void) |
213 | { | 197 | { |
214 | unsigned long root = of_get_flat_dt_root(); | 198 | return of_machine_is_compatible("fsl,P1020UTM-PC"); |
215 | |||
216 | return of_flat_dt_is_compatible(root, "fsl,P1020UTM-PC"); | ||
217 | } | 199 | } |
218 | 200 | ||
219 | static int __init p1024_rdb_probe(void) | 201 | static int __init p1024_rdb_probe(void) |
220 | { | 202 | { |
221 | unsigned long root = of_get_flat_dt_root(); | 203 | return of_machine_is_compatible("fsl,P1024RDB"); |
222 | |||
223 | return of_flat_dt_is_compatible(root, "fsl,P1024RDB"); | ||
224 | } | 204 | } |
225 | 205 | ||
226 | define_machine(p2020_rdb) { | 206 | define_machine(p2020_rdb) { |
diff --git a/arch/powerpc/platforms/85xx/mvme2500.c b/arch/powerpc/platforms/85xx/mvme2500.c index 1233050560ae..acc3d0d6049d 100644 --- a/arch/powerpc/platforms/85xx/mvme2500.c +++ b/arch/powerpc/platforms/85xx/mvme2500.c | |||
@@ -53,9 +53,7 @@ machine_arch_initcall(mvme2500, mpc85xx_common_publish_devices); | |||
53 | */ | 53 | */ |
54 | static int __init mvme2500_probe(void) | 54 | static int __init mvme2500_probe(void) |
55 | { | 55 | { |
56 | unsigned long root = of_get_flat_dt_root(); | 56 | return of_machine_is_compatible("artesyn,MVME2500"); |
57 | |||
58 | return of_flat_dt_is_compatible(root, "artesyn,MVME2500"); | ||
59 | } | 57 | } |
60 | 58 | ||
61 | define_machine(mvme2500) { | 59 | define_machine(mvme2500) { |
diff --git a/arch/powerpc/platforms/85xx/p1010rdb.c b/arch/powerpc/platforms/85xx/p1010rdb.c index ad1a3d438a9e..661d7b59e413 100644 --- a/arch/powerpc/platforms/85xx/p1010rdb.c +++ b/arch/powerpc/platforms/85xx/p1010rdb.c | |||
@@ -62,11 +62,9 @@ machine_arch_initcall(p1010_rdb, swiotlb_setup_bus_notifier); | |||
62 | */ | 62 | */ |
63 | static int __init p1010_rdb_probe(void) | 63 | static int __init p1010_rdb_probe(void) |
64 | { | 64 | { |
65 | unsigned long root = of_get_flat_dt_root(); | 65 | if (of_machine_is_compatible("fsl,P1010RDB")) |
66 | |||
67 | if (of_flat_dt_is_compatible(root, "fsl,P1010RDB")) | ||
68 | return 1; | 66 | return 1; |
69 | if (of_flat_dt_is_compatible(root, "fsl,P1010RDB-PB")) | 67 | if (of_machine_is_compatible("fsl,P1010RDB-PB")) |
70 | return 1; | 68 | return 1; |
71 | return 0; | 69 | return 0; |
72 | } | 70 | } |
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c index 371df822e88e..63568d68c76f 100644 --- a/arch/powerpc/platforms/85xx/p1022_ds.c +++ b/arch/powerpc/platforms/85xx/p1022_ds.c | |||
@@ -555,9 +555,7 @@ machine_arch_initcall(p1022_ds, swiotlb_setup_bus_notifier); | |||
555 | */ | 555 | */ |
556 | static int __init p1022_ds_probe(void) | 556 | static int __init p1022_ds_probe(void) |
557 | { | 557 | { |
558 | unsigned long root = of_get_flat_dt_root(); | 558 | return of_machine_is_compatible("fsl,p1022ds"); |
559 | |||
560 | return of_flat_dt_is_compatible(root, "fsl,p1022ds"); | ||
561 | } | 559 | } |
562 | 560 | ||
563 | define_machine(p1022_ds) { | 561 | define_machine(p1022_ds) { |
diff --git a/arch/powerpc/platforms/85xx/p1022_rdk.c b/arch/powerpc/platforms/85xx/p1022_rdk.c index 5087becaa8bc..2f2943600301 100644 --- a/arch/powerpc/platforms/85xx/p1022_rdk.c +++ b/arch/powerpc/platforms/85xx/p1022_rdk.c | |||
@@ -135,9 +135,7 @@ machine_arch_initcall(p1022_rdk, swiotlb_setup_bus_notifier); | |||
135 | */ | 135 | */ |
136 | static int __init p1022_rdk_probe(void) | 136 | static int __init p1022_rdk_probe(void) |
137 | { | 137 | { |
138 | unsigned long root = of_get_flat_dt_root(); | 138 | return of_machine_is_compatible("fsl,p1022rdk"); |
139 | |||
140 | return of_flat_dt_is_compatible(root, "fsl,p1022rdk"); | ||
141 | } | 139 | } |
142 | 140 | ||
143 | define_machine(p1022_rdk) { | 141 | define_machine(p1022_rdk) { |
diff --git a/arch/powerpc/platforms/85xx/p1023_rdb.c b/arch/powerpc/platforms/85xx/p1023_rdb.c index d5b7509825de..40d8de57c341 100644 --- a/arch/powerpc/platforms/85xx/p1023_rdb.c +++ b/arch/powerpc/platforms/85xx/p1023_rdb.c | |||
@@ -100,9 +100,7 @@ static void __init mpc85xx_rdb_pic_init(void) | |||
100 | 100 | ||
101 | static int __init p1023_rdb_probe(void) | 101 | static int __init p1023_rdb_probe(void) |
102 | { | 102 | { |
103 | unsigned long root = of_get_flat_dt_root(); | 103 | return of_machine_is_compatible("fsl,P1023RDB"); |
104 | |||
105 | return of_flat_dt_is_compatible(root, "fsl,P1023RDB"); | ||
106 | 104 | ||
107 | } | 105 | } |
108 | 106 | ||
diff --git a/arch/powerpc/platforms/85xx/ppa8548.c b/arch/powerpc/platforms/85xx/ppa8548.c index 12019f17f297..2410167b290a 100644 --- a/arch/powerpc/platforms/85xx/ppa8548.c +++ b/arch/powerpc/platforms/85xx/ppa8548.c | |||
@@ -81,9 +81,7 @@ machine_device_initcall(ppa8548, declare_of_platform_devices); | |||
81 | */ | 81 | */ |
82 | static int __init ppa8548_probe(void) | 82 | static int __init ppa8548_probe(void) |
83 | { | 83 | { |
84 | unsigned long root = of_get_flat_dt_root(); | 84 | return of_machine_is_compatible("ppa8548"); |
85 | |||
86 | return of_flat_dt_is_compatible(root, "ppa8548"); | ||
87 | } | 85 | } |
88 | 86 | ||
89 | define_machine(ppa8548) { | 87 | define_machine(ppa8548) { |
diff --git a/arch/powerpc/platforms/85xx/qemu_e500.c b/arch/powerpc/platforms/85xx/qemu_e500.c index 8ad2fe6f200a..50d745809809 100644 --- a/arch/powerpc/platforms/85xx/qemu_e500.c +++ b/arch/powerpc/platforms/85xx/qemu_e500.c | |||
@@ -62,9 +62,7 @@ static void __init qemu_e500_setup_arch(void) | |||
62 | */ | 62 | */ |
63 | static int __init qemu_e500_probe(void) | 63 | static int __init qemu_e500_probe(void) |
64 | { | 64 | { |
65 | unsigned long root = of_get_flat_dt_root(); | 65 | return !!of_machine_is_compatible("fsl,qemu-e500"); |
66 | |||
67 | return !!of_flat_dt_is_compatible(root, "fsl,qemu-e500"); | ||
68 | } | 66 | } |
69 | 67 | ||
70 | machine_arch_initcall(qemu_e500, mpc85xx_common_publish_devices); | 68 | machine_arch_initcall(qemu_e500, mpc85xx_common_publish_devices); |
diff --git a/arch/powerpc/platforms/85xx/sbc8548.c b/arch/powerpc/platforms/85xx/sbc8548.c index b07214666d65..62b6c45a5a9b 100644 --- a/arch/powerpc/platforms/85xx/sbc8548.c +++ b/arch/powerpc/platforms/85xx/sbc8548.c | |||
@@ -120,9 +120,7 @@ machine_arch_initcall(sbc8548, mpc85xx_common_publish_devices); | |||
120 | */ | 120 | */ |
121 | static int __init sbc8548_probe(void) | 121 | static int __init sbc8548_probe(void) |
122 | { | 122 | { |
123 | unsigned long root = of_get_flat_dt_root(); | 123 | return of_machine_is_compatible("SBC8548"); |
124 | |||
125 | return of_flat_dt_is_compatible(root, "SBC8548"); | ||
126 | } | 124 | } |
127 | 125 | ||
128 | define_machine(sbc8548) { | 126 | define_machine(sbc8548) { |
diff --git a/arch/powerpc/platforms/85xx/socrates.c b/arch/powerpc/platforms/85xx/socrates.c index ae368e0e1076..cd255acde2e2 100644 --- a/arch/powerpc/platforms/85xx/socrates.c +++ b/arch/powerpc/platforms/85xx/socrates.c | |||
@@ -79,9 +79,7 @@ machine_arch_initcall(socrates, mpc85xx_common_publish_devices); | |||
79 | */ | 79 | */ |
80 | static int __init socrates_probe(void) | 80 | static int __init socrates_probe(void) |
81 | { | 81 | { |
82 | unsigned long root = of_get_flat_dt_root(); | 82 | if (of_machine_is_compatible("abb,socrates")) |
83 | |||
84 | if (of_flat_dt_is_compatible(root, "abb,socrates")) | ||
85 | return 1; | 83 | return 1; |
86 | 84 | ||
87 | return 0; | 85 | return 0; |
diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c b/arch/powerpc/platforms/85xx/stx_gp3.c index 6f4939b6309e..91b824c4dc08 100644 --- a/arch/powerpc/platforms/85xx/stx_gp3.c +++ b/arch/powerpc/platforms/85xx/stx_gp3.c | |||
@@ -93,9 +93,7 @@ machine_arch_initcall(stx_gp3, mpc85xx_common_publish_devices); | |||
93 | */ | 93 | */ |
94 | static int __init stx_gp3_probe(void) | 94 | static int __init stx_gp3_probe(void) |
95 | { | 95 | { |
96 | unsigned long root = of_get_flat_dt_root(); | 96 | return of_machine_is_compatible("stx,gp3-8560"); |
97 | |||
98 | return of_flat_dt_is_compatible(root, "stx,gp3-8560"); | ||
99 | } | 97 | } |
100 | 98 | ||
101 | define_machine(stx_gp3) { | 99 | define_machine(stx_gp3) { |
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c index ec0b7272fae2..b7c54454d611 100644 --- a/arch/powerpc/platforms/85xx/tqm85xx.c +++ b/arch/powerpc/platforms/85xx/tqm85xx.c | |||
@@ -122,7 +122,7 @@ static const char * const board[] __initconst = { | |||
122 | */ | 122 | */ |
123 | static int __init tqm85xx_probe(void) | 123 | static int __init tqm85xx_probe(void) |
124 | { | 124 | { |
125 | return of_flat_dt_match(of_get_flat_dt_root(), board); | 125 | return of_device_compatible_match(of_root, board); |
126 | } | 126 | } |
127 | 127 | ||
128 | define_machine(tqm85xx) { | 128 | define_machine(tqm85xx) { |
diff --git a/arch/powerpc/platforms/85xx/twr_p102x.c b/arch/powerpc/platforms/85xx/twr_p102x.c index 71bc255b4324..1bc02a87f597 100644 --- a/arch/powerpc/platforms/85xx/twr_p102x.c +++ b/arch/powerpc/platforms/85xx/twr_p102x.c | |||
@@ -128,9 +128,7 @@ machine_arch_initcall(twr_p1025, mpc85xx_common_publish_devices); | |||
128 | 128 | ||
129 | static int __init twr_p1025_probe(void) | 129 | static int __init twr_p1025_probe(void) |
130 | { | 130 | { |
131 | unsigned long root = of_get_flat_dt_root(); | 131 | return of_machine_is_compatible("fsl,TWR-P1025"); |
132 | |||
133 | return of_flat_dt_is_compatible(root, "fsl,TWR-P1025"); | ||
134 | } | 132 | } |
135 | 133 | ||
136 | define_machine(twr_p1025) { | 134 | define_machine(twr_p1025) { |
diff --git a/arch/powerpc/platforms/85xx/xes_mpc85xx.c b/arch/powerpc/platforms/85xx/xes_mpc85xx.c index 1a9c1085855f..cf0c70ff026e 100644 --- a/arch/powerpc/platforms/85xx/xes_mpc85xx.c +++ b/arch/powerpc/platforms/85xx/xes_mpc85xx.c | |||
@@ -144,23 +144,17 @@ machine_arch_initcall(xes_mpc8540, mpc85xx_common_publish_devices); | |||
144 | */ | 144 | */ |
145 | static int __init xes_mpc8572_probe(void) | 145 | static int __init xes_mpc8572_probe(void) |
146 | { | 146 | { |
147 | unsigned long root = of_get_flat_dt_root(); | 147 | return of_machine_is_compatible("xes,MPC8572"); |
148 | |||
149 | return of_flat_dt_is_compatible(root, "xes,MPC8572"); | ||
150 | } | 148 | } |
151 | 149 | ||
152 | static int __init xes_mpc8548_probe(void) | 150 | static int __init xes_mpc8548_probe(void) |
153 | { | 151 | { |
154 | unsigned long root = of_get_flat_dt_root(); | 152 | return of_machine_is_compatible("xes,MPC8548"); |
155 | |||
156 | return of_flat_dt_is_compatible(root, "xes,MPC8548"); | ||
157 | } | 153 | } |
158 | 154 | ||
159 | static int __init xes_mpc8540_probe(void) | 155 | static int __init xes_mpc8540_probe(void) |
160 | { | 156 | { |
161 | unsigned long root = of_get_flat_dt_root(); | 157 | return of_machine_is_compatible("xes,MPC8540"); |
162 | |||
163 | return of_flat_dt_is_compatible(root, "xes,MPC8540"); | ||
164 | } | 158 | } |
165 | 159 | ||
166 | define_machine(xes_mpc8572) { | 160 | define_machine(xes_mpc8572) { |
diff --git a/arch/powerpc/platforms/86xx/gef_ppc9a.c b/arch/powerpc/platforms/86xx/gef_ppc9a.c index 8e63b752712c..ef684afb63c6 100644 --- a/arch/powerpc/platforms/86xx/gef_ppc9a.c +++ b/arch/powerpc/platforms/86xx/gef_ppc9a.c | |||
@@ -189,9 +189,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB, | |||
189 | */ | 189 | */ |
190 | static int __init gef_ppc9a_probe(void) | 190 | static int __init gef_ppc9a_probe(void) |
191 | { | 191 | { |
192 | unsigned long root = of_get_flat_dt_root(); | 192 | if (of_machine_is_compatible("gef,ppc9a")) |
193 | |||
194 | if (of_flat_dt_is_compatible(root, "gef,ppc9a")) | ||
195 | return 1; | 193 | return 1; |
196 | 194 | ||
197 | return 0; | 195 | return 0; |
diff --git a/arch/powerpc/platforms/86xx/gef_sbc310.c b/arch/powerpc/platforms/86xx/gef_sbc310.c index 0e0be94f551f..67dd0c231646 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc310.c +++ b/arch/powerpc/platforms/86xx/gef_sbc310.c | |||
@@ -176,9 +176,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB, | |||
176 | */ | 176 | */ |
177 | static int __init gef_sbc310_probe(void) | 177 | static int __init gef_sbc310_probe(void) |
178 | { | 178 | { |
179 | unsigned long root = of_get_flat_dt_root(); | 179 | if (of_machine_is_compatible("gef,sbc310")) |
180 | |||
181 | if (of_flat_dt_is_compatible(root, "gef,sbc310")) | ||
182 | return 1; | 180 | return 1; |
183 | 181 | ||
184 | return 0; | 182 | return 0; |
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c index e8292b492d7e..805026976cac 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc610.c +++ b/arch/powerpc/platforms/86xx/gef_sbc610.c | |||
@@ -166,9 +166,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB, | |||
166 | */ | 166 | */ |
167 | static int __init gef_sbc610_probe(void) | 167 | static int __init gef_sbc610_probe(void) |
168 | { | 168 | { |
169 | unsigned long root = of_get_flat_dt_root(); | 169 | if (of_machine_is_compatible("gef,sbc610")) |
170 | |||
171 | if (of_flat_dt_is_compatible(root, "gef,sbc610")) | ||
172 | return 1; | 170 | return 1; |
173 | 171 | ||
174 | return 0; | 172 | return 0; |
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c index 957473e5c8e5..fef0582eddf1 100644 --- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c | |||
@@ -319,9 +319,7 @@ static void __init mpc86xx_hpcd_setup_arch(void) | |||
319 | */ | 319 | */ |
320 | static int __init mpc86xx_hpcd_probe(void) | 320 | static int __init mpc86xx_hpcd_probe(void) |
321 | { | 321 | { |
322 | unsigned long root = of_get_flat_dt_root(); | 322 | if (of_machine_is_compatible("fsl,MPC8610HPCD")) |
323 | |||
324 | if (of_flat_dt_is_compatible(root, "fsl,MPC8610HPCD")) | ||
325 | return 1; /* Looks good */ | 323 | return 1; /* Looks good */ |
326 | 324 | ||
327 | return 0; | 325 | return 0; |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index e5084811b9c6..5ae42a037065 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -96,13 +96,11 @@ mpc86xx_hpcn_show_cpuinfo(struct seq_file *m) | |||
96 | */ | 96 | */ |
97 | static int __init mpc86xx_hpcn_probe(void) | 97 | static int __init mpc86xx_hpcn_probe(void) |
98 | { | 98 | { |
99 | unsigned long root = of_get_flat_dt_root(); | 99 | if (of_machine_is_compatible("fsl,mpc8641hpcn")) |
100 | |||
101 | if (of_flat_dt_is_compatible(root, "fsl,mpc8641hpcn")) | ||
102 | return 1; /* Looks good */ | 100 | return 1; /* Looks good */ |
103 | 101 | ||
104 | /* Be nice and don't give silent boot death. Delete this in 2.6.27 */ | 102 | /* Be nice and don't give silent boot death. Delete this in 2.6.27 */ |
105 | if (of_flat_dt_is_compatible(root, "mpc86xx")) { | 103 | if (of_machine_is_compatible("mpc86xx")) { |
106 | pr_warning("WARNING: your dts/dtb is old. You must update before the next kernel release\n"); | 104 | pr_warning("WARNING: your dts/dtb is old. You must update before the next kernel release\n"); |
107 | return 1; | 105 | return 1; |
108 | } | 106 | } |
diff --git a/arch/powerpc/platforms/86xx/sbc8641d.c b/arch/powerpc/platforms/86xx/sbc8641d.c index 2a9cf278c12a..52af5735742e 100644 --- a/arch/powerpc/platforms/86xx/sbc8641d.c +++ b/arch/powerpc/platforms/86xx/sbc8641d.c | |||
@@ -67,9 +67,7 @@ sbc8641_show_cpuinfo(struct seq_file *m) | |||
67 | */ | 67 | */ |
68 | static int __init sbc8641_probe(void) | 68 | static int __init sbc8641_probe(void) |
69 | { | 69 | { |
70 | unsigned long root = of_get_flat_dt_root(); | 70 | if (of_machine_is_compatible("wind,sbc8641")) |
71 | |||
72 | if (of_flat_dt_is_compatible(root, "wind,sbc8641")) | ||
73 | return 1; /* Looks good */ | 71 | return 1; /* Looks good */ |
74 | 72 | ||
75 | return 0; | 73 | return 0; |
diff --git a/arch/powerpc/platforms/8xx/adder875.c b/arch/powerpc/platforms/8xx/adder875.c index 61cae4c1edb8..333dece79394 100644 --- a/arch/powerpc/platforms/8xx/adder875.c +++ b/arch/powerpc/platforms/8xx/adder875.c | |||
@@ -88,8 +88,7 @@ static void __init adder875_setup(void) | |||
88 | 88 | ||
89 | static int __init adder875_probe(void) | 89 | static int __init adder875_probe(void) |
90 | { | 90 | { |
91 | unsigned long root = of_get_flat_dt_root(); | 91 | return of_machine_is_compatible("analogue-and-micro,adder875"); |
92 | return of_flat_dt_is_compatible(root, "analogue-and-micro,adder875"); | ||
93 | } | 92 | } |
94 | 93 | ||
95 | static const struct of_device_id of_bus_ids[] __initconst = { | 94 | static const struct of_device_id of_bus_ids[] __initconst = { |
diff --git a/arch/powerpc/platforms/8xx/ep88xc.c b/arch/powerpc/platforms/8xx/ep88xc.c index 2bedeb7d5f8f..cd0d90f1fb1c 100644 --- a/arch/powerpc/platforms/8xx/ep88xc.c +++ b/arch/powerpc/platforms/8xx/ep88xc.c | |||
@@ -143,8 +143,7 @@ static void __init ep88xc_setup_arch(void) | |||
143 | 143 | ||
144 | static int __init ep88xc_probe(void) | 144 | static int __init ep88xc_probe(void) |
145 | { | 145 | { |
146 | unsigned long root = of_get_flat_dt_root(); | 146 | return of_machine_is_compatible("fsl,ep88xc"); |
147 | return of_flat_dt_is_compatible(root, "fsl,ep88xc"); | ||
148 | } | 147 | } |
149 | 148 | ||
150 | static const struct of_device_id of_bus_ids[] __initconst = { | 149 | static const struct of_device_id of_bus_ids[] __initconst = { |
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c index 78180c5e73ff..8d02f5ff4481 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c | |||
@@ -118,8 +118,7 @@ static void __init mpc86xads_setup_arch(void) | |||
118 | 118 | ||
119 | static int __init mpc86xads_probe(void) | 119 | static int __init mpc86xads_probe(void) |
120 | { | 120 | { |
121 | unsigned long root = of_get_flat_dt_root(); | 121 | return of_machine_is_compatible("fsl,mpc866ads"); |
122 | return of_flat_dt_is_compatible(root, "fsl,mpc866ads"); | ||
123 | } | 122 | } |
124 | 123 | ||
125 | static const struct of_device_id of_bus_ids[] __initconst = { | 124 | static const struct of_device_id of_bus_ids[] __initconst = { |
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c index 4d62bf9dc789..e821a42d5816 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c | |||
@@ -193,8 +193,7 @@ static void __init mpc885ads_setup_arch(void) | |||
193 | 193 | ||
194 | static int __init mpc885ads_probe(void) | 194 | static int __init mpc885ads_probe(void) |
195 | { | 195 | { |
196 | unsigned long root = of_get_flat_dt_root(); | 196 | return of_machine_is_compatible("fsl,mpc885ads"); |
197 | return of_flat_dt_is_compatible(root, "fsl,mpc885ads"); | ||
198 | } | 197 | } |
199 | 198 | ||
200 | static const struct of_device_id of_bus_ids[] __initconst = { | 199 | static const struct of_device_id of_bus_ids[] __initconst = { |
diff --git a/arch/powerpc/platforms/8xx/tqm8xx_setup.c b/arch/powerpc/platforms/8xx/tqm8xx_setup.c index bee47a2b23e6..4cea8b1afa44 100644 --- a/arch/powerpc/platforms/8xx/tqm8xx_setup.c +++ b/arch/powerpc/platforms/8xx/tqm8xx_setup.c | |||
@@ -119,9 +119,7 @@ static void __init tqm8xx_setup_arch(void) | |||
119 | 119 | ||
120 | static int __init tqm8xx_probe(void) | 120 | static int __init tqm8xx_probe(void) |
121 | { | 121 | { |
122 | unsigned long node = of_get_flat_dt_root(); | 122 | return of_machine_is_compatible("tqc,tqm8xx"); |
123 | |||
124 | return of_flat_dt_is_compatible(node, "tqc,tqm8xx"); | ||
125 | } | 123 | } |
126 | 124 | ||
127 | static const struct of_device_id of_bus_ids[] __initconst = { | 125 | static const struct of_device_id of_bus_ids[] __initconst = { |
diff --git a/arch/powerpc/platforms/amigaone/setup.c b/arch/powerpc/platforms/amigaone/setup.c index 3e12d8789252..45cb9821173c 100644 --- a/arch/powerpc/platforms/amigaone/setup.c +++ b/arch/powerpc/platforms/amigaone/setup.c | |||
@@ -143,9 +143,7 @@ void __noreturn amigaone_restart(char *cmd) | |||
143 | 143 | ||
144 | static int __init amigaone_probe(void) | 144 | static int __init amigaone_probe(void) |
145 | { | 145 | { |
146 | unsigned long root = of_get_flat_dt_root(); | 146 | if (of_machine_is_compatible("eyetech,amigaone")) { |
147 | |||
148 | if (of_flat_dt_is_compatible(root, "eyetech,amigaone")) { | ||
149 | /* | 147 | /* |
150 | * Coherent memory access cause complete system lockup! Thus | 148 | * Coherent memory access cause complete system lockup! Thus |
151 | * disable this CPU feature, even if the CPU needs it. | 149 | * disable this CPU feature, even if the CPU needs it. |
diff --git a/arch/powerpc/platforms/embedded6xx/c2k.c b/arch/powerpc/platforms/embedded6xx/c2k.c index 782066245bb5..7fef40edf044 100644 --- a/arch/powerpc/platforms/embedded6xx/c2k.c +++ b/arch/powerpc/platforms/embedded6xx/c2k.c | |||
@@ -123,9 +123,7 @@ void c2k_show_cpuinfo(struct seq_file *m) | |||
123 | */ | 123 | */ |
124 | static int __init c2k_probe(void) | 124 | static int __init c2k_probe(void) |
125 | { | 125 | { |
126 | unsigned long root = of_get_flat_dt_root(); | 126 | if (!of_machine_is_compatible("GEFanuc,C2K")) |
127 | |||
128 | if (!of_flat_dt_is_compatible(root, "GEFanuc,C2K")) | ||
129 | return 0; | 127 | return 0; |
130 | 128 | ||
131 | printk(KERN_INFO "Detected a GEFanuc C2K board\n"); | 129 | printk(KERN_INFO "Detected a GEFanuc C2K board\n"); |
diff --git a/arch/powerpc/platforms/embedded6xx/gamecube.c b/arch/powerpc/platforms/embedded6xx/gamecube.c index b17705c3f7a4..f5a837fa8951 100644 --- a/arch/powerpc/platforms/embedded6xx/gamecube.c +++ b/arch/powerpc/platforms/embedded6xx/gamecube.c | |||
@@ -61,10 +61,7 @@ static void __init gamecube_init_early(void) | |||
61 | 61 | ||
62 | static int __init gamecube_probe(void) | 62 | static int __init gamecube_probe(void) |
63 | { | 63 | { |
64 | unsigned long dt_root; | 64 | if (!of_machine_is_compatible("nintendo,gamecube")) |
65 | |||
66 | dt_root = of_get_flat_dt_root(); | ||
67 | if (!of_flat_dt_is_compatible(dt_root, "nintendo,gamecube")) | ||
68 | return 0; | 65 | return 0; |
69 | 66 | ||
70 | pm_power_off = gamecube_power_off; | 67 | pm_power_off = gamecube_power_off; |
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c index 8b6e76100895..dafba1057a47 100644 --- a/arch/powerpc/platforms/embedded6xx/holly.c +++ b/arch/powerpc/platforms/embedded6xx/holly.c | |||
@@ -250,9 +250,7 @@ void holly_halt(void) | |||
250 | */ | 250 | */ |
251 | static int __init holly_probe(void) | 251 | static int __init holly_probe(void) |
252 | { | 252 | { |
253 | unsigned long root = of_get_flat_dt_root(); | 253 | if (!of_machine_is_compatible("ibm,holly")) |
254 | |||
255 | if (!of_flat_dt_is_compatible(root, "ibm,holly")) | ||
256 | return 0; | 254 | return 0; |
257 | return 1; | 255 | return 1; |
258 | } | 256 | } |
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c index 4c5089f05c7f..f29cf29b11f8 100644 --- a/arch/powerpc/platforms/embedded6xx/linkstation.c +++ b/arch/powerpc/platforms/embedded6xx/linkstation.c | |||
@@ -141,11 +141,7 @@ static void linkstation_show_cpuinfo(struct seq_file *m) | |||
141 | 141 | ||
142 | static int __init linkstation_probe(void) | 142 | static int __init linkstation_probe(void) |
143 | { | 143 | { |
144 | unsigned long root; | 144 | if (!of_machine_is_compatible("linkstation")) |
145 | |||
146 | root = of_get_flat_dt_root(); | ||
147 | |||
148 | if (!of_flat_dt_is_compatible(root, "linkstation")) | ||
149 | return 0; | 145 | return 0; |
150 | 146 | ||
151 | pm_power_off = linkstation_power_off; | 147 | pm_power_off = linkstation_power_off; |
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c index 3eda5df6281a..80804f9916ee 100644 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | |||
@@ -161,9 +161,7 @@ static void __noreturn mpc7448_hpc2_restart(char *cmd) | |||
161 | */ | 161 | */ |
162 | static int __init mpc7448_hpc2_probe(void) | 162 | static int __init mpc7448_hpc2_probe(void) |
163 | { | 163 | { |
164 | unsigned long root = of_get_flat_dt_root(); | 164 | if (!of_machine_is_compatible("mpc74xx")) |
165 | |||
166 | if (!of_flat_dt_is_compatible(root, "mpc74xx")) | ||
167 | return 0; | 165 | return 0; |
168 | return 1; | 166 | return 1; |
169 | } | 167 | } |
diff --git a/arch/powerpc/platforms/embedded6xx/mvme5100.c b/arch/powerpc/platforms/embedded6xx/mvme5100.c index 1382e1f27518..ed7321d6772e 100644 --- a/arch/powerpc/platforms/embedded6xx/mvme5100.c +++ b/arch/powerpc/platforms/embedded6xx/mvme5100.c | |||
@@ -194,9 +194,7 @@ static void __noreturn mvme5100_restart(char *cmd) | |||
194 | */ | 194 | */ |
195 | static int __init mvme5100_probe(void) | 195 | static int __init mvme5100_probe(void) |
196 | { | 196 | { |
197 | unsigned long root = of_get_flat_dt_root(); | 197 | return of_machine_is_compatible("MVME5100"); |
198 | |||
199 | return of_flat_dt_is_compatible(root, "MVME5100"); | ||
200 | } | 198 | } |
201 | 199 | ||
202 | static int __init probe_of_platform_devices(void) | 200 | static int __init probe_of_platform_devices(void) |
diff --git a/arch/powerpc/platforms/embedded6xx/storcenter.c b/arch/powerpc/platforms/embedded6xx/storcenter.c index 4596cba8c827..471a50bcd074 100644 --- a/arch/powerpc/platforms/embedded6xx/storcenter.c +++ b/arch/powerpc/platforms/embedded6xx/storcenter.c | |||
@@ -109,9 +109,7 @@ static void __noreturn storcenter_restart(char *cmd) | |||
109 | 109 | ||
110 | static int __init storcenter_probe(void) | 110 | static int __init storcenter_probe(void) |
111 | { | 111 | { |
112 | unsigned long root = of_get_flat_dt_root(); | 112 | return of_machine_is_compatible("iomega,storcenter"); |
113 | |||
114 | return of_flat_dt_is_compatible(root, "iomega,storcenter"); | ||
115 | } | 113 | } |
116 | 114 | ||
117 | define_machine(storcenter){ | 115 | define_machine(storcenter){ |
diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c index ebaecb88df26..fe3e769db263 100644 --- a/arch/powerpc/platforms/embedded6xx/wii.c +++ b/arch/powerpc/platforms/embedded6xx/wii.c | |||
@@ -205,10 +205,7 @@ static void __init wii_pic_probe(void) | |||
205 | 205 | ||
206 | static int __init wii_probe(void) | 206 | static int __init wii_probe(void) |
207 | { | 207 | { |
208 | unsigned long dt_root; | 208 | if (!of_machine_is_compatible("nintendo,wii")) |
209 | |||
210 | dt_root = of_get_flat_dt_root(); | ||
211 | if (!of_flat_dt_is_compatible(dt_root, "nintendo,wii")) | ||
212 | return 0; | 209 | return 0; |
213 | 210 | ||
214 | pm_power_off = wii_power_off; | 211 | pm_power_off = wii_power_off; |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 0872f9837cf5..60ca40ac3519 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -590,17 +590,9 @@ console_initcall(check_pmac_serial_console); | |||
590 | */ | 590 | */ |
591 | static int __init pmac_probe(void) | 591 | static int __init pmac_probe(void) |
592 | { | 592 | { |
593 | #ifdef CONFIG_PPC32 | ||
594 | unsigned long root = of_get_flat_dt_root(); | ||
595 | |||
596 | if (!of_flat_dt_is_compatible(root, "Power Macintosh") && | ||
597 | !of_flat_dt_is_compatible(root, "MacRISC")) | ||
598 | return 0; | ||
599 | #else | ||
600 | if (!of_machine_is_compatible("Power Macintosh") && | 593 | if (!of_machine_is_compatible("Power Macintosh") && |
601 | !of_machine_is_compatible("MacRISC")) | 594 | !of_machine_is_compatible("MacRISC")) |
602 | return 0; | 595 | return 0; |
603 | #endif | ||
604 | 596 | ||
605 | #ifdef CONFIG_PPC32 | 597 | #ifdef CONFIG_PPC32 |
606 | /* isa_io_base gets set in pmac_pci_init */ | 598 | /* isa_io_base gets set in pmac_pci_init */ |