diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2008-04-28 12:14:26 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-04-28 12:14:26 -0400 |
commit | 39b8d5254246ac56342b72f812255c8f7a74dca9 (patch) | |
tree | a9ec6bfb5d09a8367c34cc2067328d1b49bb46c1 /include/asm-mips/mips-boards | |
parent | 308402445e005a039a72b315cd9b5ceeaea0063c (diff) |
[MIPS] Add support for MIPS CMP platform.
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/mips-boards')
-rw-r--r-- | include/asm-mips/mips-boards/launch.h | 35 | ||||
-rw-r--r-- | include/asm-mips/mips-boards/malta.h | 23 | ||||
-rw-r--r-- | include/asm-mips/mips-boards/maltaint.h | 27 | ||||
-rw-r--r-- | include/asm-mips/mips-boards/maltasmp.h | 36 |
4 files changed, 121 insertions, 0 deletions
diff --git a/include/asm-mips/mips-boards/launch.h b/include/asm-mips/mips-boards/launch.h new file mode 100644 index 000000000000..d8ae7f95a522 --- /dev/null +++ b/include/asm-mips/mips-boards/launch.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * | ||
3 | */ | ||
4 | |||
5 | #ifndef _ASSEMBLER_ | ||
6 | |||
7 | struct cpulaunch { | ||
8 | unsigned long pc; | ||
9 | unsigned long gp; | ||
10 | unsigned long sp; | ||
11 | unsigned long a0; | ||
12 | unsigned long _pad[3]; /* pad to cache line size to avoid thrashing */ | ||
13 | unsigned long flags; | ||
14 | }; | ||
15 | |||
16 | #else | ||
17 | |||
18 | #define LOG2CPULAUNCH 5 | ||
19 | #define LAUNCH_PC 0 | ||
20 | #define LAUNCH_GP 4 | ||
21 | #define LAUNCH_SP 8 | ||
22 | #define LAUNCH_A0 12 | ||
23 | #define LAUNCH_FLAGS 28 | ||
24 | |||
25 | #endif | ||
26 | |||
27 | #define LAUNCH_FREADY 1 | ||
28 | #define LAUNCH_FGO 2 | ||
29 | #define LAUNCH_FGONE 4 | ||
30 | |||
31 | #define CPULAUNCH 0x00000f00 | ||
32 | #define NCPULAUNCH 8 | ||
33 | |||
34 | /* Polling period in count cycles for secondary CPU's */ | ||
35 | #define LAUNCHPERIOD 10000 | ||
diff --git a/include/asm-mips/mips-boards/malta.h b/include/asm-mips/mips-boards/malta.h index 93bf4e51b8a4..c1891578fa65 100644 --- a/include/asm-mips/mips-boards/malta.h +++ b/include/asm-mips/mips-boards/malta.h | |||
@@ -52,6 +52,29 @@ static inline unsigned long get_msc_port_base(unsigned long reg) | |||
52 | } | 52 | } |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * GCMP Specific definitions | ||
56 | */ | ||
57 | #define GCMP_BASE_ADDR 0x1fbf8000 | ||
58 | #define GCMP_ADDRSPACE_SZ (256 * 1024) | ||
59 | |||
60 | /* | ||
61 | * GIC Specific definitions | ||
62 | */ | ||
63 | #define GIC_BASE_ADDR 0x1bdc0000 | ||
64 | #define GIC_ADDRSPACE_SZ (128 * 1024) | ||
65 | |||
66 | /* | ||
67 | * MSC01 BIU Specific definitions | ||
68 | * FIXME : These should be elsewhere ? | ||
69 | */ | ||
70 | #define MSC01_BIU_REG_BASE 0x1bc80000 | ||
71 | #define MSC01_BIU_ADDRSPACE_SZ (256 * 1024) | ||
72 | #define MSC01_SC_CFG_OFS 0x0110 | ||
73 | #define MSC01_SC_CFG_GICPRES_MSK 0x00000004 | ||
74 | #define MSC01_SC_CFG_GICPRES_SHF 2 | ||
75 | #define MSC01_SC_CFG_GICENA_SHF 3 | ||
76 | |||
77 | /* | ||
55 | * Malta RTC-device indirect register access. | 78 | * Malta RTC-device indirect register access. |
56 | */ | 79 | */ |
57 | #define MALTA_RTC_ADR_REG 0x70 | 80 | #define MALTA_RTC_ADR_REG 0x70 |
diff --git a/include/asm-mips/mips-boards/maltaint.h b/include/asm-mips/mips-boards/maltaint.h index 7461318f1cd1..cea872fc6f5c 100644 --- a/include/asm-mips/mips-boards/maltaint.h +++ b/include/asm-mips/mips-boards/maltaint.h | |||
@@ -39,7 +39,9 @@ | |||
39 | #define MIPSCPU_INT_I8259A MIPSCPU_INT_MB0 | 39 | #define MIPSCPU_INT_I8259A MIPSCPU_INT_MB0 |
40 | #define MIPSCPU_INT_MB1 3 | 40 | #define MIPSCPU_INT_MB1 3 |
41 | #define MIPSCPU_INT_SMI MIPSCPU_INT_MB1 | 41 | #define MIPSCPU_INT_SMI MIPSCPU_INT_MB1 |
42 | #define MIPSCPU_INT_IPI0 MIPSCPU_INT_MB1 /* GIC IPI */ | ||
42 | #define MIPSCPU_INT_MB2 4 | 43 | #define MIPSCPU_INT_MB2 4 |
44 | #define MIPSCPU_INT_IPI1 MIPSCPU_INT_MB2 /* GIC IPI */ | ||
43 | #define MIPSCPU_INT_MB3 5 | 45 | #define MIPSCPU_INT_MB3 5 |
44 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 | 46 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 |
45 | #define MIPSCPU_INT_MB4 6 | 47 | #define MIPSCPU_INT_MB4 6 |
@@ -76,6 +78,31 @@ | |||
76 | #define MSC01E_INT_PERFCTR 10 | 78 | #define MSC01E_INT_PERFCTR 10 |
77 | #define MSC01E_INT_CPUCTR 11 | 79 | #define MSC01E_INT_CPUCTR 11 |
78 | 80 | ||
81 | /* GIC's Nomenclature for Core Interrupt Pins on the Malta */ | ||
82 | #define GIC_CPU_INT0 0 /* Core Interrupt 2 */ | ||
83 | #define GIC_CPU_INT1 1 /* . */ | ||
84 | #define GIC_CPU_INT2 2 /* . */ | ||
85 | #define GIC_CPU_INT3 3 /* . */ | ||
86 | #define GIC_CPU_INT4 4 /* . */ | ||
87 | #define GIC_CPU_INT5 5 /* Core Interrupt 5 */ | ||
88 | |||
89 | #define GIC_EXT_INTR(x) x | ||
90 | |||
91 | /* Dummy data */ | ||
92 | #define X 0xdead | ||
93 | |||
94 | /* External Interrupts used for IPI */ | ||
95 | #define GIC_IPI_EXT_INTR_RESCHED_VPE0 16 | ||
96 | #define GIC_IPI_EXT_INTR_CALLFNC_VPE0 17 | ||
97 | #define GIC_IPI_EXT_INTR_RESCHED_VPE1 18 | ||
98 | #define GIC_IPI_EXT_INTR_CALLFNC_VPE1 19 | ||
99 | #define GIC_IPI_EXT_INTR_RESCHED_VPE2 20 | ||
100 | #define GIC_IPI_EXT_INTR_CALLFNC_VPE2 21 | ||
101 | #define GIC_IPI_EXT_INTR_RESCHED_VPE3 22 | ||
102 | #define GIC_IPI_EXT_INTR_CALLFNC_VPE3 23 | ||
103 | |||
104 | #define MIPS_GIC_IRQ_BASE (MIPS_CPU_IRQ_BASE + 8) | ||
105 | |||
79 | #ifndef __ASSEMBLY__ | 106 | #ifndef __ASSEMBLY__ |
80 | extern void maltaint_init(void); | 107 | extern void maltaint_init(void); |
81 | #endif | 108 | #endif |
diff --git a/include/asm-mips/mips-boards/maltasmp.h b/include/asm-mips/mips-boards/maltasmp.h new file mode 100644 index 000000000000..8d7e955d506e --- /dev/null +++ b/include/asm-mips/mips-boards/maltasmp.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * There are several SMP models supported | ||
3 | * SMTC is mutually exclusive to other options (atm) | ||
4 | */ | ||
5 | #if defined(CONFIG_MIPS_MT_SMTC) | ||
6 | #define malta_smtc 1 | ||
7 | #define malta_cmp 0 | ||
8 | #define malta_smvp 0 | ||
9 | #else | ||
10 | #define malta_smtc 0 | ||
11 | #if defined(CONFIG_MIPS_CMP) | ||
12 | extern int gcmp_present; | ||
13 | #define malta_cmp gcmp_present | ||
14 | #else | ||
15 | #define malta_cmp 0 | ||
16 | #endif | ||
17 | /* FIXME: should become COMFIG_MIPS_MT_SMVP */ | ||
18 | #if defined(CONFIG_MIPS_MT_SMP) | ||
19 | #define malta_smvp 1 | ||
20 | #else | ||
21 | #define malta_smvp 0 | ||
22 | #endif | ||
23 | #endif | ||
24 | |||
25 | #include <asm/mipsregs.h> | ||
26 | #include <asm/mipsmtregs.h> | ||
27 | |||
28 | /* malta_smtc */ | ||
29 | #include <asm/smtc.h> | ||
30 | #include <asm/smtc_ipi.h> | ||
31 | |||
32 | /* malta_cmp */ | ||
33 | #include <asm/cmp.h> | ||
34 | |||
35 | /* malta_smvp */ | ||
36 | #include <asm/smvp.h> | ||