aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/netlogic/common/reset.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/netlogic/common/reset.S')
-rw-r--r--arch/mips/netlogic/common/reset.S29
1 files changed, 15 insertions, 14 deletions
diff --git a/arch/mips/netlogic/common/reset.S b/arch/mips/netlogic/common/reset.S
index adb18288a6c0..06381e11863e 100644
--- a/arch/mips/netlogic/common/reset.S
+++ b/arch/mips/netlogic/common/reset.S
@@ -50,8 +50,8 @@
50#include <asm/netlogic/xlp-hal/cpucontrol.h> 50#include <asm/netlogic/xlp-hal/cpucontrol.h>
51 51
52#define CP0_EBASE $15 52#define CP0_EBASE $15
53#define SYS_CPU_COHERENT_BASE(node) CKSEG1ADDR(XLP_DEFAULT_IO_BASE) + \ 53#define SYS_CPU_COHERENT_BASE CKSEG1ADDR(XLP_DEFAULT_IO_BASE) + \
54 XLP_IO_SYS_OFFSET(node) + XLP_IO_PCI_HDRSZ + \ 54 XLP_IO_SYS_OFFSET(0) + XLP_IO_PCI_HDRSZ + \
55 SYS_CPU_NONCOHERENT_MODE * 4 55 SYS_CPU_NONCOHERENT_MODE * 4
56 56
57/* Enable XLP features and workarounds in the LSU */ 57/* Enable XLP features and workarounds in the LSU */
@@ -82,26 +82,26 @@
82 li t1, LSU_DEBUG_ADDR 82 li t1, LSU_DEBUG_ADDR
83 li t2, 0 /* index */ 83 li t2, 0 /* index */
84 li t3, 0x1000 /* loop count */ 84 li t3, 0x1000 /* loop count */
851: 8511:
86 sll v0, t2, 5 86 sll v0, t2, 5
87 mtcr zero, t0 87 mtcr zero, t0
88 ori v1, v0, 0x3 /* way0 | write_enable | write_active */ 88 ori v1, v0, 0x3 /* way0 | write_enable | write_active */
89 mtcr v1, t1 89 mtcr v1, t1
902: 9012:
91 mfcr v1, t1 91 mfcr v1, t1
92 andi v1, 0x1 /* wait for write_active == 0 */ 92 andi v1, 0x1 /* wait for write_active == 0 */
93 bnez v1, 2b 93 bnez v1, 12b
94 nop 94 nop
95 mtcr zero, t0 95 mtcr zero, t0
96 ori v1, v0, 0x7 /* way1 | write_enable | write_active */ 96 ori v1, v0, 0x7 /* way1 | write_enable | write_active */
97 mtcr v1, t1 97 mtcr v1, t1
983: 9813:
99 mfcr v1, t1 99 mfcr v1, t1
100 andi v1, 0x1 /* wait for write_active == 0 */ 100 andi v1, 0x1 /* wait for write_active == 0 */
101 bnez v1, 3b 101 bnez v1, 13b
102 nop 102 nop
103 addi t2, 1 103 addi t2, 1
104 bne t3, t2, 1b 104 bne t3, t2, 11b
105 nop 105 nop
106.endm 106.endm
107 107
@@ -149,7 +149,7 @@ FEXPORT(nlm_reset_entry)
149 li t1, 0x1 149 li t1, 0x1
150 sll t0, t1, t0 150 sll t0, t1, t0
151 nor t0, t0, zero /* t0 <- ~(1 << core) */ 151 nor t0, t0, zero /* t0 <- ~(1 << core) */
152 li t2, SYS_CPU_COHERENT_BASE(0) 152 li t2, SYS_CPU_COHERENT_BASE
153 add t2, t2, t3 /* t2 <- SYS offset for node */ 153 add t2, t2, t3 /* t2 <- SYS offset for node */
154 lw t1, 0(t2) 154 lw t1, 0(t2)
155 and t1, t1, t0 155 and t1, t1, t0
@@ -164,8 +164,7 @@ FEXPORT(nlm_reset_entry)
164 /* FALL THROUGH */ 164 /* FALL THROUGH */
165 165
166/* 166/*
167 * Wake up sibling threads from the initial thread in 167 * Wake up sibling threads from the initial thread in a core.
168 * a core.
169 */ 168 */
170EXPORT(nlm_boot_siblings) 169EXPORT(nlm_boot_siblings)
171 /* core L1D flush before enable threads */ 170 /* core L1D flush before enable threads */
@@ -181,8 +180,10 @@ EXPORT(nlm_boot_siblings)
181 /* 180 /*
182 * The new hardware thread starts at the next instruction 181 * The new hardware thread starts at the next instruction
183 * For all the cases other than core 0 thread 0, we will 182 * For all the cases other than core 0 thread 0, we will
184 * jump to the secondary wait function. 183 * jump to the secondary wait function.
185 */ 184
185 * NOTE: All GPR contents are lost after the mtcr above!
186 */
186 mfc0 v0, CP0_EBASE, 1 187 mfc0 v0, CP0_EBASE, 1
187 andi v0, 0x3ff /* v0 <- node/core */ 188 andi v0, 0x3ff /* v0 <- node/core */
188 189
@@ -196,7 +197,7 @@ EXPORT(nlm_boot_siblings)
196#endif 197#endif
197 mtc0 t1, CP0_STATUS 198 mtc0 t1, CP0_STATUS
198 199
199 /* mark CPU ready, careful here, previous mtcr trashed registers */ 200 /* mark CPU ready */
200 li t3, CKSEG1ADDR(RESET_DATA_PHYS) 201 li t3, CKSEG1ADDR(RESET_DATA_PHYS)
201 ADDIU t1, t3, BOOT_CPU_READY 202 ADDIU t1, t3, BOOT_CPU_READY
202 sll v1, v0, 2 203 sll v1, v0, 2