summaryrefslogtreecommitdiffstats
path: root/arch/mips/boards
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/boards')
-rw-r--r--arch/mips/boards/8devices-lima/Makefile2
-rw-r--r--arch/mips/boards/8devices-lima/lowlevel.S2
-rw-r--r--arch/mips/boards/Makefile4
-rw-r--r--arch/mips/boards/black-swift/Makefile2
-rw-r--r--arch/mips/boards/board-dt-2nd.S35
-rw-r--r--arch/mips/boards/dlink-dir-320/Makefile2
-rw-r--r--arch/mips/boards/dlink-dir-320/lowlevel.S4
-rw-r--r--arch/mips/boards/dptechnics-dpt-module/Makefile2
-rw-r--r--arch/mips/boards/img-ci20/Makefile2
-rw-r--r--arch/mips/boards/img-ci20/lowlevel.S2
-rw-r--r--arch/mips/boards/loongson-ls1b/Makefile2
-rw-r--r--arch/mips/boards/loongson-ls1b/lowlevel.S4
-rw-r--r--arch/mips/boards/netgear-wg102/Makefile2
-rw-r--r--arch/mips/boards/netgear-wg102/lowlevel.S4
-rw-r--r--arch/mips/boards/netgear-wg102/ram.c2
-rw-r--r--arch/mips/boards/okud-max9331/Makefile2
-rw-r--r--arch/mips/boards/openembed-som9331/Makefile2
-rw-r--r--arch/mips/boards/qemu-malta/Makefile2
-rw-r--r--arch/mips/boards/qemu-malta/lowlevel.S21
-rw-r--r--arch/mips/boards/ritmix-rzx50/Makefile2
-rw-r--r--arch/mips/boards/ritmix-rzx50/lowlevel.S2
-rw-r--r--arch/mips/boards/tplink-mr3020/Makefile2
-rw-r--r--arch/mips/boards/tplink-wdr4300/Makefile2
-rw-r--r--arch/mips/boards/tplink-wdr4300/lowlevel.S2
24 files changed, 79 insertions, 29 deletions
diff --git a/arch/mips/boards/8devices-lima/Makefile b/arch/mips/boards/8devices-lima/Makefile
index b08c4a93ca..458f520900 100644
--- a/arch/mips/boards/8devices-lima/Makefile
+++ b/arch/mips/boards/8devices-lima/Makefile
@@ -1 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
diff --git a/arch/mips/boards/8devices-lima/lowlevel.S b/arch/mips/boards/8devices-lima/lowlevel.S
index dd1ab6247d..fad4d8b4af 100644
--- a/arch/mips/boards/8devices-lima/lowlevel.S
+++ b/arch/mips/boards/8devices-lima/lowlevel.S
@@ -15,7 +15,7 @@
ENTRY_FUNCTION(BOARD_PBL_START)
- mips_barebox_10h
+ mips_cpu_setup
debug_ll_ath79_init
diff --git a/arch/mips/boards/Makefile b/arch/mips/boards/Makefile
index 5f9b61e754..c4ce599c93 100644
--- a/arch/mips/boards/Makefile
+++ b/arch/mips/boards/Makefile
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
obj-$(CONFIG_BOARD_8DEVICES_LIMA) += 8devices-lima/
obj-$(CONFIG_BOARD_BLACK_SWIFT) += black-swift/
obj-$(CONFIG_BOARD_CI20) += img-ci20/
@@ -11,3 +13,5 @@ obj-$(CONFIG_BOARD_QEMU_MALTA) += qemu-malta/
obj-$(CONFIG_BOARD_RZX50) += ritmix-rzx50/
obj-$(CONFIG_BOARD_TPLINK_MR3020) += tplink-mr3020/
obj-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink-wdr4300/
+
+pbl-$(CONFIG_BOARD_MIPS_GENERIC_DT) += board-dt-2nd.o
diff --git a/arch/mips/boards/black-swift/Makefile b/arch/mips/boards/black-swift/Makefile
index b08c4a93ca..458f520900 100644
--- a/arch/mips/boards/black-swift/Makefile
+++ b/arch/mips/boards/black-swift/Makefile
@@ -1 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
diff --git a/arch/mips/boards/board-dt-2nd.S b/arch/mips/boards/board-dt-2nd.S
new file mode 100644
index 0000000000..a1465f09e3
--- /dev/null
+++ b/arch/mips/boards/board-dt-2nd.S
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Startup Code for generic MIPS device tree 2nd stage image
+ *
+ * Copyright (C) 2024 Antony Pavlov <antonynpavlov@gmail.com>
+ */
+
+#include <asm/asm.h>
+#include <asm/pbl_macros.h>
+#include <linux/sizes.h>
+
+ENTRY_FUNCTION(start_dt_2nd)
+
+ /* save device tree address in v1 */
+ move v1, a1
+
+ mips_cpu_setup
+
+ copy_to_link_location start_dt_2nd
+
+ stack_setup
+
+ /* pbl_main_entry() computes fdt_len by itself
+ * if fdt == fdt_end */
+ move a0, v1 /* fdt */
+ move a1, v1 /* fdt_end */
+ PTR_LI a2, SZ_256M /* ram_size */
+ PTR_LA v0, pbl_main_entry
+ jal v0
+ nop
+
+ /* No return */
+1:
+ b 1b
+ nop
diff --git a/arch/mips/boards/dlink-dir-320/Makefile b/arch/mips/boards/dlink-dir-320/Makefile
index b08c4a93ca..458f520900 100644
--- a/arch/mips/boards/dlink-dir-320/Makefile
+++ b/arch/mips/boards/dlink-dir-320/Makefile
@@ -1 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
diff --git a/arch/mips/boards/dlink-dir-320/lowlevel.S b/arch/mips/boards/dlink-dir-320/lowlevel.S
index da969bc74e..d0376c515c 100644
--- a/arch/mips/boards/dlink-dir-320/lowlevel.S
+++ b/arch/mips/boards/dlink-dir-320/lowlevel.S
@@ -13,9 +13,7 @@
ENTRY_FUNCTION(BOARD_PBL_START)
- mips_barebox_10h
-
- mips_disable_interrupts
+ mips_cpu_setup
/* CPU/SoC specific setup ... */
/* ... absent */
diff --git a/arch/mips/boards/dptechnics-dpt-module/Makefile b/arch/mips/boards/dptechnics-dpt-module/Makefile
index b08c4a93ca..458f520900 100644
--- a/arch/mips/boards/dptechnics-dpt-module/Makefile
+++ b/arch/mips/boards/dptechnics-dpt-module/Makefile
@@ -1 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
diff --git a/arch/mips/boards/img-ci20/Makefile b/arch/mips/boards/img-ci20/Makefile
index b08c4a93ca..458f520900 100644
--- a/arch/mips/boards/img-ci20/Makefile
+++ b/arch/mips/boards/img-ci20/Makefile
@@ -1 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
diff --git a/arch/mips/boards/img-ci20/lowlevel.S b/arch/mips/boards/img-ci20/lowlevel.S
index 0295e44d1a..8ff9871c51 100644
--- a/arch/mips/boards/img-ci20/lowlevel.S
+++ b/arch/mips/boards/img-ci20/lowlevel.S
@@ -14,7 +14,7 @@
ENTRY_FUNCTION(BOARD_PBL_START)
- mips_disable_interrupts
+ mips_cpu_setup
/* CPU/SoC specific setup ... */
/* ... absent */
diff --git a/arch/mips/boards/loongson-ls1b/Makefile b/arch/mips/boards/loongson-ls1b/Makefile
index b08c4a93ca..458f520900 100644
--- a/arch/mips/boards/loongson-ls1b/Makefile
+++ b/arch/mips/boards/loongson-ls1b/Makefile
@@ -1 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
diff --git a/arch/mips/boards/loongson-ls1b/lowlevel.S b/arch/mips/boards/loongson-ls1b/lowlevel.S
index 7240d351b4..e823bb37dd 100644
--- a/arch/mips/boards/loongson-ls1b/lowlevel.S
+++ b/arch/mips/boards/loongson-ls1b/lowlevel.S
@@ -17,9 +17,7 @@
ENTRY_FUNCTION(BOARD_PBL_START)
- mips_barebox_10h
-
- mips_disable_interrupts
+ mips_cpu_setup
pbl_blt 0xbf000000 skip_pll_ram_config t0
diff --git a/arch/mips/boards/netgear-wg102/Makefile b/arch/mips/boards/netgear-wg102/Makefile
index 344a6711b2..fe0616fdb8 100644
--- a/arch/mips/boards/netgear-wg102/Makefile
+++ b/arch/mips/boards/netgear-wg102/Makefile
@@ -1,2 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
obj-y += ram.o
diff --git a/arch/mips/boards/netgear-wg102/lowlevel.S b/arch/mips/boards/netgear-wg102/lowlevel.S
index e48dded269..6fdcfa3cca 100644
--- a/arch/mips/boards/netgear-wg102/lowlevel.S
+++ b/arch/mips/boards/netgear-wg102/lowlevel.S
@@ -14,9 +14,7 @@
ENTRY_FUNCTION(BOARD_PBL_START)
- mips_barebox_10h
-
- mips_disable_interrupts
+ mips_cpu_setup
pbl_ar2312_pll
diff --git a/arch/mips/boards/netgear-wg102/ram.c b/arch/mips/boards/netgear-wg102/ram.c
index 4cde573982..fe9c881623 100644
--- a/arch/mips/boards/netgear-wg102/ram.c
+++ b/arch/mips/boards/netgear-wg102/ram.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
#include <common.h>
#include <init.h>
#include <linux/sizes.h>
diff --git a/arch/mips/boards/okud-max9331/Makefile b/arch/mips/boards/okud-max9331/Makefile
index c58bf72354..c28b1a9059 100644
--- a/arch/mips/boards/okud-max9331/Makefile
+++ b/arch/mips/boards/okud-max9331/Makefile
@@ -1,2 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
lwl-y += lowlevel_boot0.o
diff --git a/arch/mips/boards/openembed-som9331/Makefile b/arch/mips/boards/openembed-som9331/Makefile
index b08c4a93ca..458f520900 100644
--- a/arch/mips/boards/openembed-som9331/Makefile
+++ b/arch/mips/boards/openembed-som9331/Makefile
@@ -1 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
diff --git a/arch/mips/boards/qemu-malta/Makefile b/arch/mips/boards/qemu-malta/Makefile
index b08c4a93ca..458f520900 100644
--- a/arch/mips/boards/qemu-malta/Makefile
+++ b/arch/mips/boards/qemu-malta/Makefile
@@ -1 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
diff --git a/arch/mips/boards/qemu-malta/lowlevel.S b/arch/mips/boards/qemu-malta/lowlevel.S
index 98821e0426..8ff7d93a74 100644
--- a/arch/mips/boards/qemu-malta/lowlevel.S
+++ b/arch/mips/boards/qemu-malta/lowlevel.S
@@ -11,10 +11,9 @@
#include <asm/pbl_macros.h>
#include <asm/pbl_nmon.h>
#include <linux/sizes.h>
-
#include <asm/addrspace.h>
-#include <asm/gt64120.h>
-#include <mach/mach-gt64120.h>
+
+#include <mach/gt64120.h>
#ifdef CONFIG_CPU_LITTLE_ENDIAN
#define GT_CPU_TO_LE32(x) (x)
@@ -32,18 +31,8 @@
#define GT_HD(x) (GT_CPU_TO_LE32(((x) >> 21) & 0x7f))
ENTRY_FUNCTION(BOARD_PBL_START)
- b __start
- nop
-
- /*
- On MIPS Technologies boards
- 0x1fc00010 address is reserved for BoardID
- */
- .org 0x10
- .asciiz "barebox"
-__start:
- mips_disable_interrupts
+ mips_cpu_setup
/* cpu specific setup ... */
/* ... absent */
@@ -56,14 +45,14 @@ __start:
*/
/* move GT64120 registers to 0x1be00000 */
- li t1, KSEG1ADDR(GT_DEF_BASE)
+ li t1, CKSEG1ADDR(GT_DEF_BASE)
li t0, GT_LD(MIPS_GT_BASE)
sw t0, GT_ISD_OFS(t1)
/*
* setup MEM-to-PCI0 mapping
*/
- li t1, KSEG1ADDR(MIPS_GT_BASE)
+ li t1, CKSEG1ADDR(MIPS_GT_BASE)
/* setup PCI0 io window */
li t0, GT_LD(0x18000000)
diff --git a/arch/mips/boards/ritmix-rzx50/Makefile b/arch/mips/boards/ritmix-rzx50/Makefile
index b08c4a93ca..458f520900 100644
--- a/arch/mips/boards/ritmix-rzx50/Makefile
+++ b/arch/mips/boards/ritmix-rzx50/Makefile
@@ -1 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
diff --git a/arch/mips/boards/ritmix-rzx50/lowlevel.S b/arch/mips/boards/ritmix-rzx50/lowlevel.S
index 33810f67f5..4fccf0ddb9 100644
--- a/arch/mips/boards/ritmix-rzx50/lowlevel.S
+++ b/arch/mips/boards/ritmix-rzx50/lowlevel.S
@@ -14,7 +14,7 @@
ENTRY_FUNCTION(BOARD_PBL_START)
- mips_disable_interrupts
+ mips_cpu_setup
/* CPU/SoC specific setup ... */
/* ... absent */
diff --git a/arch/mips/boards/tplink-mr3020/Makefile b/arch/mips/boards/tplink-mr3020/Makefile
index b08c4a93ca..458f520900 100644
--- a/arch/mips/boards/tplink-mr3020/Makefile
+++ b/arch/mips/boards/tplink-mr3020/Makefile
@@ -1 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
diff --git a/arch/mips/boards/tplink-wdr4300/Makefile b/arch/mips/boards/tplink-wdr4300/Makefile
index b08c4a93ca..458f520900 100644
--- a/arch/mips/boards/tplink-wdr4300/Makefile
+++ b/arch/mips/boards/tplink-wdr4300/Makefile
@@ -1 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
lwl-y += lowlevel.o
diff --git a/arch/mips/boards/tplink-wdr4300/lowlevel.S b/arch/mips/boards/tplink-wdr4300/lowlevel.S
index 8aed5ddcf1..94ae707b0b 100644
--- a/arch/mips/boards/tplink-wdr4300/lowlevel.S
+++ b/arch/mips/boards/tplink-wdr4300/lowlevel.S
@@ -15,7 +15,7 @@
ENTRY_FUNCTION(BOARD_PBL_START)
- mips_barebox_10h
+ mips_cpu_setup
debug_ll_ath79_init