diff options
Diffstat (limited to 'arch/mips/boards')
26 files changed, 153 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 e85647a0e5..c4ce599c93 100644 --- a/arch/mips/boards/Makefile +++ b/arch/mips/boards/Makefile @@ -1,12 +1,17 @@ +# 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/ obj-$(CONFIG_BOARD_DLINK_DIR320) += dlink-dir-320/ obj-$(CONFIG_BOARD_DPTECHNICS_DPT_MODULE) += dptechnics-dpt-module/ obj-$(CONFIG_BOARD_OPENEMBEDED_SOM9331) += openembed-som9331/ +obj-$(CONFIG_BOARD_OKUD_MAX9331) += okud-max9331/ obj-$(CONFIG_BOARD_LOONGSON_TECH_LS1B) += loongson-ls1b/ obj-$(CONFIG_BOARD_NETGEAR_WG102) += netgear-wg102/ 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 c533df3ce5..e823bb37dd 100644 --- a/arch/mips/boards/loongson-ls1b/lowlevel.S +++ b/arch/mips/boards/loongson-ls1b/lowlevel.S @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> + * Copyright (C) 2020 Du Huanpeng <u74147@gmail.com> */ #define BOARD_PBL_START start_loongson_ls1b @@ -11,15 +12,40 @@ #include <asm/pbl_nmon.h> #include <linux/sizes.h> +#include <mach/pbl_macros.h> +#include <mach/pbl_ll_init_loongson1.h> + ENTRY_FUNCTION(BOARD_PBL_START) - mips_barebox_10h + mips_cpu_setup + + pbl_blt 0xbf000000 skip_pll_ram_config t0 - mips_disable_interrupts + pbl_loongson1_pll + pbl_loongson1_uart_enable debug_ll_ns16550_init debug_ll_outc '.' debug_ll_ns16550_outnl + debug_ll_outc '1' + + pbl_loongson1_remap + debug_ll_outc '2' + + pbl_loongson1_ddr2_init + pbl_probe_mem t0, t1, KSEG1 + bne t0, t1, . + nop + + debug_ll_outc '3' + + mips_cache_reset + dcache_enable + debug_ll_outc '4' + +skip_pll_ram_config: + debug_ll_outc '5' + debug_ll_ns16550_outnl ENTRY_FUNCTION_END(BOARD_PBL_START, loongson_ls1b, SZ_64M) 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 new file mode 100644 index 0000000000..c28b1a9059 --- /dev/null +++ b/arch/mips/boards/okud-max9331/Makefile @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only + +lwl-y += lowlevel.o +lwl-y += lowlevel_boot0.o diff --git a/arch/mips/boards/okud-max9331/lowlevel.S b/arch/mips/boards/okud-max9331/lowlevel.S new file mode 100644 index 0000000000..c5a288557f --- /dev/null +++ b/arch/mips/boards/okud-max9331/lowlevel.S @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2017 Oleksij Rempel <linux@rempel-privat.de> + * Copyright (C) 2019 Du Huanpeng <u74147@gmail.com> + */ + +#define BOARD_PBL_START start_okud_max9331 + +#include <mach/debug_ll.h> +#include <asm/regdef.h> +#include <asm/mipsregs.h> +#include <asm/asm.h> +#include <asm/pbl_macros.h> +#include <mach/pbl_macros.h> +#include <asm/pbl_nmon.h> +#include <linux/sizes.h> + +ENTRY_FUNCTION(BOARD_PBL_START) + + ar9331_pbl_generic_start + +ENTRY_FUNCTION_END(BOARD_PBL_START, ar9331_okud_max9331, SZ_64M) diff --git a/arch/mips/boards/okud-max9331/lowlevel_boot0.S b/arch/mips/boards/okud-max9331/lowlevel_boot0.S new file mode 100644 index 0000000000..b0a0e22683 --- /dev/null +++ b/arch/mips/boards/okud-max9331/lowlevel_boot0.S @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2018 Oleksij Rempel <linux@rempel-privat.de> + * Copyright (C) 2019 Du Huanpeng <u74147@gmail.com> + */ + +#define BOARD_PBL_START start_okud_max9331_boot0 + +#include <mach/debug_ll.h> +#include <asm/asm.h> +#include <asm/pbl_macros.h> +#include <mach/pbl_macros.h> +#include <asm/pbl_nmon.h> + +ENTRY_FUNCTION(BOARD_PBL_START) + + li ra, 0xbfc20000 + jr ra + nop + + +STOP_WITH_DEBUG_EVENT 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 e4ecde45cf..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,19 +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 - .word 0xffffffff - .word 0xffffffff -__start: - mips_disable_interrupts + mips_cpu_setup /* cpu specific setup ... */ /* ... absent */ @@ -57,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 |