Same change as was done for mvebu in commit
bae797b56e7b ("arm: mvebu: Move
internal registers in arch_very_early_init() function") but for kirkwood.
Signed-off-by: Pali Rohár <pali@kernel.org>
Tested-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
config KW88F6192
bool
+ select ARCH_VERY_EARLY_INIT
config KW88F6281
bool
+ select ARCH_VERY_EARLY_INIT
config SHEEVA_88SV131
bool
obj-y = cpu.o
obj-y += cache.o
+obj-y += lowlevel.o
obj-y += mpp.o
# cpu.o and cache.o contain CP15 instructions which cannot be run in
struct kwcpu_registers *cpureg =
(struct kwcpu_registers *)KW_CPU_REG_BASE;
- /* Linux expects the internal registers to be at 0xf1000000 */
- writel(KW_REGS_PHY_BASE, KW_OFFSET_REG);
-
/* Enable and invalidate L2 cache in write through mode */
writel(readl(&cpureg->l2_cfg) | 0x18, &cpureg->l2_cfg);
invalidate_l2_cache();
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#include <config.h>
+#include <linux/linkage.h>
+
+ENTRY(arch_very_early_init)
+ /* Move internal registers from KW_OFFSET_REG to KW_REGS_PHY_BASE */
+ ldr r0, =KW_REGS_PHY_BASE
+ ldr r1, =KW_OFFSET_REG
+ str r0, [r1]
+ bx lr
+ENDPROC(arch_very_early_init)