diff options
Diffstat (limited to 'arch/mips')
131 files changed, 596 insertions, 1782 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 7c40991cab..eab9452de9 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -9,6 +9,7 @@ config MIPS select HAS_KALLSYMS select HAVE_CONFIGURABLE_MEMORY_LAYOUT select HAVE_CONFIGURABLE_TEXT_BASE + select HAVE_PBL_MULTI_IMAGES select HAS_DMA select ELF default y @@ -26,9 +27,6 @@ config GENERIC_LINKER_SCRIPT bool default y -config HAS_NO_BOARD_HL_CODE - bool - config PHYS_ADDR_T_64BIT bool @@ -58,6 +56,8 @@ config MACH_MIPS_MALTA select HAS_DEBUG_LL select GPIOLIB select HW_HAS_PCI + select HAVE_PBL_IMAGE + select HAVE_IMAGE_COMPRESSION config MACH_MIPS_AR231X bool "Atheros ar231x-based boards" @@ -67,6 +67,7 @@ config MACH_MIPS_AR231X select CSRC_R4K_LIB select DRIVER_SERIAL_NS16550 select HAS_DEBUG_LL + select HAVE_IMAGE_COMPRESSION config MACH_MIPS_ATH79 bool "Atheros AR71XX/AR724X/AR913X/AR933X based boards" @@ -89,6 +90,9 @@ config MACH_MIPS_BCM47XX select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_LITTLE_ENDIAN select HAS_DEBUG_LL + select HAVE_IMAGE_COMPRESSION + select HAVE_PBL_IMAGE + select HAS_NMON config MACH_MIPS_LOONGSON bool "Loongson-based boards" @@ -136,7 +140,6 @@ config CPU_BIG_ENDIAN config CPU_LITTLE_ENDIAN bool "Little endian" depends on SYS_SUPPORTS_LITTLE_ENDIAN - help endchoice diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 6338dc174d..5fbd51ceee 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -41,6 +41,7 @@ ldflags-y += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL ) endif LDFLAGS += $(ldflags-y) -m $(ld-emul) +LDFLAGS_barebox += $(ldflags-y) # # CPU-dependent compiler/assembler options for optimization. @@ -73,28 +74,11 @@ endif LDFLAGS_barebox += -nostdlib machine-$(CONFIG_MACH_MIPS_MALTA) := malta -board-$(CONFIG_BOARD_QEMU_MALTA) := qemu-malta - machine-$(CONFIG_MACH_MIPS_AR231X) := ar231x -board-$(CONFIG_BOARD_NETGEAR_WG102) := netgear-wg102 - machine-$(CONFIG_MACH_MIPS_ATH79) := ath79 -board-$(CONFIG_BOARD_8DEVICES_LIMA) := 8devices-lima -board-$(CONFIG_BOARD_DPTECHNICS_DPT_MODULE) := dptechnics-dpt-module -board-$(CONFIG_BOARD_TPLINK_MR3020) := tplink-mr3020 -board-$(CONFIG_BOARD_TPLINK_WDR4300) := tplink-wdr4300 -board-$(CONFIG_BOARD_BLACK_SWIFT) := black-swift - machine-$(CONFIG_MACH_MIPS_BCM47XX) := bcm47xx -board-$(CONFIG_BOARD_DLINK_DIR320) := dlink-dir-320 - machine-$(CONFIG_MACH_MIPS_LOONGSON) := loongson -board-$(CONFIG_BOARD_LOONGSON_TECH_LS1B) := loongson-ls1b - machine-$(CONFIG_MACH_MIPS_XBURST) := xburst -board-$(CONFIG_BOARD_RZX50) := ritmix-rzx50 -board-$(CONFIG_BOARD_CI20) := img-ci20 - machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y)) ifeq ($(KBUILD_SRC),) @@ -108,12 +92,6 @@ incdir-y := $(machine-y) endif INCDIR := arch-$(incdir-y) -ifneq ($(board-y),) -BOARD := arch/mips/boards/$(board-y)/ -else -BOARD := -endif - ifeq ($(KBUILD_SRC),) CPPFLAGS += -I$(BOARD)/include else @@ -126,15 +104,12 @@ else MACH := endif -ifndef CONFIG_HAS_NO_BOARD_HL_CODE common-y += $(BOARD) -endif common-y += $(MACH) common-y += arch/mips/lib/ common-y += arch/mips/boot/ - -common-$(CONFIG_BUILTIN_DTB) += arch/mips/dts/ +common-y += arch/mips/boards/ CPPFLAGS += $(cflags-y) CFLAGS += $(cflags-y) @@ -155,4 +130,6 @@ dts := arch/mips/dts %.dtb: scripts $(Q)$(MAKE) $(build)=$(dts) $(dts)/$@ +common-$(CONFIG_OFTREE) += arch/mips/dts/ + KBUILD_IMAGE ?= $(KBUILD_BINARY) diff --git a/arch/mips/boards/8devices-lima/Makefile b/arch/mips/boards/8devices-lima/Makefile new file mode 100644 index 0000000000..b08c4a93ca --- /dev/null +++ b/arch/mips/boards/8devices-lima/Makefile @@ -0,0 +1 @@ +lwl-y += lowlevel.o diff --git a/arch/mips/boards/8devices-lima/include/board/board_pbl_start.h b/arch/mips/boards/8devices-lima/include/board/board_pbl_start.h deleted file mode 100644 index e95aa49256..0000000000 --- a/arch/mips/boards/8devices-lima/include/board/board_pbl_start.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2018 Oleksij Rempel <linux@rempel-privat.de> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <mach/debug_ll_ar9344.h> -#include <asm/pbl_macros.h> -#include <mach/pbl_macros.h> -#include <mach/pbl_ll_init_qca4531.h> -#include <asm/pbl_nmon.h> - - .macro board_pbl_start - .set push - .set noreorder - - mips_barebox_10h - - debug_ll_ar9344_init - - debug_ll_outc '1' - - hornet_mips24k_cp0_setup - debug_ll_outc '2' - - /* test if we are in the SRAM */ - pbl_blt 0xbd000000 1f t8 - debug_ll_outc '3' - b skip_flash_test - nop -1: - /* test if we are in the flash */ - pbl_blt 0xbf000000 skip_pll_ram_config t8 - debug_ll_outc '4' -skip_flash_test: - - pbl_qca4531_ddr2_550_550_init - - debug_ll_outc '5' - /* Initialize caches... */ - mips_cache_reset - - /* ... and enable them */ - dcache_enable -skip_pll_ram_config: - debug_ll_outc '6' - debug_ll_outnl - - mips_nmon - - copy_to_link_location pbl_start - - .set pop - .endm diff --git a/arch/mips/boards/8devices-lima/lowlevel.S b/arch/mips/boards/8devices-lima/lowlevel.S new file mode 100644 index 0000000000..b53b23b42a --- /dev/null +++ b/arch/mips/boards/8devices-lima/lowlevel.S @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2018 Oleksij Rempel <linux@rempel-privat.de> + */ + +#define BOARD_PBL_START start_8devices_lima + +#include <mach/debug_ll.h> +#include <asm/asm.h> +#include <asm/pbl_macros.h> +#include <mach/pbl_macros.h> +#include <mach/pbl_ll_init_qca4531.h> +#include <asm/pbl_nmon.h> + +ENTRY_FUNCTION(BOARD_PBL_START) + + mips_barebox_10h + + debug_ll_ath79_init + + hornet_mips24k_cp0_setup + + /* test if we are in the SRAM */ + pbl_blt 0xbd000000 1f t8 + b skip_flash_test + nop +1: + /* test if we are in the flash */ + pbl_blt 0xbf000000 skip_pll_ram_config t8 +skip_flash_test: + + pbl_qca4531_ddr2_550_550_init + + /* Initialize caches... */ + mips_cache_reset + + /* ... and enable them */ + dcache_enable +skip_pll_ram_config: + +ENTRY_FUNCTION_END(BOARD_PBL_START, qca4531_8devices_lima) diff --git a/arch/mips/boards/Makefile b/arch/mips/boards/Makefile new file mode 100644 index 0000000000..50652f9841 --- /dev/null +++ b/arch/mips/boards/Makefile @@ -0,0 +1,11 @@ +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_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/ diff --git a/arch/mips/boards/black-swift/Makefile b/arch/mips/boards/black-swift/Makefile index dcfc2937d3..b08c4a93ca 100644 --- a/arch/mips/boards/black-swift/Makefile +++ b/arch/mips/boards/black-swift/Makefile @@ -1 +1 @@ -obj-y += board.o +lwl-y += lowlevel.o diff --git a/arch/mips/boards/black-swift/board.c b/arch/mips/boards/black-swift/board.c deleted file mode 100644 index 2e2ed2075b..0000000000 --- a/arch/mips/boards/black-swift/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2015 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <common.h> -#include <init.h> - -static int model_hostname_init(void) -{ - barebox_set_hostname("black-swift"); - - return 0; -} -postcore_initcall(model_hostname_init); diff --git a/arch/mips/boards/black-swift/include/board/board_pbl_start.h b/arch/mips/boards/black-swift/include/board/board_pbl_start.h deleted file mode 100644 index 4c2ab2ef0f..0000000000 --- a/arch/mips/boards/black-swift/include/board/board_pbl_start.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013, 2015 Antony Pavlov <antonynpavlov@gmail.com> - * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <asm/pbl_macros.h> -#include <mach/pbl_macros.h> -#include <asm/pbl_nmon.h> - - .macro board_pbl_start - .set push - .set noreorder - - mips_barebox_10h - - pbl_ar9331_wmac_enable - - hornet_mips24k_cp0_setup - - pbl_blt 0xbf000000 skip_pll_ram_config t8 - - hornet_1_1_war - - pbl_ar9331_pll - pbl_ar9331_ddr2_config - - /* Initialize caches... */ - mips_cache_reset - - /* ... and enable them */ - dcache_enable - -skip_pll_ram_config: - pbl_ar9331_uart_enable - debug_ll_ar9331_init - mips_nmon - - /* - * It is amazing but we have to enable MDIO on GPIO - * to use GPIO27 for LED1. - */ - pbl_ar9331_mdio_gpio_enable - - copy_to_link_location pbl_start - - .set pop - .endm diff --git a/arch/mips/boards/black-swift/lowlevel.S b/arch/mips/boards/black-swift/lowlevel.S new file mode 100644 index 0000000000..104dd26d1c --- /dev/null +++ b/arch/mips/boards/black-swift/lowlevel.S @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2013, 2015 Antony Pavlov <antonynpavlov@gmail.com> + * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> + */ + +#define BOARD_PBL_START start_black_swift + +#include <mach/debug_ll.h> +#include <asm/pbl_macros.h> +#include <asm/asm.h> +#include <mach/pbl_macros.h> +#include <asm/pbl_nmon.h> + +ENTRY_FUNCTION(BOARD_PBL_START) + + mips_barebox_10h + + pbl_ar9331_wmac_enable + + hornet_mips24k_cp0_setup + + pbl_blt 0xbf000000 skip_pll_ram_config t8 + + hornet_1_1_war + + pbl_ar9331_pll + pbl_ar9331_ddr2_config + + /* Initialize caches... */ + mips_cache_reset + + /* ... and enable them */ + dcache_enable + +skip_pll_ram_config: + pbl_ar9331_uart_enable + debug_ll_ath79_init + + /* + * It is amazing but we have to enable MDIO on GPIO + * to use GPIO27 for LED1. + */ + pbl_ar9331_mdio_gpio_enable + +ENTRY_FUNCTION_END(BOARD_PBL_START, black_swift) diff --git a/arch/mips/boards/dlink-dir-320/Makefile b/arch/mips/boards/dlink-dir-320/Makefile index dcfc2937d3..01c7a259e9 100644 --- a/arch/mips/boards/dlink-dir-320/Makefile +++ b/arch/mips/boards/dlink-dir-320/Makefile @@ -1 +1,2 @@ obj-y += board.o +lwl-y += lowlevel.o diff --git a/arch/mips/boards/dlink-dir-320/board.c b/arch/mips/boards/dlink-dir-320/board.c index d00e4fab4b..b75812cefe 100644 --- a/arch/mips/boards/dlink-dir-320/board.c +++ b/arch/mips/boards/dlink-dir-320/board.c @@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2011, 2014 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <common.h> diff --git a/arch/mips/boards/dlink-dir-320/lowlevel.S b/arch/mips/boards/dlink-dir-320/lowlevel.S new file mode 100644 index 0000000000..9f3bd5dead --- /dev/null +++ b/arch/mips/boards/dlink-dir-320/lowlevel.S @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright 2018 Oleksij Rempel <o.rempel@pengutronix.de>, Pengutronix + */ + +#define BOARD_PBL_START start_dlink_dir_320 + +#include <asm/asm.h> +#include <asm/pbl_macros.h> +#include <mach/debug_ll.h> +#include <asm/pbl_nmon.h> + +ENTRY_FUNCTION(BOARD_PBL_START) + + mips_barebox_10h + + mips_disable_interrupts + + /* CPU/SoC specific setup ... */ + /* ... absent */ + +ENTRY_FUNCTION_END(BOARD_PBL_START, dlink_dir_320) diff --git a/arch/mips/boards/dptechnics-dpt-module/Makefile b/arch/mips/boards/dptechnics-dpt-module/Makefile new file mode 100644 index 0000000000..b08c4a93ca --- /dev/null +++ b/arch/mips/boards/dptechnics-dpt-module/Makefile @@ -0,0 +1 @@ +lwl-y += lowlevel.o diff --git a/arch/mips/boards/dptechnics-dpt-module/include/board/board_pbl_start.h b/arch/mips/boards/dptechnics-dpt-module/include/board/board_pbl_start.h deleted file mode 100644 index 9d6b1b86bc..0000000000 --- a/arch/mips/boards/dptechnics-dpt-module/include/board/board_pbl_start.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2017 Oleksij Rempel <linux@rempel-privat.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - */ - -#include <asm/pbl_macros.h> -#include <mach/pbl_macros.h> -#include <asm/pbl_nmon.h> - - .macro board_pbl_start - .set push - .set noreorder - - ar9331_pbl_generic_start - - .set pop - .endm diff --git a/arch/mips/boards/dptechnics-dpt-module/lowlevel.S b/arch/mips/boards/dptechnics-dpt-module/lowlevel.S new file mode 100644 index 0000000000..28b8f4fac7 --- /dev/null +++ b/arch/mips/boards/dptechnics-dpt-module/lowlevel.S @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2017 Oleksij Rempel <linux@rempel-privat.de> + */ + +#define BOARD_PBL_START start_dptechnics_dpt_module + +#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> + +ENTRY_FUNCTION(BOARD_PBL_START) + + ar9331_pbl_generic_start + +ENTRY_FUNCTION_END(BOARD_PBL_START, ar9331_dptechnics_dpt_module) diff --git a/arch/mips/boards/img-ci20/Makefile b/arch/mips/boards/img-ci20/Makefile index dcfc2937d3..b08c4a93ca 100644 --- a/arch/mips/boards/img-ci20/Makefile +++ b/arch/mips/boards/img-ci20/Makefile @@ -1 +1 @@ -obj-y += board.o +lwl-y += lowlevel.o diff --git a/arch/mips/boards/img-ci20/board.c b/arch/mips/boards/img-ci20/board.c deleted file mode 100644 index 515ebaece6..0000000000 --- a/arch/mips/boards/img-ci20/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <common.h> -#include <init.h> - -static int ci20_hostname_init(void) -{ - barebox_set_hostname("ci20"); - - return 0; -} -console_initcall(ci20_hostname_init); diff --git a/arch/mips/boards/img-ci20/include/board/board_pbl_start.h b/arch/mips/boards/img-ci20/include/board/board_pbl_start.h deleted file mode 100644 index 42d23c82a9..0000000000 --- a/arch/mips/boards/img-ci20/include/board/board_pbl_start.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Startup Code for Imagination Creator CI20 board - * - * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <asm/pbl_macros.h> -#include <mach/debug_ll.h> -#include <asm/pbl_nmon.h> - - .macro board_pbl_start - .set push - .set noreorder - - mips_disable_interrupts - - /* CPU/SoC specific setup ... */ - /* ... absent */ - - debug_ll_ns16550_init - - debug_ll_outc '.' - debug_ll_ns16550_outnl - - mips_nmon - - copy_to_link_location pbl_start - - .set pop - .endm diff --git a/arch/mips/boards/img-ci20/include/board/debug_ll.h b/arch/mips/boards/img-ci20/include/board/debug_ll.h deleted file mode 100644 index 72612cff2b..0000000000 --- a/arch/mips/boards/img-ci20/include/board/debug_ll.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#ifndef __INCLUDE_CI20_BOARD_DEBUG_LL_H__ -#define __INCLUDE_CI20_BOARD_DEBUG_LL_H__ - -#include <mach/debug_ll_jz4780.h> - -#endif /* __INCLUDE_CI20_BOARD_DEBUG_LL_H__ */ diff --git a/arch/mips/boards/img-ci20/lowlevel.S b/arch/mips/boards/img-ci20/lowlevel.S new file mode 100644 index 0000000000..056df17bf8 --- /dev/null +++ b/arch/mips/boards/img-ci20/lowlevel.S @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Startup Code for Imagination Creator CI20 board + * + * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> + */ + +#define BOARD_PBL_START start_img_ci20 + +#include <asm/pbl_macros.h> +#include <mach/debug_ll.h> +#include <asm/pbl_nmon.h> + +ENTRY_FUNCTION(BOARD_PBL_START) + + mips_disable_interrupts + + /* CPU/SoC specific setup ... */ + /* ... absent */ + + debug_ll_ns16550_init + + debug_ll_outc '.' + debug_ll_ns16550_outnl + +ENTRY_FUNCTION_END(BOARD_PBL_START, img_ci20) diff --git a/arch/mips/boards/loongson-ls1b/Makefile b/arch/mips/boards/loongson-ls1b/Makefile index 31c062987f..b08c4a93ca 100644 --- a/arch/mips/boards/loongson-ls1b/Makefile +++ b/arch/mips/boards/loongson-ls1b/Makefile @@ -1 +1 @@ -obj-y += serial.o +lwl-y += lowlevel.o diff --git a/arch/mips/boards/loongson-ls1b/include/board/board_pbl_start.h b/arch/mips/boards/loongson-ls1b/include/board/board_pbl_start.h deleted file mode 100644 index a3c585ecba..0000000000 --- a/arch/mips/boards/loongson-ls1b/include/board/board_pbl_start.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <asm/pbl_macros.h> -#include <mach/loongson1.h> -#include <mach/debug_ll.h> -#include <asm/pbl_nmon.h> - - .macro board_pbl_start - .set push - .set noreorder - - mips_barebox_10h - - mips_disable_interrupts - - debug_ll_ns16550_init - - debug_ll_outc '.' - debug_ll_ns16550_outnl - - mips_nmon - - copy_to_link_location pbl_start - - .set pop - .endm diff --git a/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h b/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h index e60ce4cecd..05420f73a1 100644 --- a/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h +++ b/arch/mips/boards/loongson-ls1b/include/board/debug_ll.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ /** @file diff --git a/arch/mips/boards/loongson-ls1b/lowlevel.S b/arch/mips/boards/loongson-ls1b/lowlevel.S new file mode 100644 index 0000000000..37744e9fac --- /dev/null +++ b/arch/mips/boards/loongson-ls1b/lowlevel.S @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> + */ + +#define BOARD_PBL_START start_loongson_ls1b + +#include <asm/pbl_macros.h> +#include <mach/loongson1.h> +#include <mach/debug_ll.h> +#include <asm/pbl_nmon.h> + +ENTRY_FUNCTION(BOARD_PBL_START) + + mips_barebox_10h + + mips_disable_interrupts + + debug_ll_ns16550_init + + debug_ll_outc '.' + debug_ll_ns16550_outnl + +ENTRY_FUNCTION_END(BOARD_PBL_START, loongson_ls1b) diff --git a/arch/mips/boards/loongson-ls1b/serial.c b/arch/mips/boards/loongson-ls1b/serial.c deleted file mode 100644 index a9453ede28..0000000000 --- a/arch/mips/boards/loongson-ls1b/serial.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <common.h> -#include <init.h> - -static int console_init(void) -{ - barebox_set_hostname("ls1b"); - - return 0; -} -console_initcall(console_init); diff --git a/arch/mips/boards/netgear-wg102/Makefile b/arch/mips/boards/netgear-wg102/Makefile index 0899b66c5f..344a6711b2 100644 --- a/arch/mips/boards/netgear-wg102/Makefile +++ b/arch/mips/boards/netgear-wg102/Makefile @@ -1 +1,2 @@ +lwl-y += lowlevel.o obj-y += ram.o diff --git a/arch/mips/boards/netgear-wg102/include/board/debug_ll.h b/arch/mips/boards/netgear-wg102/include/board/debug_ll.h index 2725032ba3..cc3b1d74b0 100644 --- a/arch/mips/boards/netgear-wg102/include/board/debug_ll.h +++ b/arch/mips/boards/netgear-wg102/include/board/debug_ll.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ /** @file diff --git a/arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h b/arch/mips/boards/netgear-wg102/lowlevel.S index 9fb220519f..e48dded269 100644 --- a/arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h +++ b/arch/mips/boards/netgear-wg102/lowlevel.S @@ -1,30 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ +#define BOARD_PBL_START start_netgear_wg102 + #include <asm/pbl_macros.h> #include <mach/pbl_macros.h> #include <mach/ar2312_regs.h> #include <mach/debug_ll.h> - .macro board_pbl_start - .set push - .set noreorder +ENTRY_FUNCTION(BOARD_PBL_START) mips_barebox_10h @@ -71,7 +59,15 @@ sdram_configured: debug_ll_outc 'b' debug_ll_ns16550_outnl - copy_to_link_location pbl_start + copy_to_link_location BOARD_PBL_START; + stack_setup; + + lw a0, 0; + la v0, pbl_main_entry; + jal v0; + nop; - .set pop - .endm + /* No return */ +__error: + b __error; + nop; diff --git a/arch/mips/boards/qemu-malta/Makefile b/arch/mips/boards/qemu-malta/Makefile index eb072c0161..b08c4a93ca 100644 --- a/arch/mips/boards/qemu-malta/Makefile +++ b/arch/mips/boards/qemu-malta/Makefile @@ -1 +1 @@ -obj-y += init.o +lwl-y += lowlevel.o diff --git a/arch/mips/boards/qemu-malta/include/board/debug_ll.h b/arch/mips/boards/qemu-malta/include/board/debug_ll.h index abeee5345a..5b112b8ae2 100644 --- a/arch/mips/boards/qemu-malta/include/board/debug_ll.h +++ b/arch/mips/boards/qemu-malta/include/board/debug_ll.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __INCLUDE_BOARD_DEBUG_LL_QEMU_MALTA_H__ diff --git a/arch/mips/boards/qemu-malta/init.c b/arch/mips/boards/qemu-malta/init.c deleted file mode 100644 index 24bfdc03ee..0000000000 --- a/arch/mips/boards/qemu-malta/init.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com> - * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <common.h> -#include <init.h> -#include <linux/sizes.h> - -static int malta_core_init(void) -{ - barebox_set_hostname("malta"); - - return 0; -} -core_initcall(malta_core_init); diff --git a/arch/mips/boards/qemu-malta/include/board/board_pbl_start.h b/arch/mips/boards/qemu-malta/lowlevel.S index 5c1537262e..3861ae9e46 100644 --- a/arch/mips/boards/qemu-malta/include/board/board_pbl_start.h +++ b/arch/mips/boards/qemu-malta/lowlevel.S @@ -1,22 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Startup Code for MIPS CPU * * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ +#define BOARD_PBL_START start_qemu_malta + +#include <asm/asm.h> #include <asm/pbl_macros.h> #include <asm/pbl_nmon.h> @@ -39,10 +30,7 @@ #define GT_LD(x) (GT_CPU_TO_LE32(((x) >> 21) & 0x7fff)) #define GT_HD(x) (GT_CPU_TO_LE32(((x) >> 21) & 0x7f)) - .macro board_pbl_start - .set push - .set noreorder - +ENTRY_FUNCTION(BOARD_PBL_START) b __start nop @@ -94,9 +82,4 @@ __start: li t0, GT_LD(0x1bdfffff) sw t0, GT_PCI0M1HD_OFS(t1) - mips_nmon - - copy_to_link_location pbl_start - - .set pop - .endm +ENTRY_FUNCTION_END(BOARD_PBL_START, qemu_malta) diff --git a/arch/mips/boards/ritmix-rzx50/Makefile b/arch/mips/boards/ritmix-rzx50/Makefile index 31c062987f..b08c4a93ca 100644 --- a/arch/mips/boards/ritmix-rzx50/Makefile +++ b/arch/mips/boards/ritmix-rzx50/Makefile @@ -1 +1 @@ -obj-y += serial.o +lwl-y += lowlevel.o diff --git a/arch/mips/boards/ritmix-rzx50/include/board/board_pbl_start.h b/arch/mips/boards/ritmix-rzx50/include/board/board_pbl_start.h deleted file mode 100644 index 7c2fa0bedc..0000000000 --- a/arch/mips/boards/ritmix-rzx50/include/board/board_pbl_start.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Startup Code for Ritmix RZX-50 board - * - * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <asm/pbl_macros.h> -#include <mach/debug_ll.h> -#include <asm/pbl_nmon.h> - - .macro board_pbl_start - .set push - .set noreorder - - mips_disable_interrupts - - /* CPU/SoC specific setup ... */ - /* ... absent */ - - debug_ll_ns16550_init - - debug_ll_outc '.' - debug_ll_ns16550_outnl - - mips_nmon - - copy_to_link_location pbl_start - - .set pop - .endm diff --git a/arch/mips/boards/ritmix-rzx50/include/board/debug_ll.h b/arch/mips/boards/ritmix-rzx50/include/board/debug_ll.h deleted file mode 100644 index 7ae0e2a4fd..0000000000 --- a/arch/mips/boards/ritmix-rzx50/include/board/debug_ll.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#ifndef __INCLUDE_RZX50_BOARD_DEBUG_LL_H__ -#define __INCLUDE_RZX50_BOARD_DEBUG_LL_H__ - -#include <mach/debug_ll_jz4750d.h> - -#endif /* __INCLUDE_RZX50_BOARD_DEBUG_LL_H__ */ diff --git a/arch/mips/boards/ritmix-rzx50/lowlevel.S b/arch/mips/boards/ritmix-rzx50/lowlevel.S new file mode 100644 index 0000000000..7a9743835e --- /dev/null +++ b/arch/mips/boards/ritmix-rzx50/lowlevel.S @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Startup Code for Ritmix RZX-50 board + * + * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> + */ + +#define BOARD_PBL_START start_ritmix_rzx50 + +#include <asm/pbl_macros.h> +#include <mach/debug_ll.h> +#include <asm/pbl_nmon.h> + +ENTRY_FUNCTION(BOARD_PBL_START) + + mips_disable_interrupts + + /* CPU/SoC specific setup ... */ + /* ... absent */ + + debug_ll_ns16550_init + + debug_ll_outc '.' + debug_ll_ns16550_outnl + +ENTRY_FUNCTION_END(BOARD_PBL_START, rzx50) diff --git a/arch/mips/boards/ritmix-rzx50/serial.c b/arch/mips/boards/ritmix-rzx50/serial.c deleted file mode 100644 index f1e8da0072..0000000000 --- a/arch/mips/boards/ritmix-rzx50/serial.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <common.h> -#include <init.h> - -static int rzx50_hostname_init(void) -{ - barebox_set_hostname("rzx50"); - - return 0; -} -console_initcall(rzx50_hostname_init); diff --git a/arch/mips/boards/tplink-mr3020/Makefile b/arch/mips/boards/tplink-mr3020/Makefile index dcfc2937d3..b08c4a93ca 100644 --- a/arch/mips/boards/tplink-mr3020/Makefile +++ b/arch/mips/boards/tplink-mr3020/Makefile @@ -1 +1 @@ -obj-y += board.o +lwl-y += lowlevel.o diff --git a/arch/mips/boards/tplink-mr3020/board.c b/arch/mips/boards/tplink-mr3020/board.c deleted file mode 100644 index 318998cc49..0000000000 --- a/arch/mips/boards/tplink-mr3020/board.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <common.h> -#include <init.h> - -static int model_hostname_init(void) -{ - barebox_set_hostname("mr3020"); - - return 0; -} -postcore_initcall(model_hostname_init); diff --git a/arch/mips/boards/tplink-mr3020/include/board/board_pbl_start.h b/arch/mips/boards/tplink-mr3020/lowlevel.S index e70f55e873..e3e6a61b78 100644 --- a/arch/mips/boards/tplink-mr3020/include/board/board_pbl_start.h +++ b/arch/mips/boards/tplink-mr3020/lowlevel.S @@ -1,28 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2013, 2015 Antony Pavlov <antonynpavlov@gmail.com> * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ +#define BOARD_PBL_START start_tplink_mr3020 + +#include <mach/debug_ll.h> #include <asm/pbl_macros.h> +#include <asm/asm.h> #include <mach/pbl_macros.h> #include <asm/pbl_nmon.h> - .macro board_pbl_start - .set push - .set noreorder +ENTRY_FUNCTION(BOARD_PBL_START) mips_barebox_10h @@ -45,8 +35,7 @@ skip_pll_ram_config: pbl_ar9331_uart_enable - debug_ll_ar9331_init - mips_nmon + debug_ll_ath79_init /* * It is amazing but we have to enable MDIO on GPIO @@ -54,7 +43,4 @@ skip_pll_ram_config: */ pbl_ar9331_mdio_gpio_enable - copy_to_link_location pbl_start - - .set pop - .endm +ENTRY_FUNCTION_END(BOARD_PBL_START, tplink_mr3020) diff --git a/arch/mips/boards/tplink-wdr4300/Makefile b/arch/mips/boards/tplink-wdr4300/Makefile index dcfc2937d3..b08c4a93ca 100644 --- a/arch/mips/boards/tplink-wdr4300/Makefile +++ b/arch/mips/boards/tplink-wdr4300/Makefile @@ -1 +1 @@ -obj-y += board.o +lwl-y += lowlevel.o diff --git a/arch/mips/boards/tplink-wdr4300/board.c b/arch/mips/boards/tplink-wdr4300/board.c deleted file mode 100644 index d6126fcb6d..0000000000 --- a/arch/mips/boards/tplink-wdr4300/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2017 Oleksij Rempel <o.rempel@pengutronix.de> - * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <common.h> -#include <init.h> - -static int model_hostname_init(void) -{ - barebox_set_hostname("wdr4300"); - - return 0; -} -postcore_initcall(model_hostname_init); diff --git a/arch/mips/boards/tplink-wdr4300/include/board/board_pbl_start.h b/arch/mips/boards/tplink-wdr4300/include/board/board_pbl_start.h deleted file mode 100644 index 7d4ee4baba..0000000000 --- a/arch/mips/boards/tplink-wdr4300/include/board/board_pbl_start.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2017 Oleksij Rempel <o.rempel@pengutronix.de> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <mach/debug_ll_ar9344.h> -#include <asm/pbl_macros.h> -#include <mach/pbl_macros.h> -#include <mach/pbl_ll_init_ar9344_1.1.h> -#include <asm/pbl_nmon.h> - - .macro board_pbl_start - .set push - .set noreorder - - mips_barebox_10h - - debug_ll_ar9344_init - - debug_ll_outc '1' - - hornet_mips24k_cp0_setup - debug_ll_outc '2' - - /* test if we are in the SRAM */ - pbl_blt 0xbd000000 1f t8 - debug_ll_outc '3' - b skip_flash_test - nop -1: - /* test if we are in the flash */ - pbl_blt 0xbf000000 skip_pll_ram_config t8 - debug_ll_outc '4' -skip_flash_test: - - pbl_ar9344_v11_pll_config - debug_ll_outc '5' - - pbl_ar9344_v11_ddr2_config - -skip_pll_ram_config: - debug_ll_outc '6' - debug_ll_outnl - - mips_nmon - - copy_to_link_location pbl_start - - .set pop - .endm diff --git a/arch/mips/boards/tplink-wdr4300/lowlevel.S b/arch/mips/boards/tplink-wdr4300/lowlevel.S new file mode 100644 index 0000000000..461b257f41 --- /dev/null +++ b/arch/mips/boards/tplink-wdr4300/lowlevel.S @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2017 Oleksij Rempel <o.rempel@pengutronix.de> + */ + +#define BOARD_PBL_START start_tplink_wdr4300 + +#include <mach/debug_ll.h> +#include <asm/asm.h> +#include <asm/pbl_macros.h> +#include <mach/pbl_macros.h> +#include <mach/pbl_ll_init_ar9344_1.1.h> +#include <asm/pbl_nmon.h> + +ENTRY_FUNCTION(BOARD_PBL_START) + + mips_barebox_10h + + debug_ll_ath79_init + + hornet_mips24k_cp0_setup + + /* test if we are in the SRAM */ + pbl_blt 0xbd000000 1f t8 + b skip_flash_test + nop +1: + /* test if we are in the flash */ + pbl_blt 0xbf000000 skip_pll_ram_config t8 +skip_flash_test: + + pbl_ar9344_v11_pll_config + + pbl_ar9344_v11_ddr2_config + +skip_pll_ram_config: + +ENTRY_FUNCTION_END(BOARD_PBL_START, ar9344_tl_wdr4300_v1.7) diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index b865b10f8b..3d46e836f7 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -1,6 +1,6 @@ obj-y += start.o obj-y += main_entry.o -obj-$(CONFIG_BUILTIN_DTB) += dtb.o +obj-$(CONFIG_OFDEVICE) += dtb.o -pbl-y += start-pbl.o main_entry-pbl.o +pbl-y += main_entry-pbl.o diff --git a/arch/mips/boot/dtb.c b/arch/mips/boot/dtb.c index 3f7f466413..ea30e16f21 100644 --- a/arch/mips/boot/dtb.c +++ b/arch/mips/boot/dtb.c @@ -1,21 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> * * Based on arch/arm/cpu/dtb.c: * Copyright (C) 2013 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <common.h> #include <init.h> @@ -23,6 +11,9 @@ #include <memory.h> #include <asm/addrspace.h> +void *glob_fdt; +u32 glob_fdt_size; + void of_add_memory_bank(struct device_node *node, bool dump, int r, u64 base, u64 size) { @@ -38,6 +29,10 @@ void of_add_memory_bank(struct device_node *node, bool dump, int r, if (dump) pr_info("%s: %s: 0x%llx@0x%llx\n", node->name, str, size, base); + + if (glob_fdt && glob_fdt_size) + request_sdram_region("fdt", (resource_size_t)glob_fdt, + glob_fdt_size); } extern char __dtb_start[]; @@ -45,12 +40,13 @@ extern char __dtb_start[]; static int of_mips_init(void) { struct device_node *root; + void *fdt; - root = of_get_root_node(); - if (root) - return 0; + fdt = glob_fdt; + if (!fdt) + fdt = __dtb_start; - root = of_unflatten_dtb(__dtb_start); + root = of_unflatten_dtb(fdt); if (!IS_ERR(root)) { pr_debug("using internal DTB\n"); of_set_root_node(root); diff --git a/arch/mips/boot/main_entry-pbl.c b/arch/mips/boot/main_entry-pbl.c index e408d29445..b40887b064 100644 --- a/arch/mips/boot/main_entry-pbl.c +++ b/arch/mips/boot/main_entry-pbl.c @@ -1,19 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <common.h> @@ -31,7 +18,7 @@ extern void *input_data_end; unsigned long free_mem_ptr; unsigned long free_mem_end_ptr; -void pbl_main_entry(void); +void pbl_main_entry(void *fdt, void *fdt_end); static unsigned long *ttb; @@ -46,10 +33,11 @@ static void barebox_uncompress(void *compressed_start, unsigned int len) pbl_barebox_uncompress((void*)TEXT_BASE, compressed_start, len); } -void __section(.text_entry) pbl_main_entry(void) +void __section(.text_entry) pbl_main_entry(void *fdt, void *fdt_end) { - u32 pg_start, pg_end, pg_len; - void (*barebox)(void); + u32 pg_start, pg_end, pg_len, fdt_len; + void *fdt_new; + void (*barebox)(void *fdt, u32 fdt_len); puts_ll("pbl_main_entry()\n"); @@ -62,6 +50,10 @@ void __section(.text_entry) pbl_main_entry(void) barebox_uncompress(&input_data, pg_len); + fdt_len = (u32)fdt_end - (u32)fdt; + fdt_new = (void *)PAGE_ALIGN_DOWN(STACK_BASE - fdt_len); + memcpy(fdt_new, fdt, fdt_len); + barebox = (void *)TEXT_BASE; - barebox(); + barebox(fdt_new, fdt_len); } diff --git a/arch/mips/boot/main_entry.c b/arch/mips/boot/main_entry.c index 43a78c2956..84325da93a 100644 --- a/arch/mips/boot/main_entry.c +++ b/arch/mips/boot/main_entry.c @@ -1,21 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ +#include <init.h> #include <common.h> #include <string.h> #include <memory.h> @@ -27,7 +15,7 @@ extern void handle_reserved(void); -void main_entry(void); +void main_entry(void *fdt, u32 fdt_size); unsigned long exception_handlers[32]; @@ -71,12 +59,15 @@ static void trap_init(void) write_c0_status(read_c0_status() & ~ST0_BEV); } +extern void *glob_fdt; +extern u32 glob_fdt_size; + /** * Called plainly from assembler code * * @note The C environment isn't initialized yet */ -void main_entry(void) +void __bare_init main_entry(void *fdt, u32 fdt_size) { /* clear the BSS first */ memset(__bss_start, 0x00, __bss_stop - __bss_start); @@ -94,5 +85,8 @@ void main_entry(void) mem_malloc_init((void *)MALLOC_BASE, (void *)(MALLOC_BASE + MALLOC_SIZE - 1)); + glob_fdt = fdt; + glob_fdt_size = fdt_size; + start_barebox(); } diff --git a/arch/mips/boot/start-pbl.S b/arch/mips/boot/start-pbl.S deleted file mode 100644 index d6e8231a73..0000000000 --- a/arch/mips/boot/start-pbl.S +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Startup Code for MIPS CPU - * - * Copyright (C) 2011, 2012 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include <asm/regdef.h> -#include <asm/mipsregs.h> -#include <asm/asm.h> - -#include <asm/pbl_macros.h> -#include <board/board_pbl_start.h> - - .set noreorder - .section ".text_head_entry" - .align 4 - -EXPORT(pbl_start) - - board_pbl_start - - stack_setup - - la v0, pbl_main_entry - jal v0 - nop - - /* No return */ -__error: - b __error - nop diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S index e937e89af1..6efe03e98d 100644 --- a/arch/mips/boot/start.S +++ b/arch/mips/boot/start.S @@ -1,20 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Startup Code for MIPS CPU * * Copyright (C) 2011, 2015 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <asm/pbl_macros.h> @@ -27,6 +15,10 @@ EXPORT(_start) mips_barebox_10h + /* save dtb pointer */ + move s0, a0 + move s1, a1 + /* disable watchpoints */ mtc0 zero, CP0_WATCHLO mtc0 zero, CP0_WATCHHI @@ -37,6 +29,9 @@ EXPORT(_start) stack_setup + /* restore dtb pointer */ + move a0, s0 + move a1, s1 la v0, main_entry jal v0 nop diff --git a/arch/mips/configs/8devices-lima_defconfig b/arch/mips/configs/8devices-lima_defconfig deleted file mode 100644 index 446369a544..0000000000 --- a/arch/mips/configs/8devices-lima_defconfig +++ /dev/null @@ -1,83 +0,0 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="qca4531-8devices-lima" -CONFIG_MACH_MIPS_ATH79=y -CONFIG_PBL_IMAGE=y -CONFIG_IMAGE_COMPRESSION_XZKERN=y -CONFIG_MMU=y -CONFIG_TEXT_BASE=0x81000000 -CONFIG_MALLOC_TLSF=y -CONFIG_HUSH_FANCY_PROMPT=y -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_CONSOLE_RATP=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y -CONFIG_CMD_DMESG=y -CONFIG_LONGHELP=y -CONFIG_CMD_IOMEM=y -CONFIG_CMD_IMD=y -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_GO=y -CONFIG_CMD_LOADB=y -CONFIG_CMD_LOADY=y -CONFIG_CMD_RESET=y -CONFIG_CMD_EXPORT=y -CONFIG_CMD_DEFAULTENV=y -CONFIG_CMD_LOADENV=y -CONFIG_CMD_MAGICVAR=y -CONFIG_CMD_MAGICVAR_HELP=y -CONFIG_CMD_SAVEENV=y -CONFIG_CMD_SHA1SUM=y -CONFIG_CMD_UNCOMPRESS=y -CONFIG_CMD_LET=y -CONFIG_CMD_MSLEEP=y -CONFIG_CMD_READF=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_HOST=y -CONFIG_CMD_MIITOOL=y -CONFIG_CMD_PING=y -CONFIG_CMD_ECHO_E=y -CONFIG_CMD_EDIT=y -CONFIG_CMD_READLINE=y -CONFIG_CMD_TIMEOUT=y -CONFIG_CMD_CRC=y -CONFIG_CMD_MEMTEST=y -CONFIG_CMD_MM=y -CONFIG_CMD_CLK=y -CONFIG_CMD_DETECT=y -CONFIG_CMD_FLASH=y -CONFIG_CMD_GPIO=y -CONFIG_CMD_LED=y -CONFIG_CMD_POWEROFF=y -CONFIG_CMD_SPI=y -CONFIG_CMD_LED_TRIGGER=y -CONFIG_CMD_BAREBOX_UPDATE=y -CONFIG_CMD_OF_NODE=y -CONFIG_CMD_OF_PROPERTY=y -CONFIG_CMD_OFTREE=y -CONFIG_CMD_TIME=y -CONFIG_NET=y -CONFIG_NET_NFS=y -CONFIG_NET_NETCONSOLE=y -CONFIG_NET_SNTP=y -CONFIG_OFDEVICE=y -CONFIG_OF_BAREBOX_DRIVERS=y -CONFIG_OF_BAREBOX_ENV_IN_FS=y -CONFIG_DRIVER_SERIAL_NS16550=y -CONFIG_DRIVER_NET_AG71XX=y -CONFIG_AR8327N_PHY=y -CONFIG_MDIO_BITBANG=y -CONFIG_MDIO_GPIO=y -CONFIG_DRIVER_SPI_ATH79=y -CONFIG_MTD=y -# CONFIG_MTD_OOB_DEVICE is not set -CONFIG_MTD_M25P80=y -CONFIG_LED=y -CONFIG_LED_GPIO=y -CONFIG_LED_GPIO_OF=y -CONFIG_LED_TRIGGERS=y -CONFIG_FS_TFTP=y -CONFIG_FS_NFS=y -CONFIG_FS_RATP=y -CONFIG_DIGEST_SHA224_GENERIC=y -CONFIG_DIGEST_SHA256_GENERIC=y diff --git a/arch/mips/configs/tplink-mr3020_defconfig b/arch/mips/configs/ath79_defconfig index 4193bd628f..781786bc52 100644 --- a/arch/mips/configs/tplink-mr3020_defconfig +++ b/arch/mips/configs/ath79_defconfig @@ -1,7 +1,10 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="tplink-mr3020" CONFIG_MACH_MIPS_ATH79=y -CONFIG_PBL_IMAGE=y +CONFIG_MIPS_ATH79_MULTI_BOARDS=y +CONFIG_BOARD_8DEVICES_LIMA=y +CONFIG_BOARD_DPTECHNICS_DPT_MODULE=y +CONFIG_BOARD_TPLINK_MR3020=y +CONFIG_BOARD_TPLINK_WDR4300=y +CONFIG_BOARD_BLACK_SWIFT=y CONFIG_IMAGE_COMPRESSION_XZKERN=y CONFIG_MMU=y CONFIG_TEXT_BASE=0x81000000 diff --git a/arch/mips/configs/dlink-dir-320_defconfig b/arch/mips/configs/bcm47xx_defconfig index ff0638a8c6..04833ef2e0 100644 --- a/arch/mips/configs/dlink-dir-320_defconfig +++ b/arch/mips/configs/bcm47xx_defconfig @@ -1,6 +1,5 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="dlink-dir-320" CONFIG_MACH_MIPS_BCM47XX=y +CONFIG_IMAGE_COMPRESSION_XZKERN=y CONFIG_STACK_SIZE=0x7000 CONFIG_EXPERIMENTAL=y CONFIG_HUSH_FANCY_PROMPT=y @@ -10,6 +9,7 @@ CONFIG_MENU=y CONFIG_BOOTM_SHOW_TYPE=y CONFIG_PARTITION=y # CONFIG_DEFAULT_ENVIRONMENT is not set +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_POLLER=y CONFIG_LONGHELP=y CONFIG_CMD_IOMEM=y diff --git a/arch/mips/configs/black-swift_defconfig b/arch/mips/configs/black-swift_defconfig deleted file mode 100644 index 1a72cfbd77..0000000000 --- a/arch/mips/configs/black-swift_defconfig +++ /dev/null @@ -1,54 +0,0 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="black-swift" -CONFIG_MACH_MIPS_ATH79=y -CONFIG_BOARD_BLACK_SWIFT=y -CONFIG_NMON=y -CONFIG_NMON_USER_START=y -CONFIG_NMON_1S_DELAY=0x100000 -CONFIG_NMON_USER_START_DELAY=0x5 -CONFIG_NMON_HELP=y -CONFIG_PBL_IMAGE=y -CONFIG_IMAGE_COMPRESSION_XZKERN=y -CONFIG_MMU=y -CONFIG_TEXT_BASE=0x82000000 -CONFIG_MALLOC_TLSF=y -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_IMD=y -CONFIG_PARTITION=y -CONFIG_DEBUG_LL=y -CONFIG_LONGHELP=y -CONFIG_CMD_IOMEM=y -CONFIG_CMD_MEMINFO=y -# CONFIG_CMD_BOOTM is not set -CONFIG_CMD_GO=y -CONFIG_CMD_LOADB=y -CONFIG_CMD_LOADY=y -CONFIG_CMD_RESET=y -CONFIG_CMD_PARTITION=y -CONFIG_CMD_GLOBAL=y -CONFIG_CMD_SHA1SUM=y -CONFIG_CMD_LET=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_EDIT=y -CONFIG_CMD_MM=y -CONFIG_CMD_CLK=y -CONFIG_CMD_FLASH=y -CONFIG_CMD_GPIO=y -CONFIG_CMD_LED=y -CONFIG_CMD_SPI=y -CONFIG_CMD_OF_NODE=y -CONFIG_CMD_OF_PROPERTY=y -CONFIG_CMD_OFTREE=y -CONFIG_OFDEVICE=y -CONFIG_DRIVER_SERIAL_AR933X=y -CONFIG_DRIVER_SPI_ATH79=y -CONFIG_MTD=y -# CONFIG_MTD_OOB_DEVICE is not set -CONFIG_MTD_M25P80=y -CONFIG_LED=y -CONFIG_LED_GPIO=y -CONFIG_LED_GPIO_OF=y -CONFIG_KEYBOARD_GPIO=y -CONFIG_DIGEST_SHA224_GENERIC=y -CONFIG_DIGEST_SHA256_GENERIC=y diff --git a/arch/mips/configs/dptechnics-dpt-module_defconfig b/arch/mips/configs/dptechnics-dpt-module_defconfig deleted file mode 100644 index c01b22b987..0000000000 --- a/arch/mips/configs/dptechnics-dpt-module_defconfig +++ /dev/null @@ -1,89 +0,0 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="ar9331-dptechnics-dpt-module" -CONFIG_MACH_MIPS_ATH79=y -CONFIG_BOARD_DPTECHNICS_DPT_MODULE=y -CONFIG_PBL_IMAGE=y -CONFIG_IMAGE_COMPRESSION_XZKERN=y -CONFIG_MMU=y -CONFIG_TEXT_BASE=0x82000000 -CONFIG_MALLOC_TLSF=y -CONFIG_HUSH_FANCY_PROMPT=y -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_CONSOLE_RATP=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y -CONFIG_RESET_SOURCE=y -CONFIG_CMD_DMESG=y -CONFIG_LONGHELP=y -CONFIG_CMD_IOMEM=y -CONFIG_CMD_IMD=y -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_GO=y -CONFIG_CMD_LOADB=y -CONFIG_CMD_LOADY=y -CONFIG_CMD_RESET=y -CONFIG_CMD_EXPORT=y -CONFIG_CMD_DEFAULTENV=y -CONFIG_CMD_LOADENV=y -CONFIG_CMD_MAGICVAR=y -CONFIG_CMD_MAGICVAR_HELP=y -CONFIG_CMD_SAVEENV=y -CONFIG_CMD_SHA1SUM=y -CONFIG_CMD_UNCOMPRESS=y -CONFIG_CMD_LET=y -CONFIG_CMD_MSLEEP=y -CONFIG_CMD_READF=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_HOST=y -CONFIG_CMD_MIITOOL=y -CONFIG_CMD_PING=y -CONFIG_CMD_ECHO_E=y -CONFIG_CMD_EDIT=y -CONFIG_CMD_READLINE=y -CONFIG_CMD_TIMEOUT=y -CONFIG_CMD_CRC=y -CONFIG_CMD_MEMTEST=y -CONFIG_CMD_MM=y -CONFIG_CMD_CLK=y -CONFIG_CMD_DETECT=y -CONFIG_CMD_FLASH=y -CONFIG_CMD_GPIO=y -CONFIG_CMD_LED=y -CONFIG_CMD_POWEROFF=y -CONFIG_CMD_SPI=y -CONFIG_CMD_LED_TRIGGER=y -CONFIG_CMD_WD=y -CONFIG_CMD_BAREBOX_UPDATE=y -CONFIG_CMD_OF_NODE=y -CONFIG_CMD_OF_PROPERTY=y -CONFIG_CMD_OFTREE=y -CONFIG_CMD_TIME=y -CONFIG_NET=y -CONFIG_NET_NFS=y -CONFIG_NET_NETCONSOLE=y -CONFIG_NET_SNTP=y -CONFIG_OFDEVICE=y -CONFIG_OF_BAREBOX_DRIVERS=y -CONFIG_OF_BAREBOX_ENV_IN_FS=y -CONFIG_DRIVER_SERIAL_AR933X=y -CONFIG_DRIVER_NET_AG71XX=y -CONFIG_AR8327N_PHY=y -CONFIG_AT803X_PHY=y -CONFIG_MDIO_BITBANG=y -CONFIG_MDIO_GPIO=y -CONFIG_DRIVER_SPI_ATH79=y -CONFIG_MTD=y -# CONFIG_MTD_OOB_DEVICE is not set -CONFIG_MTD_M25P80=y -CONFIG_LED=y -CONFIG_LED_GPIO=y -CONFIG_LED_GPIO_OF=y -CONFIG_LED_TRIGGERS=y -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_AR9344=y -CONFIG_FS_TFTP=y -CONFIG_FS_NFS=y -CONFIG_FS_RATP=y -CONFIG_DIGEST_SHA224_GENERIC=y -CONFIG_DIGEST_SHA256_GENERIC=y diff --git a/arch/mips/configs/img-ci20_defconfig b/arch/mips/configs/img-ci20_defconfig deleted file mode 100644 index ada82c6431..0000000000 --- a/arch/mips/configs/img-ci20_defconfig +++ /dev/null @@ -1,45 +0,0 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="img-ci20" -CONFIG_MACH_MIPS_XBURST=y -CONFIG_BOARD_CI20=y -CONFIG_PBL_IMAGE=y -CONFIG_GLOB=y -CONFIG_HUSH_FANCY_PROMPT=y -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_BOOTM_SHOW_TYPE=y -CONFIG_BOOTM_VERBOSE=y -CONFIG_BOOTM_INITRD=y -CONFIG_BOOTM_OFTREE=y -CONFIG_BOOTM_OFTREE_UIMAGE=y -# CONFIG_DEFAULT_ENVIRONMENT is not set -CONFIG_POLLER=y -CONFIG_DEBUG_LL=y -CONFIG_LONGHELP=y -CONFIG_CMD_IOMEM=y -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_GO=y -CONFIG_CMD_LOADB=y -CONFIG_CMD_LOADS=y -CONFIG_CMD_LOADY=y -CONFIG_CMD_RESET=y -CONFIG_CMD_SAVES=y -CONFIG_CMD_UIMAGE=y -CONFIG_CMD_MD5SUM=y -CONFIG_CMD_GETOPT=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_MIITOOL=y -CONFIG_CMD_PING=y -CONFIG_CMD_TFTP=y -CONFIG_CMD_EDIT=y -CONFIG_CMD_GPIO=y -CONFIG_CMD_OF_NODE=y -CONFIG_CMD_OF_PROPERTY=y -CONFIG_CMD_OFTREE=y -CONFIG_NET=y -CONFIG_OFDEVICE=y -CONFIG_DRIVER_NET_DM9K=y -# CONFIG_SPI is not set -CONFIG_CLOCKSOURCE_DUMMY_RATE=3500 -CONFIG_FS_TFTP=y diff --git a/arch/mips/configs/qemu-malta_defconfig b/arch/mips/configs/qemu-malta_defconfig index 9671e93dc0..1314783e02 100644 --- a/arch/mips/configs/qemu-malta_defconfig +++ b/arch/mips/configs/qemu-malta_defconfig @@ -1,6 +1,6 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="qemu-malta" -CONFIG_PBL_IMAGE=y +CONFIG_MIPS_MALTA_MULTI_BOARDS=y +CONFIG_BOARD_QEMU_MALTA=y +CONFIG_IMAGE_COMPRESSION_XZKERN=y CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x400000 CONFIG_STACK_SIZE=0x7000 CONFIG_EXPERIMENTAL=y @@ -10,10 +10,12 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_BOOTM_SHOW_TYPE=y +CONFIG_CONSOLE_ALLOW_COLOR=y CONFIG_PARTITION=y -# CONFIG_DEFAULT_ENVIRONMENT is not set +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_POLLER=y CONFIG_DEBUG_INFO=y +CONFIG_CMD_DMESG=y CONFIG_LONGHELP=y CONFIG_CMD_IOMEM=y CONFIG_CMD_IMD=y @@ -24,6 +26,7 @@ CONFIG_CMD_LOADY=y CONFIG_CMD_RESET=y CONFIG_CMD_PARTITION=y CONFIG_CMD_EXPORT=y +CONFIG_CMD_DEFAULTENV=y CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y CONFIG_CMD_SAVEENV=y @@ -31,7 +34,6 @@ CONFIG_CMD_MD5SUM=y CONFIG_CMD_SHA1SUM=y CONFIG_CMD_SHA256SUM=y CONFIG_CMD_UNCOMPRESS=y -CONFIG_CMD_GETOPT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_DHCP=y CONFIG_CMD_MIITOOL=y diff --git a/arch/mips/configs/tplink-wdr4300_defconfig b/arch/mips/configs/tplink-wdr4300_defconfig deleted file mode 100644 index 46093d243b..0000000000 --- a/arch/mips/configs/tplink-wdr4300_defconfig +++ /dev/null @@ -1,82 +0,0 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="ar9344-tl-wdr4300-v1.7" -CONFIG_MACH_MIPS_ATH79=y -CONFIG_BOARD_TPLINK_WDR4300=y -CONFIG_PBL_IMAGE=y -CONFIG_IMAGE_COMPRESSION_XZKERN=y -CONFIG_MMU=y -CONFIG_TEXT_BASE=0x81000000 -CONFIG_MALLOC_TLSF=y -CONFIG_HUSH_FANCY_PROMPT=y -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y -CONFIG_CMD_DMESG=y -CONFIG_LONGHELP=y -CONFIG_CMD_IOMEM=y -CONFIG_CMD_IMD=y -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_GO=y -CONFIG_CMD_LOADB=y -CONFIG_CMD_LOADY=y -CONFIG_CMD_RESET=y -CONFIG_CMD_EXPORT=y -CONFIG_CMD_DEFAULTENV=y -CONFIG_CMD_LOADENV=y -CONFIG_CMD_MAGICVAR=y -CONFIG_CMD_MAGICVAR_HELP=y -CONFIG_CMD_SAVEENV=y -CONFIG_CMD_SHA1SUM=y -CONFIG_CMD_UNCOMPRESS=y -CONFIG_CMD_LET=y -CONFIG_CMD_MSLEEP=y -CONFIG_CMD_READF=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_DHCP=y -CONFIG_CMD_HOST=y -CONFIG_CMD_MIITOOL=y -CONFIG_CMD_PING=y -CONFIG_CMD_ECHO_E=y -CONFIG_CMD_EDIT=y -CONFIG_CMD_READLINE=y -CONFIG_CMD_TIMEOUT=y -CONFIG_CMD_CRC=y -CONFIG_CMD_MEMTEST=y -CONFIG_CMD_MM=y -CONFIG_CMD_CLK=y -CONFIG_CMD_DETECT=y -CONFIG_CMD_FLASH=y -CONFIG_CMD_GPIO=y -CONFIG_CMD_LED=y -CONFIG_CMD_POWEROFF=y -CONFIG_CMD_SPI=y -CONFIG_CMD_LED_TRIGGER=y -CONFIG_CMD_BAREBOX_UPDATE=y -CONFIG_CMD_OF_NODE=y -CONFIG_CMD_OF_PROPERTY=y -CONFIG_CMD_OFTREE=y -CONFIG_CMD_TIME=y -CONFIG_NET=y -CONFIG_NET_NFS=y -CONFIG_NET_NETCONSOLE=y -CONFIG_NET_SNTP=y -CONFIG_OFDEVICE=y -CONFIG_OF_BAREBOX_DRIVERS=y -CONFIG_OF_BAREBOX_ENV_IN_FS=y -CONFIG_DRIVER_SERIAL_NS16550=y -CONFIG_DRIVER_NET_AG71XX=y -CONFIG_AR8327N_PHY=y -CONFIG_MDIO_BITBANG=y -CONFIG_MDIO_GPIO=y -CONFIG_DRIVER_SPI_ATH79=y -CONFIG_MTD=y -# CONFIG_MTD_OOB_DEVICE is not set -CONFIG_MTD_M25P80=y -CONFIG_LED=y -CONFIG_LED_GPIO=y -CONFIG_LED_GPIO_OF=y -CONFIG_LED_TRIGGERS=y -CONFIG_FS_TFTP=y -CONFIG_FS_NFS=y -CONFIG_DIGEST_SHA224_GENERIC=y -CONFIG_DIGEST_SHA256_GENERIC=y diff --git a/arch/mips/configs/ritmix-rzx50_defconfig b/arch/mips/configs/xburst_defconfig index 3fb978a813..4305afc586 100644 --- a/arch/mips/configs/ritmix-rzx50_defconfig +++ b/arch/mips/configs/xburst_defconfig @@ -1,8 +1,7 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="rzx50" CONFIG_MACH_MIPS_XBURST=y -CONFIG_JZ47XX_DEBUG_LL_UART1=y -CONFIG_PBL_IMAGE=y +CONFIG_BOARD_RZX50=y +CONFIG_BOARD_CI20=y +CONFIG_CPU_MIPS32_R1=y CONFIG_BAUDRATE=57600 CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y @@ -14,7 +13,6 @@ CONFIG_BOOTM_INITRD=y CONFIG_BOOTM_OFTREE=y CONFIG_BOOTM_OFTREE_UIMAGE=y # CONFIG_DEFAULT_ENVIRONMENT is not set -CONFIG_DEBUG_LL=y CONFIG_LONGHELP=y CONFIG_CMD_IOMEM=y CONFIG_CMD_IMD=y diff --git a/arch/mips/dts/Makefile b/arch/mips/dts/Makefile index ddd9039985..7485f85a14 100644 --- a/arch/mips/dts/Makefile +++ b/arch/mips/dts/Makefile @@ -1,5 +1,17 @@ - BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_NAME)) -obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o +ifneq ($(BUILTIN_DTB),) +obj-dtb-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o +endif + +pbl-dtb-$(CONFIG_BOARD_8DEVICES_LIMA) += qca4531-8devices-lima.dtb.o +pbl-dtb-$(CONFIG_BOARD_BLACK_SWIFT) += black-swift.dtb.o +pbl-dtb-$(CONFIG_BOARD_CI20) += img-ci20.dtb.o +pbl-dtb-$(CONFIG_BOARD_DLINK_DIR320) += dlink-dir-320.dtb.o +pbl-dtb-$(CONFIG_BOARD_DPTECHNICS_DPT_MODULE) += ar9331-dptechnics-dpt-module.dtb.o +pbl-dtb-$(CONFIG_BOARD_LOONGSON_TECH_LS1B) += loongson-ls1b.dtb.o +pbl-dtb-$(CONFIG_BOARD_QEMU_MALTA) += qemu-malta.dtb.o +pbl-dtb-$(CONFIG_BOARD_RZX50) += rzx50.dtb.o +pbl-dtb-$(CONFIG_BOARD_TPLINK_MR3020) += tplink-mr3020.dtb.o +pbl-dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += ar9344-tl-wdr4300-v1.7.dtb.o clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.lzo diff --git a/arch/mips/dts/img-ci20.dts b/arch/mips/dts/img-ci20.dts index d985666020..e1d3280c4e 100644 --- a/arch/mips/dts/img-ci20.dts +++ b/arch/mips/dts/img-ci20.dts @@ -1,19 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * CI20 device tree * * Copyright (c) 2013 Imagination Technologies * Author: Paul Burton <paul.burton@imgtec.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ /dts-v1/; diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h index dc44d7f790..11f10e5011 100644 --- a/arch/mips/include/asm/addrspace.h +++ b/arch/mips/include/asm/addrspace.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1996, 99 Ralf Baechle * Copyright (C) 2000, 2002 Maciej W. Rozycki * Copyright (C) 1990, 1999 by Silicon Graphics, Inc. diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h index 12e17581b8..7a23f4ed82 100644 --- a/arch/mips/include/asm/asm.h +++ b/arch/mips/include/asm/asm.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1995, 1996, 1997, 1999, 2001 by Ralf Baechle * Copyright (C) 1999 by Silicon Graphics, Inc. * Copyright (C) 2001 MIPS Technologies, Inc. @@ -80,6 +77,35 @@ symbol: .frame sp, framesize, rpc symbol: /* + * ENTRY_FUNCTION - mark start of entry function + */ +#define ENTRY_FUNCTION(symbol) \ + .set noreorder; \ + .section .text_head_entry.symbol; \ + .align 4; \ + \ +EXPORT(symbol) + +/* + * ENTRY_FUNCTION_END - mark end of entry function + */ +#define ENTRY_FUNCTION_END(symbol, dtb) \ + mips_nmon; \ + copy_to_link_location symbol; \ + stack_setup; \ + \ + la a0, __dtb_ ## dtb##_start; \ + la a1, __dtb_ ## dtb##_end; \ + la v0, pbl_main_entry; \ + jal v0; \ + nop; \ + \ + /* No return */ \ +__error: \ + b __error; \ + nop; + +/* * FEXPORT - export definition of a function symbol */ #define FEXPORT(symbol) \ diff --git a/arch/mips/include/asm/barebox.h b/arch/mips/include/asm/barebox.h index e5b964ca1b..2d13ee932f 100644 --- a/arch/mips/include/asm/barebox.h +++ b/arch/mips/include/asm/barebox.h @@ -1,16 +1,4 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * - */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef _ASM_MIPS_BAREBOX_H_ #define _ASM_MIPS_BAREBOX_H_ diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h index e77ab83202..e2bdf98e95 100644 --- a/arch/mips/include/asm/bitops.h +++ b/arch/mips/include/asm/bitops.h @@ -1,16 +1,4 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * - */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef _ASM_BITOPS_H_ #define _ASM_BITOPS_H_ diff --git a/arch/mips/include/asm/byteorder.h b/arch/mips/include/asm/byteorder.h index 9579051ff1..d6925204bd 100644 --- a/arch/mips/include/asm/byteorder.h +++ b/arch/mips/include/asm/byteorder.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1996, 99, 2003 by Ralf Baechle */ #ifndef _ASM_BYTEORDER_H diff --git a/arch/mips/include/asm/cacheops.h b/arch/mips/include/asm/cacheops.h index 3bc585259f..9f60e0287d 100644 --- a/arch/mips/include/asm/cacheops.h +++ b/arch/mips/include/asm/cacheops.h @@ -1,10 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * Cache operations for the cache instruction. - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * (C) Copyright 1996, 97, 99, 2002, 03 Ralf Baechle * (C) Copyright 1999 Silicon Graphics, Inc. */ diff --git a/arch/mips/include/asm/common.h b/arch/mips/include/asm/common.h index 2f5419f7de..5316591959 100644 --- a/arch/mips/include/asm/common.h +++ b/arch/mips/include/asm/common.h @@ -1,16 +1,4 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * - */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /** * @file diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index 168d854454..f076116ff8 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 2003, 2004 Ralf Baechle * Copyright (C) 2004 Maciej W. Rozycki */ diff --git a/arch/mips/include/asm/cpu-info.h b/arch/mips/include/asm/cpu-info.h index 6701730465..98a492ac2b 100644 --- a/arch/mips/include/asm/cpu-info.h +++ b/arch/mips/include/asm/cpu-info.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1994 Waldorf GMBH * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003 Ralf Baechle * Copyright (C) 1996 Paul M. Antoine diff --git a/arch/mips/include/asm/debug_ll_ns16550.h b/arch/mips/include/asm/debug_ll_ns16550.h index 058814ecfd..df58c4cf0d 100644 --- a/arch/mips/include/asm/debug_ll_ns16550.h +++ b/arch/mips/include/asm/debug_ll_ns16550.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2012, 2013 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ /** @file diff --git a/arch/mips/include/asm/dma.h b/arch/mips/include/asm/dma.h index 30a58c78b9..e0b4689172 100644 --- a/arch/mips/include/asm/dma.h +++ b/arch/mips/include/asm/dma.h @@ -1,8 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2012 by Marc Kleine-Budde <mkl@pengutronix.de> - * - * This file is released under the GPLv2 - * */ #ifndef __ASM_DMA_H diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h index b8b82191c7..3dd6b82357 100644 --- a/arch/mips/include/asm/elf.h +++ b/arch/mips/include/asm/elf.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Much of this is taken from binutils and GNU libc ... */ diff --git a/arch/mips/include/asm/gt64120.h b/arch/mips/include/asm/gt64120.h index 88fa1fa5f0..34d2382593 100644 --- a/arch/mips/include/asm/gt64120.h +++ b/arch/mips/include/asm/gt64120.h @@ -1,19 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2000, 2004, 2005 MIPS Technologies, Inc. * All rights reserved. * Authors: Carsten Langgaard <carstenl@mips.com> * Maciej W. Rozycki <macro@mips.com> * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) - * - * This program is free software; you can distribute it and/or modify it - * under the terms of the GNU General Public License (Version 2) as - * published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * */ #ifndef _ASM_GT64120_H #define _ASM_GT64120_H diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 30262e6e1e..9e7d656542 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001 by Ralf Baechle * Copyright (C) 2000 Silicon Graphics, Inc. * Modified for further R[236]000 support by Paul M. Antoine, 1996. diff --git a/arch/mips/include/asm/module.h b/arch/mips/include/asm/module.h index 0978d8947b..1ffceeebdf 100644 --- a/arch/mips/include/asm/module.h +++ b/arch/mips/include/asm/module.h @@ -1,16 +1,4 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * - */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef _ASM_MIPS_MODULE_H_ #define _ASM_MIPS_MODULE_H_ diff --git a/arch/mips/include/asm/pbl_macros.h b/arch/mips/include/asm/pbl_macros.h index bb3182cda9..e78d1afe6a 100644 --- a/arch/mips/include/asm/pbl_macros.h +++ b/arch/mips/include/asm/pbl_macros.h @@ -1,21 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Startup Code for MIPS CPU * * Copyright (C) 2011, 2012 Antony Pavlov <antonynpavlov@gmail.com> * ADR macro copyrighted (C) 2009 by Shinya Kuribayashi <skuribay@pobox.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __ASM_PBL_MACROS_H diff --git a/arch/mips/include/asm/pbl_nmon.h b/arch/mips/include/asm/pbl_nmon.h index e0326bd7cd..0e4ec39967 100644 --- a/arch/mips/include/asm/pbl_nmon.h +++ b/arch/mips/include/asm/pbl_nmon.h @@ -1,20 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * nano-monitor for MIPS CPU * * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <mach/debug_ll.h> diff --git a/arch/mips/include/asm/posix_types.h b/arch/mips/include/asm/posix_types.h index c38e24a4b2..bd58c39653 100644 --- a/arch/mips/include/asm/posix_types.h +++ b/arch/mips/include/asm/posix_types.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1996, 97, 98, 99, 2000 by Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. */ diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h index 211834d8f8..5e6519924a 100644 --- a/arch/mips/include/asm/ptrace.h +++ b/arch/mips/include/asm/ptrace.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 by Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. */ diff --git a/arch/mips/include/asm/regdef.h b/arch/mips/include/asm/regdef.h index 7c8ecb6b9c..1300251661 100644 --- a/arch/mips/include/asm/regdef.h +++ b/arch/mips/include/asm/regdef.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1985 MIPS Computer Systems, Inc. * Copyright (C) 1994, 95, 99, 2003 by Ralf Baechle * Copyright (C) 1990 - 1992, 1999 Silicon Graphics, Inc. diff --git a/arch/mips/include/asm/sgidefs.h b/arch/mips/include/asm/sgidefs.h index 876442fcfb..6bdea3e617 100644 --- a/arch/mips/include/asm/sgidefs.h +++ b/arch/mips/include/asm/sgidefs.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1996, 1999, 2001 Ralf Baechle * Copyright (C) 1999 Silicon Graphics, Inc. * Copyright (C) 2001 MIPS Technologies, Inc. diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h index abfa2d25b0..2295d7f02f 100644 --- a/arch/mips/include/asm/stackframe.h +++ b/arch/mips/include/asm/stackframe.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1994, 95, 96, 99, 2001 Ralf Baechle * Copyright (C) 1994, 1995, 1996 Paul M. Antoine. * Copyright (C) 1999 Silicon Graphics, Inc. diff --git a/arch/mips/include/asm/string.h b/arch/mips/include/asm/string.h index a797a7459c..9e5814976c 100644 --- a/arch/mips/include/asm/string.h +++ b/arch/mips/include/asm/string.h @@ -1,16 +1,4 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * - */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /** * @file diff --git a/arch/mips/include/asm/swab.h b/arch/mips/include/asm/swab.h index 97c2f81b4b..d84eb18c56 100644 --- a/arch/mips/include/asm/swab.h +++ b/arch/mips/include/asm/swab.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1996, 99, 2003 by Ralf Baechle */ #ifndef _ASM_SWAB_H diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h index 4140c92e1a..cd76f53b50 100644 --- a/arch/mips/include/asm/types.h +++ b/arch/mips/include/asm/types.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle * Copyright (C) 2008 Wind River Systems, * written by Ralf Baechle diff --git a/arch/mips/include/asm/unaligned.h b/arch/mips/include/asm/unaligned.h index 42f66c3114..acb649c084 100644 --- a/arch/mips/include/asm/unaligned.h +++ b/arch/mips/include/asm/unaligned.h @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) */ #ifndef _ASM_MIPS_UNALIGNED_H diff --git a/arch/mips/lib/barebox.lds.S b/arch/mips/lib/barebox.lds.S index c4026bb7f1..8ddf954517 100644 --- a/arch/mips/lib/barebox.lds.S +++ b/arch/mips/lib/barebox.lds.S @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ diff --git a/arch/mips/lib/c-r4k.c b/arch/mips/lib/c-r4k.c index cb0544a532..8bc0a7a411 100644 --- a/arch/mips/lib/c-r4k.c +++ b/arch/mips/lib/c-r4k.c @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1996 David S. Miller (davem@davemloft.net) * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Ralf Baechle (ralf@gnu.org) * Copyright (C) 1999, 2000 Silicon Graphics, Inc. diff --git a/arch/mips/lib/cpu-probe.c b/arch/mips/lib/cpu-probe.c index b5d63db189..cf63849743 100644 --- a/arch/mips/lib/cpu-probe.c +++ b/arch/mips/lib/cpu-probe.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Processor capabilities determination functions. * @@ -5,11 +6,6 @@ * Copyright (C) 1994 - 2006 Ralf Baechle * Copyright (C) 2003, 2004 Maciej W. Rozycki * Copyright (C) 2001, 2004 MIPS Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. */ #include <common.h> #include <asm/mipsregs.h> diff --git a/arch/mips/lib/cpuinfo.c b/arch/mips/lib/cpuinfo.c index fb02a4d202..fd27920f9b 100644 --- a/arch/mips/lib/cpuinfo.c +++ b/arch/mips/lib/cpuinfo.c @@ -1,20 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * cpuinfo - show information about MIPS CPU * * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <common.h> diff --git a/arch/mips/lib/csrc-r4k.c b/arch/mips/lib/csrc-r4k.c index 6f6e18c8e8..9facf04bd3 100644 --- a/arch/mips/lib/csrc-r4k.c +++ b/arch/mips/lib/csrc-r4k.c @@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ /** diff --git a/arch/mips/lib/dma-default.c b/arch/mips/lib/dma-default.c index 71c1e423b7..fbe627c24c 100644 --- a/arch/mips/lib/dma-default.c +++ b/arch/mips/lib/dma-default.c @@ -1,15 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * (C) Copyright 2015, 2016 Peter Mamonov <pmamonov@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <dma.h> diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S index a5af0c9381..cee0319dcf 100644 --- a/arch/mips/lib/memcpy.S +++ b/arch/mips/lib/memcpy.S @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1998, 99, 2000, 01, 2002 Ralf Baechle (ralf@gnu.org) * Copyright (C) 1999, 2000, 01, 2002 Silicon Graphics, Inc. * Copyright (C) 2002 Broadcom, Inc. diff --git a/arch/mips/lib/memset.S b/arch/mips/lib/memset.S index d3c1c72393..0b81bd7d8d 100644 --- a/arch/mips/lib/memset.S +++ b/arch/mips/lib/memset.S @@ -1,8 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * * Copyright (C) 1998, 1999, 2000 by Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 2007 by Maciej W. Rozycki diff --git a/arch/mips/lib/pbl.lds.S b/arch/mips/lib/pbl.lds.S new file mode 100644 index 0000000000..1f0285dd6f --- /dev/null +++ b/arch/mips/lib/pbl.lds.S @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * (C) Copyright 2018 Oleksij Rempel <o.rempel@pengutronix.de>, Pengutronix + * (C) Copyright 2012 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix + */ + +#include <asm-generic/barebox.lds.h> +#include <asm-generic/memory_layout.h> + +OUTPUT_ARCH("mips") +SECTIONS +{ + . = HEAD_TEXT_BASE; + + PRE_IMAGE + + . = ALIGN(4); + .text : + { + _stext = .; + _text = .; + *(.text_head_entry*) + __bare_init_start = .; + *(.text_bare_init*) + __bare_init_end = .; + *(.text*) + } + + BAREBOX_BARE_INIT_SIZE + + . = ALIGN(4); + .rodata : { *(.rodata*) } + + .barebox_imd : { BAREBOX_IMD } + + _etext = .; /* End of text and rodata section */ + + . = ALIGN(4); + .data : { *(.data*) } + + . = ALIGN(4); + __piggydata_start = .; + .piggydata : { + *(.piggydata) + } + __piggydata_end = .; + + . = ALIGN(4); + __bss_start = .; + .bss : { *(.bss*) } + __bss_stop = .; + _end = .; +} diff --git a/arch/mips/mach-ar231x/ar231x.c b/arch/mips/mach-ar231x/ar231x.c index 3a0103b5ce..7dc4156e6b 100644 --- a/arch/mips/mach-ar231x/ar231x.c +++ b/arch/mips/mach-ar231x/ar231x.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Based on Linux driver: * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved. @@ -6,11 +7,6 @@ * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> * Ported to Barebox: * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ #include <common.h> diff --git a/arch/mips/mach-ar231x/ar231x_reset.c b/arch/mips/mach-ar231x/ar231x_reset.c index 7c322d87b6..f88167ba4c 100644 --- a/arch/mips/mach-ar231x/ar231x_reset.c +++ b/arch/mips/mach-ar231x/ar231x_reset.c @@ -1,10 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ #include <common.h> diff --git a/arch/mips/mach-ar231x/board.c b/arch/mips/mach-ar231x/board.c index 8bd1787cbd..48bd7360f2 100644 --- a/arch/mips/mach-ar231x/board.c +++ b/arch/mips/mach-ar231x/board.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Based on Linux driver: * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved. @@ -6,11 +7,6 @@ * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> * Ported to Barebox: * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ diff --git a/arch/mips/mach-ar231x/include/mach/ar2312_regs.h b/arch/mips/mach-ar231x/include/mach/ar2312_regs.h index 7ac1b09b9a..fa0ad5dfc7 100644 --- a/arch/mips/mach-ar231x/include/mach/ar2312_regs.h +++ b/arch/mips/mach-ar231x/include/mach/ar2312_regs.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Based on Linux driver: * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved. @@ -5,11 +6,6 @@ * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> * Ported to Barebox: * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ #ifndef AR2312_H diff --git a/arch/mips/mach-ar231x/include/mach/ar231x_platform.h b/arch/mips/mach-ar231x/include/mach/ar231x_platform.h index 18f55b69c7..561ec30c6b 100644 --- a/arch/mips/mach-ar231x/include/mach/ar231x_platform.h +++ b/arch/mips/mach-ar231x/include/mach/ar231x_platform.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Based on Linux driver: * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved. @@ -6,11 +7,6 @@ * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> * Ported to Barebox: * Copyright (C) 2013 Oleksij Rempel <linux@rempel-privat.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ #ifndef __AR231X_PLATFORM_H diff --git a/arch/mips/mach-ar231x/include/mach/debug_ll.h b/arch/mips/mach-ar231x/include/mach/debug_ll.h index 5ab7f9a26a..50f442aa3d 100644 --- a/arch/mips/mach-ar231x/include/mach/debug_ll.h +++ b/arch/mips/mach-ar231x/include/mach/debug_ll.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __MACH_AR231X_DEBUG_LL__ @@ -21,7 +9,6 @@ /** @file * This File contains declaration for early output support */ -#include <board/debug_ll.h> #include <asm/debug_ll_ns16550.h> #endif /* __MACH_AR231X_DEBUG_LL__ */ diff --git a/arch/mips/mach-ath79/Kconfig b/arch/mips/mach-ath79/Kconfig index e4e10a2f65..4bc1d88b4e 100644 --- a/arch/mips/mach-ath79/Kconfig +++ b/arch/mips/mach-ath79/Kconfig @@ -10,8 +10,18 @@ config SOC_QCA_AR9331 config SOC_QCA_AR9344 bool +if DEBUG_LL choice - prompt "Board type" + prompt "DEBUG_LL driver" + +config DEBUG_AR9331_UART + bool "AR9331 Debug UART" + +config DEBUG_AR9344_UART + bool "AR9344 Debug UART" + +endchoice +endif # DEBUG_LL config BOARD_8DEVICES_LIMA bool "8devices LIMA" @@ -19,7 +29,6 @@ config BOARD_8DEVICES_LIMA select HAVE_PBL_IMAGE select HAVE_IMAGE_COMPRESSION select HAS_NMON - select HAS_NO_BOARD_HL_CODE config BOARD_DPTECHNICS_DPT_MODULE bool "DPTechnics DPT-Module" @@ -27,7 +36,6 @@ config BOARD_DPTECHNICS_DPT_MODULE select HAVE_PBL_IMAGE select HAVE_IMAGE_COMPRESSION select HAS_NMON - select HAS_NO_BOARD_HL_CODE config BOARD_TPLINK_MR3020 bool "TP-LINK MR3020" @@ -50,6 +58,4 @@ config BOARD_BLACK_SWIFT select HAVE_IMAGE_COMPRESSION select HAS_NMON -endchoice - endif diff --git a/arch/mips/mach-ath79/bbu.c b/arch/mips/mach-ath79/bbu.c index 701b5752e8..0f64e6195a 100644 --- a/arch/mips/mach-ath79/bbu.c +++ b/arch/mips/mach-ath79/bbu.c @@ -1,14 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2017 Oleksij Rempel <linux@rempel-privat.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ #include <common.h> diff --git a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h index f73700b5b9..f7737d682b 100644 --- a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h +++ b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Atheros AR71XX/AR724X/AR913X SoC register definitions * @@ -6,10 +7,6 @@ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> * * Parts of this file are based on Atheros' 2.6.15/2.6.31 BSP - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation. */ #ifndef __ASM_MACH_AR71XX_REGS_H diff --git a/arch/mips/mach-ath79/include/mach/ath79.h b/arch/mips/mach-ath79/include/mach/ath79.h index ff53406fb0..206bd2289b 100644 --- a/arch/mips/mach-ath79/include/mach/ath79.h +++ b/arch/mips/mach-ath79/include/mach/ath79.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Atheros AR71XX/AR724X/AR913X common definitions * @@ -5,10 +6,6 @@ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> * * Parts of this file are based on Atheros' 2.6.15 BSP - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation. */ #ifndef __ASM_MACH_ATH79_H diff --git a/arch/mips/mach-ath79/include/mach/debug_ll.h b/arch/mips/mach-ath79/include/mach/debug_ll.h index 73d064a3a0..67691f13b6 100644 --- a/arch/mips/mach-ath79/include/mach/debug_ll.h +++ b/arch/mips/mach-ath79/include/mach/debug_ll.h @@ -1,27 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __MACH_ATH79_DEBUG_LL__ #define __MACH_ATH79_DEBUG_LL__ -#if defined(CONFIG_SOC_QCA_AR9331) +#ifdef CONFIG_DEBUG_LL + +#ifdef CONFIG_DEBUG_AR9331_UART #include <mach/debug_ll_ar9331.h> -#elif defined(CONFIG_SOC_QCA_AR9344) +#elif defined CONFIG_DEBUG_AR9344_UART #include <mach/debug_ll_ar9344.h> +#else +#error "unknown ath79 debug uart soc type" #endif +#else +#define debug_ll_ath79_init +#endif /* CONFIG_DEBUG_LL */ + #endif /* __MACH_AR9344_DEBUG_LL_H__ */ diff --git a/arch/mips/mach-ath79/include/mach/debug_ll_ar9331.h b/arch/mips/mach-ath79/include/mach/debug_ll_ar9331.h index 04bd3ea72b..cd32e2d1d1 100644 --- a/arch/mips/mach-ath79/include/mach/debug_ll_ar9331.h +++ b/arch/mips/mach-ath79/include/mach/debug_ll_ar9331.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * based on linux.git/drivers/tty/serial/ar933x_uart.c - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __AR933X_DEBUG_LL__ @@ -81,7 +69,7 @@ static inline void PUTC_LL(int ch) #define AR933X_UART_CLOCK_REG 0x08 #define CLOCK_REG ((KSEG1 | AR933X_UART_BASE) | AR933X_UART_CLOCK_REG) -.macro debug_ll_ar9331_init +.macro debug_ll_ath79_init #ifdef CONFIG_DEBUG_LL pbl_reg_writel ((AR933X_UART_CS_IF_MODE_DCE << AR933X_UART_CS_IF_MODE_S) \ diff --git a/arch/mips/mach-ath79/include/mach/debug_ll_ar9344.h b/arch/mips/mach-ath79/include/mach/debug_ll_ar9344.h index d156ce9f39..96ac08bb56 100644 --- a/arch/mips/mach-ath79/include/mach/debug_ll_ar9344.h +++ b/arch/mips/mach-ath79/include/mach/debug_ll_ar9344.h @@ -1,26 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2017 Oleksij Rempel <o.rempel@pengutronix.de> * Copyright (C) 2012, 2013 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __AR9344_DEBUG_LL__ #define __AR9344_DEBUG_LL__ +#include <asm/asm.h> #include <asm/addrspace.h> #include <mach/ar71xx_regs.h> +#include <asm/regdef.h> #define DEBUG_LL_UART_ADDR KSEG1ADDR(AR934X_UART0_BASE) #define DEBUG_LL_UART_SHIFT AR934X_UART0_SHIFT @@ -66,7 +56,7 @@ static inline void PUTC_LL(char ch) * Macros for use in assembly language code */ -.macro debug_ll_ar9344_init +.macro debug_ll_ath79_init #ifdef CONFIG_DEBUG_LL /* find out the ref clock */ diff --git a/arch/mips/mach-ath79/include/mach/pbl_macros.h b/arch/mips/mach-ath79/include/mach/pbl_macros.h index 906d73e8c7..70736b3680 100644 --- a/arch/mips/mach-ath79/include/mach/pbl_macros.h +++ b/arch/mips/mach-ath79/include/mach/pbl_macros.h @@ -393,13 +393,10 @@ skip_pll_ram_config: dcache_enable pbl_ar9331_uart_enable - debug_ll_ar9331_init - mips_nmon + debug_ll_ath79_init pbl_ar9331_mdio_gpio_enable - copy_to_link_location pbl_start - .set pop .endm diff --git a/arch/mips/mach-ath79/reset.c b/arch/mips/mach-ath79/reset.c index 0665788227..b756c859d8 100644 --- a/arch/mips/mach-ath79/reset.c +++ b/arch/mips/mach-ath79/reset.c @@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2013 Du Huanpeng <u74147@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <common.h> diff --git a/arch/mips/mach-bcm47xx/include/mach/debug_ll.h b/arch/mips/mach-bcm47xx/include/mach/debug_ll.h index 3e74e0f670..df5b13f694 100644 --- a/arch/mips/mach-bcm47xx/include/mach/debug_ll.h +++ b/arch/mips/mach-bcm47xx/include/mach/debug_ll.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ /** @file @@ -21,7 +9,6 @@ #ifndef __INCLUDE_ARCH_DEBUG_LL_H__ #define __INCLUDE_ARCH_DEBUG_LL_H__ -#include <io.h> #include <mach/hardware.h> #define DEBUG_LL_UART_SHIFT 0 diff --git a/arch/mips/mach-bcm47xx/include/mach/hardware.h b/arch/mips/mach-bcm47xx/include/mach/hardware.h index 462302df8e..071229f862 100644 --- a/arch/mips/mach-bcm47xx/include/mach/hardware.h +++ b/arch/mips/mach-bcm47xx/include/mach/hardware.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __INCLUDE_ARCH_HARDWARE_H__ diff --git a/arch/mips/mach-bcm47xx/reset.c b/arch/mips/mach-bcm47xx/reset.c index 6287adb374..33dfb7b3b5 100644 --- a/arch/mips/mach-bcm47xx/reset.c +++ b/arch/mips/mach-bcm47xx/reset.c @@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <common.h> diff --git a/arch/mips/mach-loongson/include/mach/debug_ll.h b/arch/mips/mach-loongson/include/mach/debug_ll.h index b999f5e019..c2d6edb773 100644 --- a/arch/mips/mach-loongson/include/mach/debug_ll.h +++ b/arch/mips/mach-loongson/include/mach/debug_ll.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __MACH_LOONGSON_DEBUG_LL__ @@ -21,7 +9,6 @@ /** @file * This File contains declaration for early output support */ -#include <board/debug_ll.h> #include <asm/debug_ll_ns16550.h> #endif /* __MACH_LOONGSON_DEBUG_LL__ */ diff --git a/arch/mips/mach-loongson/include/mach/loongson1.h b/arch/mips/mach-loongson/include/mach/loongson1.h index 12fdbc00bc..75e1a55047 100644 --- a/arch/mips/mach-loongson/include/mach/loongson1.h +++ b/arch/mips/mach-loongson/include/mach/loongson1.h @@ -1,12 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Copyright (c) 2011 Zhang, Keguang <keguang.zhang at gmail.com> * * Register mappings for Loongson 1 - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. */ #ifndef __ASM_MACH_LOONGSON1_LOONGSON1_H diff --git a/arch/mips/mach-loongson/loongson1_reset.c b/arch/mips/mach-loongson/loongson1_reset.c index 7a8f1d6836..3763a109ea 100644 --- a/arch/mips/mach-loongson/loongson1_reset.c +++ b/arch/mips/mach-loongson/loongson1_reset.c @@ -1,15 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2014 Antony Pavlov <antonynpavlov at gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <common.h> diff --git a/arch/mips/mach-malta/Kconfig b/arch/mips/mach-malta/Kconfig index 1bf2b0e68a..ceea937e30 100644 --- a/arch/mips/mach-malta/Kconfig +++ b/arch/mips/mach-malta/Kconfig @@ -4,8 +4,11 @@ config ARCH_TEXT_BASE hex default 0xa0800000 -choice - prompt "Board type" +config MIPS_MALTA_MULTI_BOARDS + bool "Allow multiple boards to be selected" + select HAVE_PBL_MULTI_IMAGE + +if MIPS_MALTA_MULTI_BOARDS config BOARD_QEMU_MALTA bool "qemu malta" @@ -13,6 +16,6 @@ config BOARD_QEMU_MALTA select HAVE_IMAGE_COMPRESSION select HAS_NMON -endchoice +endif # MIPS_MALTA_MULTI_BOARDS endif diff --git a/arch/mips/mach-malta/include/mach/debug_ll.h b/arch/mips/mach-malta/include/mach/debug_ll.h index c9e89bcc9d..63d1538c59 100644 --- a/arch/mips/mach-malta/include/mach/debug_ll.h +++ b/arch/mips/mach-malta/include/mach/debug_ll.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ /** @file @@ -21,7 +9,15 @@ #ifndef __MACH_MALTA_DEBUG_LL_H__ #define __MACH_MALTA_DEBUG_LL_H__ -#include <board/debug_ll.h> +#include <mach/hardware.h> + +#define DEBUG_LL_UART_ADDR MALTA_PIIX4_UART0 +#define DEBUG_LL_UART_SHIFT 0 + +#define DEBUG_LL_UART_CLK 1843200 +#define DEBUG_LL_UART_BPS CONFIG_BAUDRATE +#define DEBUG_LL_UART_DIVISOR (DEBUG_LL_UART_CLK / DEBUG_LL_UART_BPS) + #include <asm/debug_ll_ns16550.h> #endif /* __MACH_MALTA_DEBUG_LL_H__ */ diff --git a/arch/mips/mach-malta/include/mach/hardware.h b/arch/mips/mach-malta/include/mach/hardware.h index ba28cb86de..1176b08b6a 100644 --- a/arch/mips/mach-malta/include/mach/hardware.h +++ b/arch/mips/mach-malta/include/mach/hardware.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __INCLUDE_ARCH_HARDWARE_H__ diff --git a/arch/mips/mach-malta/reset.c b/arch/mips/mach-malta/reset.c index ff29cd5e9b..df7be0ae55 100644 --- a/arch/mips/mach-malta/reset.c +++ b/arch/mips/mach-malta/reset.c @@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ /** diff --git a/arch/mips/mach-xburst/Kconfig b/arch/mips/mach-xburst/Kconfig index ee79ff6167..b3790210dd 100644 --- a/arch/mips/mach-xburst/Kconfig +++ b/arch/mips/mach-xburst/Kconfig @@ -16,9 +16,6 @@ config CPU_JZ4780 select WATCHDOG select WATCHDOG_JZ4740 -choice - prompt "Board type" - config BOARD_RZX50 bool "Ritmix RZX-50" select CPU_JZ4755 @@ -28,9 +25,18 @@ config BOARD_CI20 select CPU_JZ4780 select HAS_DM9000 +if DEBUG_LL +choice + prompt "DEBUG_LL driver" + +config DEBUG_JZ4750D_UART + bool "JZ4750D Debug UART" + +config DEBUG_JZ4780_UART + bool "JZ4780 Debug UART" + endchoice -if DEBUG_LL choice prompt "DEBUG_LL port" diff --git a/arch/mips/mach-xburst/csrc-jz4750.c b/arch/mips/mach-xburst/csrc-jz4750.c index 75e065414b..302709e597 100644 --- a/arch/mips/mach-xburst/csrc-jz4750.c +++ b/arch/mips/mach-xburst/csrc-jz4750.c @@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ /** diff --git a/arch/mips/mach-xburst/include/mach/debug_ll.h b/arch/mips/mach-xburst/include/mach/debug_ll.h index 6c3c9804b5..ea12ea5913 100644 --- a/arch/mips/mach-xburst/include/mach/debug_ll.h +++ b/arch/mips/mach-xburst/include/mach/debug_ll.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __MACH_XBURST_DEBUG_LL__ @@ -21,7 +9,19 @@ /** @file * This File contains declaration for early output support */ -#include <board/debug_ll.h> + +#ifdef CONFIG_DEBUG_LL + +#ifdef CONFIG_DEBUG_JZ4750D_UART +#include <mach/debug_ll_jz4750d.h> +#elif defined CONFIG_DEBUG_JZ4780_UART +#include <mach/debug_ll_jz4780.h> +#else +#error "unknown xburst debug uart soc type" +#endif + +#endif /* CONFIG_DEBUG_LL */ + #include <asm/debug_ll_ns16550.h> #endif /* __MACH_XBURST_DEBUG_LL__ */ diff --git a/arch/mips/mach-xburst/include/mach/debug_ll_jz4750d.h b/arch/mips/mach-xburst/include/mach/debug_ll_jz4750d.h index 6d18366c5b..8633ad2d14 100644 --- a/arch/mips/mach-xburst/include/mach/debug_ll_jz4750d.h +++ b/arch/mips/mach-xburst/include/mach/debug_ll_jz4750d.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __INCLUDE_DEBUG_LL_JZ4750D_H__ diff --git a/arch/mips/mach-xburst/include/mach/debug_ll_jz4780.h b/arch/mips/mach-xburst/include/mach/debug_ll_jz4780.h index 0bdc58caa2..20e94d6c41 100644 --- a/arch/mips/mach-xburst/include/mach/debug_ll_jz4780.h +++ b/arch/mips/mach-xburst/include/mach/debug_ll_jz4780.h @@ -1,18 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __INCLUDE_DEBUG_LL_JZ4780_H__ diff --git a/arch/mips/mach-xburst/include/mach/jz4750d_regs.h b/arch/mips/mach-xburst/include/mach/jz4750d_regs.h index 396c823a1f..5e02488e93 100644 --- a/arch/mips/mach-xburst/include/mach/jz4750d_regs.h +++ b/arch/mips/mach-xburst/include/mach/jz4750d_regs.h @@ -1,13 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * based on linux/include/asm-mips/mach-jz4750d/regs.h * * JZ4750D register definition. * * Copyright (C) 2008 Ingenic Semiconductor Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. */ #ifndef __JZ4750D_REGS_H__ diff --git a/arch/mips/mach-xburst/include/mach/jz4780.h b/arch/mips/mach-xburst/include/mach/jz4780.h index 4503a93ec1..8f58700689 100644 --- a/arch/mips/mach-xburst/include/mach/jz4780.h +++ b/arch/mips/mach-xburst/include/mach/jz4780.h @@ -1,19 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * JZ4780 SoC definitions * * Copyright (c) 2013 Imagination Technologies * Author: Paul Burton <paul.burton@imgtec.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #ifndef __MIPS_ASM_MACH_JZ4780_JZ4780_H__ diff --git a/arch/mips/mach-xburst/reset-jz4750.c b/arch/mips/mach-xburst/reset-jz4750.c index 1fdcc7b8af..a1d5976fb2 100644 --- a/arch/mips/mach-xburst/reset-jz4750.c +++ b/arch/mips/mach-xburst/reset-jz4750.c @@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ /** diff --git a/arch/mips/pbl/zbarebox.lds.S b/arch/mips/pbl/zbarebox.lds.S index a883fdb2db..04b5b8680f 100644 --- a/arch/mips/pbl/zbarebox.lds.S +++ b/arch/mips/pbl/zbarebox.lds.S @@ -1,19 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * (C) Copyright 2012 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <asm-generic/barebox.lds.h> |