blob: 2491310eb0c1a940a6805b66a1124d4d6eb21ff0 [file] [log] [blame]
Pali Roháraaed3282022-05-06 11:05:14 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2
3#include <config.h>
4#include <linux/linkage.h>
5
6ENTRY(arch_very_early_init)
7#ifdef CONFIG_ARMADA_38X
8 /*
9 * Only with disabled MMU its possible to switch the base
10 * register address on Armada 38x. Without this the SDRAM
11 * located at >= 0x4000.0000 is also not accessible, as its
12 * still locked to cache.
13 */
14 mrc p15, 0, r0, c1, c0, 0
15 bic r0, #1
16 mcr p15, 0, r0, c1, c0, 0
17#endif
18
19 /* Move internal registers from INTREG_BASE_ADDR_REG to SOC_REGS_PHY_BASE */
20 ldr r0, =SOC_REGS_PHY_BASE
21 ldr r1, =INTREG_BASE_ADDR_REG
22 str r0, [r1]
23 add r0, r0, #0xC000
24 mcr p15, 4, r0, c15, c0
25
26 bx lr
27ENDPROC(arch_very_early_init)