diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-02-17 17:19:34 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-02-17 17:19:34 -0500 |
commit | 6936c62571d8dc580725775b628ee73d2ac97b6f (patch) | |
tree | 51af92ace6bf63ad3b2633847d851e730f509d4a | |
parent | 520948796335111cf91970efabca7e5d064db344 (diff) |
[POWERPC] 85xx: Cleaning up machine probing
Cleaned up the probing functionality to be more consistent across all 85xx
boards and actually check to see if we should be running on a given board.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc8568_mds.c | 17 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ads.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_cds.c | 8 |
3 files changed, 9 insertions, 23 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc8568_mds.c b/arch/powerpc/platforms/85xx/mpc8568_mds.c index 324138a206a4..0ba22a42f8df 100644 --- a/arch/powerpc/platforms/85xx/mpc8568_mds.c +++ b/arch/powerpc/platforms/85xx/mpc8568_mds.c | |||
@@ -74,7 +74,6 @@ static void __init mpc8568_mds_setup_arch(void) | |||
74 | struct device_node *np; | 74 | struct device_node *np; |
75 | static u8 *bcsr_regs = NULL; | 75 | static u8 *bcsr_regs = NULL; |
76 | 76 | ||
77 | |||
78 | if (ppc_md.progress) | 77 | if (ppc_md.progress) |
79 | ppc_md.progress("mpc8568_mds_setup_arch()", 0); | 78 | ppc_md.progress("mpc8568_mds_setup_arch()", 0); |
80 | 79 | ||
@@ -206,7 +205,6 @@ static void __init mpc8568_mds_pic_init(void) | |||
206 | 205 | ||
207 | mpic_init(mpic); | 206 | mpic_init(mpic); |
208 | 207 | ||
209 | |||
210 | #ifdef CONFIG_QUICC_ENGINE | 208 | #ifdef CONFIG_QUICC_ENGINE |
211 | np = of_find_node_by_type(NULL, "qeic"); | 209 | np = of_find_node_by_type(NULL, "qeic"); |
212 | if (!np) | 210 | if (!np) |
@@ -217,24 +215,15 @@ static void __init mpc8568_mds_pic_init(void) | |||
217 | #endif /* CONFIG_QUICC_ENGINE */ | 215 | #endif /* CONFIG_QUICC_ENGINE */ |
218 | } | 216 | } |
219 | 217 | ||
220 | |||
221 | static int __init mpc8568_mds_probe(void) | 218 | static int __init mpc8568_mds_probe(void) |
222 | { | 219 | { |
223 | char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), | 220 | unsigned long root = of_get_flat_dt_root(); |
224 | "model", NULL); | ||
225 | if (model == NULL) | ||
226 | return 0; | ||
227 | if (strcmp(model, "MPC8568EMDS")) | ||
228 | return 0; | ||
229 | |||
230 | DBG("MPC8568EMDS found\n"); | ||
231 | 221 | ||
232 | return 1; | 222 | return of_flat_dt_is_compatible(root, "MPC85xxMDS"); |
233 | } | 223 | } |
234 | 224 | ||
235 | |||
236 | define_machine(mpc8568_mds) { | 225 | define_machine(mpc8568_mds) { |
237 | .name = "MPC8568E MDS", | 226 | .name = "MPC85xx MDS", |
238 | .probe = mpc8568_mds_probe, | 227 | .probe = mpc8568_mds_probe, |
239 | .setup_arch = mpc8568_mds_setup_arch, | 228 | .setup_arch = mpc8568_mds_setup_arch, |
240 | .init_IRQ = mpc8568_mds_pic_init, | 229 | .init_IRQ = mpc8568_mds_pic_init, |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index 741bcea8f991..8ed034aeca5f 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -272,10 +272,9 @@ static void mpc85xx_ads_show_cpuinfo(struct seq_file *m) | |||
272 | */ | 272 | */ |
273 | static int __init mpc85xx_ads_probe(void) | 273 | static int __init mpc85xx_ads_probe(void) |
274 | { | 274 | { |
275 | /* We always match for now, eventually we should look at the flat | 275 | unsigned long root = of_get_flat_dt_root(); |
276 | dev tree to ensure this is the board we are suppose to run on | 276 | |
277 | */ | 277 | return of_flat_dt_is_compatible(root, "MPC85xxADS"); |
278 | return 1; | ||
279 | } | 278 | } |
280 | 279 | ||
281 | define_machine(mpc85xx_ads) { | 280 | define_machine(mpc85xx_ads) { |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index bf6c60455a89..4232686be441 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -291,11 +291,9 @@ static void mpc85xx_cds_show_cpuinfo(struct seq_file *m) | |||
291 | */ | 291 | */ |
292 | static int __init mpc85xx_cds_probe(void) | 292 | static int __init mpc85xx_cds_probe(void) |
293 | { | 293 | { |
294 | /* We always match for now, eventually we should look at | 294 | unsigned long root = of_get_flat_dt_root(); |
295 | * the flat dev tree to ensure this is the board we are | 295 | |
296 | * supposed to run on | 296 | return of_flat_dt_is_compatible(root, "MPC85xxCDS"); |
297 | */ | ||
298 | return 1; | ||
299 | } | 297 | } |
300 | 298 | ||
301 | define_machine(mpc85xx_cds) { | 299 | define_machine(mpc85xx_cds) { |