Commit 455d23a8 authored by Kevin Hao's avatar Kevin Hao Committed by Scott Wood

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: default avatarKevin Hao <haokexin@gmail.com>
Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
parent 0ff649ca
...@@ -389,15 +389,18 @@ static void mpc85xx_smp_machine_kexec(struct kimage *image) ...@@ -389,15 +389,18 @@ static void mpc85xx_smp_machine_kexec(struct kimage *image)
} }
#endif /* CONFIG_KEXEC */ #endif /* CONFIG_KEXEC */
static void smp_85xx_setup_cpu(int cpu_nr) static void smp_85xx_basic_setup(int cpu_nr)
{ {
if (smp_85xx_ops.probe == smp_mpic_probe)
mpic_setup_this_cpu();
if (cpu_has_feature(CPU_FTR_DBELL)) if (cpu_has_feature(CPU_FTR_DBELL))
doorbell_setup_this_cpu(); doorbell_setup_this_cpu();
} }
static void smp_85xx_setup_cpu(int cpu_nr)
{
mpic_setup_this_cpu();
smp_85xx_basic_setup(cpu_nr);
}
static const struct of_device_id mpc85xx_smp_guts_ids[] = { static const struct of_device_id mpc85xx_smp_guts_ids[] = {
{ .compatible = "fsl,mpc8572-guts", }, { .compatible = "fsl,mpc8572-guts", },
{ .compatible = "fsl,p1020-guts", }, { .compatible = "fsl,p1020-guts", },
...@@ -412,13 +415,14 @@ void __init mpc85xx_smp_init(void) ...@@ -412,13 +415,14 @@ void __init mpc85xx_smp_init(void)
{ {
struct device_node *np; struct device_node *np;
smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu;
np = of_find_node_by_type(NULL, "open-pic"); np = of_find_node_by_type(NULL, "open-pic");
if (np) { if (np) {
smp_85xx_ops.probe = smp_mpic_probe; smp_85xx_ops.probe = smp_mpic_probe;
smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu;
smp_85xx_ops.message_pass = smp_mpic_message_pass; smp_85xx_ops.message_pass = smp_mpic_message_pass;
} } else
smp_85xx_ops.setup_cpu = smp_85xx_basic_setup;
if (cpu_has_feature(CPU_FTR_DBELL)) { if (cpu_has_feature(CPU_FTR_DBELL)) {
/* /*
...@@ -427,6 +431,7 @@ void __init mpc85xx_smp_init(void) ...@@ -427,6 +431,7 @@ void __init mpc85xx_smp_init(void)
*/ */
smp_85xx_ops.message_pass = NULL; smp_85xx_ops.message_pass = NULL;
smp_85xx_ops.cause_ipi = doorbell_cause_ipi; smp_85xx_ops.cause_ipi = doorbell_cause_ipi;
smp_85xx_ops.probe = NULL;
} }
np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids); np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment