aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/85xx
diff options
context:
space:
mode:
authorKevin Hao <haokexin@gmail.com>2013-11-07 02:17:17 -0500
committerScott Wood <scottwood@freescale.com>2014-01-07 20:06:03 -0500
commit455d23a8908319fa7ad450e65e4f09afb45057a7 (patch)
tree48175b602d55e1c26092ddcddbca132ca76bad57 /arch/powerpc/platforms/85xx
parent0ff649ca50355352d4dbe3fcd7e6b3587d226d54 (diff)
powerpc/85xx: don't init the mpic ipi for the SoC which has doorbell support
It makes no sense to initialize the mpic ipi for the SoC which has doorbell support. So set the smp_85xx_ops.probe to NULL for this case. Since the smp_85xx_ops.probe is also used in function smp_85xx_setup_cpu() to check if we need to invoke mpic_setup_this_cpu(), we introduce a new setup_cpu function smp_85xx_basic_setup() to remove this dependency. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc/platforms/85xx')
-rw-r--r--arch/powerpc/platforms/85xx/smp.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index 393f975ab397..6382098d6f8d 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -389,15 +389,18 @@ static void mpc85xx_smp_machine_kexec(struct kimage *image)
389} 389}
390#endif /* CONFIG_KEXEC */ 390#endif /* CONFIG_KEXEC */
391 391
392static void smp_85xx_setup_cpu(int cpu_nr) 392static void smp_85xx_basic_setup(int cpu_nr)
393{ 393{
394 if (smp_85xx_ops.probe == smp_mpic_probe)
395 mpic_setup_this_cpu();
396
397 if (cpu_has_feature(CPU_FTR_DBELL)) 394 if (cpu_has_feature(CPU_FTR_DBELL))
398 doorbell_setup_this_cpu(); 395 doorbell_setup_this_cpu();
399} 396}
400 397
398static void smp_85xx_setup_cpu(int cpu_nr)
399{
400 mpic_setup_this_cpu();
401 smp_85xx_basic_setup(cpu_nr);
402}
403
401static const struct of_device_id mpc85xx_smp_guts_ids[] = { 404static const struct of_device_id mpc85xx_smp_guts_ids[] = {
402 { .compatible = "fsl,mpc8572-guts", }, 405 { .compatible = "fsl,mpc8572-guts", },
403 { .compatible = "fsl,p1020-guts", }, 406 { .compatible = "fsl,p1020-guts", },
@@ -412,13 +415,14 @@ void __init mpc85xx_smp_init(void)
412{ 415{
413 struct device_node *np; 416 struct device_node *np;
414 417
415 smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu;
416 418
417 np = of_find_node_by_type(NULL, "open-pic"); 419 np = of_find_node_by_type(NULL, "open-pic");
418 if (np) { 420 if (np) {
419 smp_85xx_ops.probe = smp_mpic_probe; 421 smp_85xx_ops.probe = smp_mpic_probe;
422 smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu;
420 smp_85xx_ops.message_pass = smp_mpic_message_pass; 423 smp_85xx_ops.message_pass = smp_mpic_message_pass;
421 } 424 } else
425 smp_85xx_ops.setup_cpu = smp_85xx_basic_setup;
422 426
423 if (cpu_has_feature(CPU_FTR_DBELL)) { 427 if (cpu_has_feature(CPU_FTR_DBELL)) {
424 /* 428 /*
@@ -427,6 +431,7 @@ void __init mpc85xx_smp_init(void)
427 */ 431 */
428 smp_85xx_ops.message_pass = NULL; 432 smp_85xx_ops.message_pass = NULL;
429 smp_85xx_ops.cause_ipi = doorbell_cause_ipi; 433 smp_85xx_ops.cause_ipi = doorbell_cause_ipi;
434 smp_85xx_ops.probe = NULL;
430 } 435 }
431 436
432 np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids); 437 np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids);