aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/mti-malta/malta-init.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-07-07 11:55:05 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-07-07 11:55:05 +0900
commit2b5c0c72ea404d6b554a8284031dd78748314b9e (patch)
tree468b7f3d8db0abe6a09ee221dce1de5de2bb8d12 /arch/mips/mti-malta/malta-init.c
parent2dbc8a23cc2e677422f6dea991aca4e3d31ab65f (diff)
parentdc53fffc105f68cb08ca872acd51550e89aa2e67 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh/for-2.6.31
Diffstat (limited to 'arch/mips/mti-malta/malta-init.c')
-rw-r--r--arch/mips/mti-malta/malta-init.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
index 475038a141a..27c807b67fe 100644
--- a/arch/mips/mti-malta/malta-init.c
+++ b/arch/mips/mti-malta/malta-init.c
@@ -30,6 +30,7 @@
#include <asm/cacheflush.h>
#include <asm/traps.h>
+#include <asm/gcmpregs.h>
#include <asm/mips-boards/prom.h>
#include <asm/mips-boards/generic.h>
#include <asm/mips-boards/bonito64.h>
@@ -192,6 +193,8 @@ extern struct plat_smp_ops msmtc_smp_ops;
void __init prom_init(void)
{
+ int result;
+
prom_argc = fw_arg0;
_prom_argv = (int *) fw_arg1;
_prom_envp = (int *) fw_arg2;
@@ -358,12 +361,21 @@ void __init prom_init(void)
#ifdef CONFIG_SERIAL_8250_CONSOLE
console_config();
#endif
+ /* Early detection of CMP support */
+ result = gcmp_probe(GCMP_BASE_ADDR, GCMP_ADDRSPACE_SZ);
+
#ifdef CONFIG_MIPS_CMP
- register_smp_ops(&cmp_smp_ops);
+ if (result)
+ register_smp_ops(&cmp_smp_ops);
#endif
#ifdef CONFIG_MIPS_MT_SMP
+#ifdef CONFIG_MIPS_CMP
+ if (!result)
+ register_smp_ops(&vsmp_smp_ops);
+#else
register_smp_ops(&vsmp_smp_ops);
#endif
+#endif
#ifdef CONFIG_MIPS_MT_SMTC
register_smp_ops(&msmtc_smp_ops);
#endif