Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138546
b: refs/heads/master
c: 563fdd4
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala committed Mar 11, 2009
1 parent cdc7da7 commit eea62ea
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a3d1fc2273c6736ad2d19058e0413bc830c5e4d
refs/heads/master: 563fdd4a0af509d8cb78901750f7d00db345d864
43 changes: 35 additions & 8 deletions trunk/arch/powerpc/platforms/85xx/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <asm/page.h>
#include <asm/mpic.h>
#include <asm/cacheflush.h>
#include <asm/dbell.h>

#include <sysdev/fsl_soc.h>

Expand Down Expand Up @@ -80,26 +81,52 @@ smp_85xx_kick_cpu(int nr)
}

static void __init
smp_85xx_setup_cpu(int cpu_nr)
smp_85xx_basic_setup(int cpu_nr)
{
mpic_setup_this_cpu();

/* Clear any pending timer interrupts */
mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);

/* Enable decrementer interrupt */
mtspr(SPRN_TCR, TCR_DIE);
}

static void __init
smp_85xx_setup_cpu(int cpu_nr)
{
mpic_setup_this_cpu();

smp_85xx_basic_setup(cpu_nr);
}

struct smp_ops_t smp_85xx_ops = {
.message_pass = smp_mpic_message_pass,
.probe = smp_mpic_probe,
.kick_cpu = smp_85xx_kick_cpu,
.setup_cpu = smp_85xx_setup_cpu,
};

void __init
mpc85xx_smp_init(void)
static int __init smp_dummy_probe(void)
{
return NR_CPUS;
}

void __init mpc85xx_smp_init(void)
{
struct device_node *np;

smp_85xx_ops.message_pass = NULL;

np = of_find_node_by_type(NULL, "open-pic");
if (np) {
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;
} else {
smp_85xx_ops.probe = smp_dummy_probe;
smp_85xx_ops.setup_cpu = smp_85xx_basic_setup;
}

if (cpu_has_feature(CPU_FTR_DBELL))
smp_85xx_ops.message_pass = smp_dbell_message_pass;

BUG_ON(!smp_85xx_ops.message_pass);

smp_ops = &smp_85xx_ops;
}

0 comments on commit eea62ea

Please sign in to comment.