aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/arch/mips/mach-mscc/lowlevel_init.S
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/arch/mips/mach-mscc/lowlevel_init.S
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/arch/mips/mach-mscc/lowlevel_init.S')
-rw-r--r--roms/u-boot/arch/mips/mach-mscc/lowlevel_init.S45
1 files changed, 45 insertions, 0 deletions
diff --git a/roms/u-boot/arch/mips/mach-mscc/lowlevel_init.S b/roms/u-boot/arch/mips/mach-mscc/lowlevel_init.S
new file mode 100644
index 000000000..91f29ae25
--- /dev/null
+++ b/roms/u-boot/arch/mips/mach-mscc/lowlevel_init.S
@@ -0,0 +1,45 @@
+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
+/*
+ * Copyright (c) 2018 Microsemi Corporation
+ */
+
+#include <asm/asm.h>
+#include <asm/regdef.h>
+
+ .set noreorder
+ .extern vcoreiii_tlb_init
+ .extern vcoreiii_ddr_init
+#ifdef CONFIG_SOC_LUTON
+ .extern pll_init
+#endif
+
+LEAF(lowlevel_init)
+ /*
+ * As we have no stack yet, we can assume the restricted
+ * luxury of the sX-registers without saving them
+ */
+
+ /* Modify ra/s0 such we return to physical NOR location */
+ li t0, 0x0fffffff
+ li t1, CONFIG_SYS_TEXT_BASE
+ and s0, ra, t0
+ add s0, s0, t1
+
+ jal vcoreiii_tlb_init
+ nop
+
+#ifdef CONFIG_SOC_LUTON
+ jal pll_init
+ nop
+#endif
+
+ /* Initialize DDR controller to enable stack/gd/heap */
+0:
+ jal vcoreiii_ddr_init
+ nop
+ bnez v0, 0b /* Retry on error */
+ nop
+
+ jr s0
+ nop
+ END(lowlevel_init)