diff options
author | Yonghong Song <ysong@broadcom.com> | 2014-04-29 10:37:53 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-30 10:50:38 -0400 |
commit | 1c98398662c9b4e2f03f64344f83dd6cb14e0420 (patch) | |
tree | b04a7f5b706430ac41cec627a6844944f7b58f57 /arch/mips | |
parent | edf3ed5e69bcf3f60087099eccab34be0ebcf60a (diff) |
MIPS: Netlogic: Add support for XLP5XX
Add support for the XLP5XX processor which is an 8 core variant of the
XLP9XX. Add XLP5XX cases to code which earlier handled XLP9XX.
Signed-off-by: Yonghong Song <ysong@broadcom.com>
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6871/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/cpu.h | 1 | ||||
-rw-r--r-- | arch/mips/include/asm/netlogic/mips-extns.h | 3 | ||||
-rw-r--r-- | arch/mips/include/asm/netlogic/xlp-hal/xlp.h | 6 | ||||
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 1 | ||||
-rw-r--r-- | arch/mips/netlogic/common/reset.S | 4 | ||||
-rw-r--r-- | arch/mips/netlogic/xlp/dt.c | 1 | ||||
-rw-r--r-- | arch/mips/netlogic/xlp/setup.c | 1 | ||||
-rw-r--r-- | arch/mips/netlogic/xlp/wakeup.c | 10 |
8 files changed, 23 insertions, 4 deletions
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h index 39826a77b9f3..129d08701e91 100644 --- a/arch/mips/include/asm/cpu.h +++ b/arch/mips/include/asm/cpu.h | |||
@@ -201,6 +201,7 @@ | |||
201 | #define PRID_IMP_NETLOGIC_XLP3XX 0x1100 | 201 | #define PRID_IMP_NETLOGIC_XLP3XX 0x1100 |
202 | #define PRID_IMP_NETLOGIC_XLP2XX 0x1200 | 202 | #define PRID_IMP_NETLOGIC_XLP2XX 0x1200 |
203 | #define PRID_IMP_NETLOGIC_XLP9XX 0x1500 | 203 | #define PRID_IMP_NETLOGIC_XLP9XX 0x1500 |
204 | #define PRID_IMP_NETLOGIC_XLP5XX 0x1300 | ||
204 | 205 | ||
205 | /* | 206 | /* |
206 | * Particular Revision values for bits 7:0 of the PRId register. | 207 | * Particular Revision values for bits 7:0 of the PRId register. |
diff --git a/arch/mips/include/asm/netlogic/mips-extns.h b/arch/mips/include/asm/netlogic/mips-extns.h index 38af905bf07e..06f1f75bfa9b 100644 --- a/arch/mips/include/asm/netlogic/mips-extns.h +++ b/arch/mips/include/asm/netlogic/mips-extns.h | |||
@@ -148,7 +148,8 @@ static inline int nlm_nodeid(void) | |||
148 | { | 148 | { |
149 | uint32_t prid = read_c0_prid() & PRID_IMP_MASK; | 149 | uint32_t prid = read_c0_prid() & PRID_IMP_MASK; |
150 | 150 | ||
151 | if (prid == PRID_IMP_NETLOGIC_XLP9XX) | 151 | if ((prid == PRID_IMP_NETLOGIC_XLP9XX) || |
152 | (prid == PRID_IMP_NETLOGIC_XLP5XX)) | ||
152 | return (__read_32bit_c0_register($15, 1) >> 7) & 0x7; | 153 | return (__read_32bit_c0_register($15, 1) >> 7) & 0x7; |
153 | else | 154 | else |
154 | return (__read_32bit_c0_register($15, 1) >> 5) & 0x3; | 155 | return (__read_32bit_c0_register($15, 1) >> 5) & 0x3; |
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h index a11b289956e6..62d19871b983 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h | |||
@@ -102,14 +102,16 @@ static inline int cpu_is_xlpii(void) | |||
102 | int chip = read_c0_prid() & PRID_IMP_MASK; | 102 | int chip = read_c0_prid() & PRID_IMP_MASK; |
103 | 103 | ||
104 | return chip == PRID_IMP_NETLOGIC_XLP2XX || | 104 | return chip == PRID_IMP_NETLOGIC_XLP2XX || |
105 | chip == PRID_IMP_NETLOGIC_XLP9XX; | 105 | chip == PRID_IMP_NETLOGIC_XLP9XX || |
106 | chip == PRID_IMP_NETLOGIC_XLP5XX; | ||
106 | } | 107 | } |
107 | 108 | ||
108 | static inline int cpu_is_xlp9xx(void) | 109 | static inline int cpu_is_xlp9xx(void) |
109 | { | 110 | { |
110 | int chip = read_c0_prid() & PRID_IMP_MASK; | 111 | int chip = read_c0_prid() & PRID_IMP_MASK; |
111 | 112 | ||
112 | return chip == PRID_IMP_NETLOGIC_XLP9XX; | 113 | return chip == PRID_IMP_NETLOGIC_XLP9XX || |
114 | chip == PRID_IMP_NETLOGIC_XLP5XX; | ||
113 | } | 115 | } |
114 | #endif /* !__ASSEMBLY__ */ | 116 | #endif /* !__ASSEMBLY__ */ |
115 | #endif /* _ASM_NLM_XLP_H */ | 117 | #endif /* _ASM_NLM_XLP_H */ |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index e8638c5b7d11..f34000b27bf1 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -1059,6 +1059,7 @@ static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu) | |||
1059 | switch (c->processor_id & PRID_IMP_MASK) { | 1059 | switch (c->processor_id & PRID_IMP_MASK) { |
1060 | case PRID_IMP_NETLOGIC_XLP2XX: | 1060 | case PRID_IMP_NETLOGIC_XLP2XX: |
1061 | case PRID_IMP_NETLOGIC_XLP9XX: | 1061 | case PRID_IMP_NETLOGIC_XLP9XX: |
1062 | case PRID_IMP_NETLOGIC_XLP5XX: | ||
1062 | c->cputype = CPU_XLP; | 1063 | c->cputype = CPU_XLP; |
1063 | __cpu_name[cpu] = "Broadcom XLPII"; | 1064 | __cpu_name[cpu] = "Broadcom XLPII"; |
1064 | break; | 1065 | break; |
diff --git a/arch/mips/netlogic/common/reset.S b/arch/mips/netlogic/common/reset.S index 5b60b469da15..701c4bcb9e47 100644 --- a/arch/mips/netlogic/common/reset.S +++ b/arch/mips/netlogic/common/reset.S | |||
@@ -177,6 +177,10 @@ FEXPORT(nlm_reset_entry) | |||
177 | beq t0, t1, 2f /* does not need to set coherent */ | 177 | beq t0, t1, 2f /* does not need to set coherent */ |
178 | nop | 178 | nop |
179 | 179 | ||
180 | li t1, 0x1300 /* XLP 5xx */ | ||
181 | beq t0, t1, 2f /* does not need to set coherent */ | ||
182 | nop | ||
183 | |||
180 | /* set bit in SYS coherent register for the core */ | 184 | /* set bit in SYS coherent register for the core */ |
181 | mfc0 t0, CP0_EBASE, 1 | 185 | mfc0 t0, CP0_EBASE, 1 |
182 | mfc0 t1, CP0_EBASE, 1 | 186 | mfc0 t1, CP0_EBASE, 1 |
diff --git a/arch/mips/netlogic/xlp/dt.c b/arch/mips/netlogic/xlp/dt.c index 0b36ac80a232..bba993a5b1b0 100644 --- a/arch/mips/netlogic/xlp/dt.c +++ b/arch/mips/netlogic/xlp/dt.c | |||
@@ -51,6 +51,7 @@ void __init *xlp_dt_init(void *fdtp) | |||
51 | switch (current_cpu_data.processor_id & PRID_IMP_MASK) { | 51 | switch (current_cpu_data.processor_id & PRID_IMP_MASK) { |
52 | #ifdef CONFIG_DT_XLP_GVP | 52 | #ifdef CONFIG_DT_XLP_GVP |
53 | case PRID_IMP_NETLOGIC_XLP9XX: | 53 | case PRID_IMP_NETLOGIC_XLP9XX: |
54 | case PRID_IMP_NETLOGIC_XLP5XX: | ||
54 | fdtp = __dtb_xlp_gvp_begin; | 55 | fdtp = __dtb_xlp_gvp_begin; |
55 | break; | 56 | break; |
56 | #endif | 57 | #endif |
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c index 1ddb62bd354b..4fdd9fd29d1d 100644 --- a/arch/mips/netlogic/xlp/setup.c +++ b/arch/mips/netlogic/xlp/setup.c | |||
@@ -123,6 +123,7 @@ const char *get_system_type(void) | |||
123 | { | 123 | { |
124 | switch (read_c0_prid() & PRID_IMP_MASK) { | 124 | switch (read_c0_prid() & PRID_IMP_MASK) { |
125 | case PRID_IMP_NETLOGIC_XLP9XX: | 125 | case PRID_IMP_NETLOGIC_XLP9XX: |
126 | case PRID_IMP_NETLOGIC_XLP5XX: | ||
126 | case PRID_IMP_NETLOGIC_XLP2XX: | 127 | case PRID_IMP_NETLOGIC_XLP2XX: |
127 | return "Broadcom XLPII Series"; | 128 | return "Broadcom XLPII Series"; |
128 | default: | 129 | default: |
diff --git a/arch/mips/netlogic/xlp/wakeup.c b/arch/mips/netlogic/xlp/wakeup.c index f4823ad6145f..e5f44d2605a8 100644 --- a/arch/mips/netlogic/xlp/wakeup.c +++ b/arch/mips/netlogic/xlp/wakeup.c | |||
@@ -135,7 +135,15 @@ static void xlp_enable_secondary_cores(const cpumask_t *wakeup_mask) | |||
135 | if (cpu_is_xlp9xx()) { | 135 | if (cpu_is_xlp9xx()) { |
136 | fusebase = nlm_get_fuse_regbase(n); | 136 | fusebase = nlm_get_fuse_regbase(n); |
137 | fusemask = nlm_read_reg(fusebase, FUSE_9XX_DEVCFG6); | 137 | fusemask = nlm_read_reg(fusebase, FUSE_9XX_DEVCFG6); |
138 | mask = 0xfffff; | 138 | switch (read_c0_prid() & PRID_IMP_MASK) { |
139 | case PRID_IMP_NETLOGIC_XLP5XX: | ||
140 | mask = 0xff; | ||
141 | break; | ||
142 | case PRID_IMP_NETLOGIC_XLP9XX: | ||
143 | default: | ||
144 | mask = 0xfffff; | ||
145 | break; | ||
146 | } | ||
139 | } else { | 147 | } else { |
140 | fusemask = nlm_read_sys_reg(nodep->sysbase, | 148 | fusemask = nlm_read_sys_reg(nodep->sysbase, |
141 | SYS_EFUSE_DEVICE_CFG_STATUS0); | 149 | SYS_EFUSE_DEVICE_CFG_STATUS0); |