2 * arch/sh/boards/saturn/smp.c
4 * SMP support for the Sega Saturn.
6 * Copyright (c) 2002 Paul Mundt
8 * Released under the terms of the GNU GPL v2.0.
10 #include <linux/kernel.h>
11 #include <linux/init.h>
12 #include <linux/smp.h>
14 #include <asm/saturn/smpc.h>
16 extern void start_secondary(void);
18 void __smp_send_ipi(unsigned int cpu
, unsigned int action
)
20 /* Nothing here yet .. */
23 unsigned int __smp_probe_cpus(void)
26 * This is just a straightforward master/slave configuration,
27 * and probing isn't really supported..
33 * We're only allowed to do byte-access to SMPC registers. In
34 * addition to which, we treat them as write-only, since
35 * reading from them will return undefined data.
37 static inline void smpc_slave_stop(unsigned int cpu
)
40 ctrl_outb(1, SMPC_STATUS
);
42 ctrl_outb(SMPC_CMD_SSHOFF
, SMPC_COMMAND
);
46 static inline void smpc_slave_start(unsigned int cpu
)
48 ctrl_outb(1, SMPC_STATUS
);
49 ctrl_outb(SMPC_CMD_SSHON
, SMPC_COMMAND
);
54 void __smp_slave_init(unsigned int cpu
)
56 register unsigned long vbr
;
59 __asm__
__volatile__ ("stc vbr, %0\n\t" : "=r" (vbr
));
60 entry
= (void **)(vbr
+ 0x310 + 0x94);
64 *(void **)entry
= (void *)start_secondary
;
66 smpc_slave_start(cpu
);