diff options
-rw-r--r-- | arch/mips/include/asm/gcmpregs.h | 2 | ||||
-rw-r--r-- | arch/mips/mti-malta/malta-init.c | 14 | ||||
-rw-r--r-- | arch/mips/mti-malta/malta-int.c | 5 |
3 files changed, 16 insertions, 5 deletions
diff --git a/arch/mips/include/asm/gcmpregs.h b/arch/mips/include/asm/gcmpregs.h index d74a8a4ca861..36fd969d64d6 100644 --- a/arch/mips/include/asm/gcmpregs.h +++ b/arch/mips/include/asm/gcmpregs.h | |||
@@ -114,4 +114,6 @@ | |||
114 | #define GCMP_CCB_DINTGROUP_OFS 0x0030 /* DINT Group Participate */ | 114 | #define GCMP_CCB_DINTGROUP_OFS 0x0030 /* DINT Group Participate */ |
115 | #define GCMP_CCB_DBGGROUP_OFS 0x0100 /* DebugBreak Group */ | 115 | #define GCMP_CCB_DBGGROUP_OFS 0x0100 /* DebugBreak Group */ |
116 | 116 | ||
117 | extern int __init gcmp_probe(unsigned long, unsigned long); | ||
118 | |||
117 | #endif /* _ASM_GCMPREGS_H */ | 119 | #endif /* _ASM_GCMPREGS_H */ |
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c index 475038a141a6..27c807b67fea 100644 --- a/arch/mips/mti-malta/malta-init.c +++ b/arch/mips/mti-malta/malta-init.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/cacheflush.h> | 30 | #include <asm/cacheflush.h> |
31 | #include <asm/traps.h> | 31 | #include <asm/traps.h> |
32 | 32 | ||
33 | #include <asm/gcmpregs.h> | ||
33 | #include <asm/mips-boards/prom.h> | 34 | #include <asm/mips-boards/prom.h> |
34 | #include <asm/mips-boards/generic.h> | 35 | #include <asm/mips-boards/generic.h> |
35 | #include <asm/mips-boards/bonito64.h> | 36 | #include <asm/mips-boards/bonito64.h> |
@@ -192,6 +193,8 @@ extern struct plat_smp_ops msmtc_smp_ops; | |||
192 | 193 | ||
193 | void __init prom_init(void) | 194 | void __init prom_init(void) |
194 | { | 195 | { |
196 | int result; | ||
197 | |||
195 | prom_argc = fw_arg0; | 198 | prom_argc = fw_arg0; |
196 | _prom_argv = (int *) fw_arg1; | 199 | _prom_argv = (int *) fw_arg1; |
197 | _prom_envp = (int *) fw_arg2; | 200 | _prom_envp = (int *) fw_arg2; |
@@ -358,12 +361,21 @@ void __init prom_init(void) | |||
358 | #ifdef CONFIG_SERIAL_8250_CONSOLE | 361 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
359 | console_config(); | 362 | console_config(); |
360 | #endif | 363 | #endif |
364 | /* Early detection of CMP support */ | ||
365 | result = gcmp_probe(GCMP_BASE_ADDR, GCMP_ADDRSPACE_SZ); | ||
366 | |||
361 | #ifdef CONFIG_MIPS_CMP | 367 | #ifdef CONFIG_MIPS_CMP |
362 | register_smp_ops(&cmp_smp_ops); | 368 | if (result) |
369 | register_smp_ops(&cmp_smp_ops); | ||
363 | #endif | 370 | #endif |
364 | #ifdef CONFIG_MIPS_MT_SMP | 371 | #ifdef CONFIG_MIPS_MT_SMP |
372 | #ifdef CONFIG_MIPS_CMP | ||
373 | if (!result) | ||
374 | register_smp_ops(&vsmp_smp_ops); | ||
375 | #else | ||
365 | register_smp_ops(&vsmp_smp_ops); | 376 | register_smp_ops(&vsmp_smp_ops); |
366 | #endif | 377 | #endif |
378 | #endif | ||
367 | #ifdef CONFIG_MIPS_MT_SMTC | 379 | #ifdef CONFIG_MIPS_MT_SMTC |
368 | register_smp_ops(&msmtc_smp_ops); | 380 | register_smp_ops(&msmtc_smp_ops); |
369 | #endif | 381 | #endif |
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c index bc0ba58acfd5..a8756f82c31b 100644 --- a/arch/mips/mti-malta/malta-int.c +++ b/arch/mips/mti-malta/malta-int.c | |||
@@ -409,7 +409,7 @@ static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { | |||
409 | /* | 409 | /* |
410 | * GCMP needs to be detected before any SMP initialisation | 410 | * GCMP needs to be detected before any SMP initialisation |
411 | */ | 411 | */ |
412 | static int __init gcmp_probe(unsigned long addr, unsigned long size) | 412 | int __init gcmp_probe(unsigned long addr, unsigned long size) |
413 | { | 413 | { |
414 | if (gcmp_present >= 0) | 414 | if (gcmp_present >= 0) |
415 | return gcmp_present; | 415 | return gcmp_present; |
@@ -449,14 +449,11 @@ static void __init fill_ipi_map(void) | |||
449 | 449 | ||
450 | void __init arch_init_irq(void) | 450 | void __init arch_init_irq(void) |
451 | { | 451 | { |
452 | int gic_present, gcmp_present; | ||
453 | |||
454 | init_i8259_irqs(); | 452 | init_i8259_irqs(); |
455 | 453 | ||
456 | if (!cpu_has_veic) | 454 | if (!cpu_has_veic) |
457 | mips_cpu_irq_init(); | 455 | mips_cpu_irq_init(); |
458 | 456 | ||
459 | gcmp_present = gcmp_probe(GCMP_BASE_ADDR, GCMP_ADDRSPACE_SZ); | ||
460 | if (gcmp_present) { | 457 | if (gcmp_present) { |
461 | GCMPGCB(GICBA) = GIC_BASE_ADDR | GCMP_GCB_GICBA_EN_MSK; | 458 | GCMPGCB(GICBA) = GIC_BASE_ADDR | GCMP_GCB_GICBA_EN_MSK; |
462 | gic_present = 1; | 459 | gic_present = 1; |