From 102676feb218ab590609d326af433913728d14ab Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Tue, 27 Nov 2018 10:19:33 +0100 Subject: MIPS: port all mach* to multiimage Signed-off-by: Oleksij Rempel Signed-off-by: Sascha Hauer --- arch/mips/Kconfig | 7 ++ arch/mips/Makefile | 29 +----- arch/mips/boards/8devices-lima/Makefile | 1 + .../8devices-lima/include/board/board_pbl_start.h | 65 ------------- arch/mips/boards/8devices-lima/lowlevel.S | 53 +++++++++++ arch/mips/boards/Makefile | 11 +++ arch/mips/boards/black-swift/Makefile | 1 + .../black-swift/include/board/board_pbl_start.h | 60 ------------ arch/mips/boards/black-swift/lowlevel.S | 58 ++++++++++++ arch/mips/boards/dlink-dir-320/Makefile | 1 + arch/mips/boards/dlink-dir-320/lowlevel.S | 22 +++++ arch/mips/boards/dptechnics-dpt-module/Makefile | 1 + .../include/board/board_pbl_start.h | 20 ---- arch/mips/boards/dptechnics-dpt-module/lowlevel.S | 23 +++++ arch/mips/boards/img-ci20/Makefile | 1 + .../img-ci20/include/board/board_pbl_start.h | 43 --------- arch/mips/boards/img-ci20/include/board/debug_ll.h | 23 ----- arch/mips/boards/img-ci20/lowlevel.S | 38 ++++++++ arch/mips/boards/loongson-ls1b/Makefile | 1 + .../loongson-ls1b/include/board/board_pbl_start.h | 41 --------- arch/mips/boards/loongson-ls1b/lowlevel.S | 36 ++++++++ arch/mips/boards/netgear-wg102/Makefile | 1 + .../netgear-wg102/include/board/board_pbl_start.h | 77 ---------------- arch/mips/boards/netgear-wg102/lowlevel.S | 85 +++++++++++++++++ arch/mips/boards/qemu-malta/Makefile | 1 + .../qemu-malta/include/board/board_pbl_start.h | 102 --------------------- arch/mips/boards/qemu-malta/lowlevel.S | 97 ++++++++++++++++++++ arch/mips/boards/ritmix-rzx50/Makefile | 1 + .../ritmix-rzx50/include/board/board_pbl_start.h | 43 --------- .../boards/ritmix-rzx50/include/board/debug_ll.h | 23 ----- arch/mips/boards/ritmix-rzx50/lowlevel.S | 38 ++++++++ arch/mips/boards/tplink-mr3020/Makefile | 1 + .../tplink-mr3020/include/board/board_pbl_start.h | 60 ------------ arch/mips/boards/tplink-mr3020/lowlevel.S | 58 ++++++++++++ arch/mips/boards/tplink-wdr4300/Makefile | 1 + .../tplink-wdr4300/include/board/board_pbl_start.h | 62 ------------- arch/mips/boards/tplink-wdr4300/lowlevel.S | 50 ++++++++++ arch/mips/boot/Makefile | 2 +- arch/mips/boot/start-pbl.S | 44 --------- arch/mips/configs/8devices-lima_defconfig | 83 ----------------- arch/mips/configs/ath79_defconfig | 84 +++++++++++++++++ arch/mips/configs/bcm47xx_defconfig | 63 +++++++++++++ arch/mips/configs/black-swift_defconfig | 54 ----------- arch/mips/configs/dlink-dir-320_defconfig | 63 ------------- arch/mips/configs/dptechnics-dpt-module_defconfig | 89 ------------------ arch/mips/configs/img-ci20_defconfig | 45 --------- arch/mips/configs/qemu-malta_defconfig | 12 ++- arch/mips/configs/ritmix-rzx50_defconfig | 51 ----------- arch/mips/configs/tplink-mr3020_defconfig | 81 ---------------- arch/mips/configs/tplink-wdr4300_defconfig | 82 ----------------- arch/mips/configs/xburst_defconfig | 49 ++++++++++ arch/mips/dts/Makefile | 16 +++- arch/mips/mach-ar231x/include/mach/debug_ll.h | 1 - arch/mips/mach-ath79/Kconfig | 14 ++- arch/mips/mach-ath79/include/mach/debug_ll.h | 12 ++- .../mips/mach-ath79/include/mach/debug_ll_ar9331.h | 2 +- .../mips/mach-ath79/include/mach/debug_ll_ar9344.h | 4 +- arch/mips/mach-ath79/include/mach/pbl_macros.h | 5 +- arch/mips/mach-bcm47xx/include/mach/debug_ll.h | 1 - arch/mips/mach-loongson/include/mach/debug_ll.h | 1 - arch/mips/mach-malta/Kconfig | 9 +- arch/mips/mach-malta/include/mach/debug_ll.h | 10 +- arch/mips/mach-xburst/Kconfig | 14 ++- arch/mips/mach-xburst/include/mach/debug_ll.h | 14 ++- 64 files changed, 873 insertions(+), 1267 deletions(-) create mode 100644 arch/mips/boards/8devices-lima/Makefile delete mode 100644 arch/mips/boards/8devices-lima/include/board/board_pbl_start.h create mode 100644 arch/mips/boards/8devices-lima/lowlevel.S create mode 100644 arch/mips/boards/Makefile delete mode 100644 arch/mips/boards/black-swift/include/board/board_pbl_start.h create mode 100644 arch/mips/boards/black-swift/lowlevel.S create mode 100644 arch/mips/boards/dlink-dir-320/lowlevel.S create mode 100644 arch/mips/boards/dptechnics-dpt-module/Makefile delete mode 100644 arch/mips/boards/dptechnics-dpt-module/include/board/board_pbl_start.h create mode 100644 arch/mips/boards/dptechnics-dpt-module/lowlevel.S delete mode 100644 arch/mips/boards/img-ci20/include/board/board_pbl_start.h delete mode 100644 arch/mips/boards/img-ci20/include/board/debug_ll.h create mode 100644 arch/mips/boards/img-ci20/lowlevel.S delete mode 100644 arch/mips/boards/loongson-ls1b/include/board/board_pbl_start.h create mode 100644 arch/mips/boards/loongson-ls1b/lowlevel.S delete mode 100644 arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h create mode 100644 arch/mips/boards/netgear-wg102/lowlevel.S delete mode 100644 arch/mips/boards/qemu-malta/include/board/board_pbl_start.h create mode 100644 arch/mips/boards/qemu-malta/lowlevel.S delete mode 100644 arch/mips/boards/ritmix-rzx50/include/board/board_pbl_start.h delete mode 100644 arch/mips/boards/ritmix-rzx50/include/board/debug_ll.h create mode 100644 arch/mips/boards/ritmix-rzx50/lowlevel.S delete mode 100644 arch/mips/boards/tplink-mr3020/include/board/board_pbl_start.h create mode 100644 arch/mips/boards/tplink-mr3020/lowlevel.S delete mode 100644 arch/mips/boards/tplink-wdr4300/include/board/board_pbl_start.h create mode 100644 arch/mips/boards/tplink-wdr4300/lowlevel.S delete mode 100644 arch/mips/boot/start-pbl.S delete mode 100644 arch/mips/configs/8devices-lima_defconfig create mode 100644 arch/mips/configs/ath79_defconfig create mode 100644 arch/mips/configs/bcm47xx_defconfig delete mode 100644 arch/mips/configs/black-swift_defconfig delete mode 100644 arch/mips/configs/dlink-dir-320_defconfig delete mode 100644 arch/mips/configs/dptechnics-dpt-module_defconfig delete mode 100644 arch/mips/configs/img-ci20_defconfig delete mode 100644 arch/mips/configs/ritmix-rzx50_defconfig delete mode 100644 arch/mips/configs/tplink-mr3020_defconfig delete mode 100644 arch/mips/configs/tplink-wdr4300_defconfig create mode 100644 arch/mips/configs/xburst_defconfig (limited to 'arch/mips') diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 7c40991cab..72d84177d4 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 @@ -58,6 +59,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 +70,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 +93,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" diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 6338dc174d..80ce382cc9 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 @@ -133,8 +111,7 @@ 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 +132,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 - * - * 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 -#include -#include -#include -#include - - .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..a619747f39 --- /dev/null +++ b/arch/mips/boards/8devices-lima/lowlevel.S @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2018 Oleksij Rempel + * + * 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_8devices_lima + +#include +#include +#include +#include +#include +#include + +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..092c31d6b2 100644 --- a/arch/mips/boards/black-swift/Makefile +++ b/arch/mips/boards/black-swift/Makefile @@ -1 +1,2 @@ +lwl-y += lowlevel.o obj-y += board.o 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 - * Copyright (C) 2013 Oleksij Rempel - * - * 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 -#include -#include - - .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..3a9e780db8 --- /dev/null +++ b/arch/mips/boards/black-swift/lowlevel.S @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2013, 2015 Antony Pavlov + * Copyright (C) 2013 Oleksij Rempel + * + * 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_black_swift + +#include +#include +#include +#include +#include + +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/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 , Pengutronix + */ + +#define BOARD_PBL_START start_dlink_dir_320 + +#include +#include +#include +#include + +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 - * - * 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 -#include -#include - - .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..6601427ba4 --- /dev/null +++ b/arch/mips/boards/dptechnics-dpt-module/lowlevel.S @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2017 Oleksij Rempel + * + * 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. + */ + +#define BOARD_PBL_START start_dptechnics_dpt_module + +#include +#include +#include +#include +#include +#include +#include + +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..092c31d6b2 100644 --- a/arch/mips/boards/img-ci20/Makefile +++ b/arch/mips/boards/img-ci20/Makefile @@ -1 +1,2 @@ +lwl-y += lowlevel.o obj-y += board.o 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 - * - * 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 -#include -#include - - .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 - * - * 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 - -#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..ad3c851e05 --- /dev/null +++ b/arch/mips/boards/img-ci20/lowlevel.S @@ -0,0 +1,38 @@ +/* + * Startup Code for Imagination Creator CI20 board + * + * Copyright (C) 2014 Antony Pavlov + * + * 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_img_ci20 + +#include +#include +#include + +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..ded9867a8e 100644 --- a/arch/mips/boards/loongson-ls1b/Makefile +++ b/arch/mips/boards/loongson-ls1b/Makefile @@ -1 +1,2 @@ +lwl-y += lowlevel.o obj-y += serial.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 - * - * 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 -#include -#include -#include - - .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/lowlevel.S b/arch/mips/boards/loongson-ls1b/lowlevel.S new file mode 100644 index 0000000000..d17a0f79d4 --- /dev/null +++ b/arch/mips/boards/loongson-ls1b/lowlevel.S @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 Antony Pavlov + * + * 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_loongson_ls1b + +#include +#include +#include +#include + +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/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/board_pbl_start.h b/arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h deleted file mode 100644 index 9fb220519f..0000000000 --- a/arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2013 Antony Pavlov - * Copyright (C) 2013 Oleksij Rempel - * - * 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 -#include -#include - -#include - - .macro board_pbl_start - .set push - .set noreorder - - mips_barebox_10h - - mips_disable_interrupts - - pbl_ar2312_pll - - pbl_ar2312_rst_uart0 - debug_ll_ns16550_init - - debug_ll_outc 'a' - debug_ll_ns16550_outnl - - /* check if SDRAM is already configured, - * if yes, we are probably starting - * as second stage loader and can skip configuration */ - la t0, KSEG1 | AR2312_MEM_CFG1 - lw t1, 0(t0) - and t0, t1, MEM_CFG1_E0 - beq zero, t0, 1f - nop - - pbl_probe_mem t0, t1, KSEG1 - beq t0, t1, sdram_configured - nop - -1: - /* start SDRAM configuration */ - pbl_ar2312_x16_sdram - - /* check one more time. if some thing wrong, - * we don't need to continue */ - pbl_probe_mem t0, t1, KSEG1 - beq t0, t1, sdram_configured - nop - debug_ll_outc '#' - debug_ll_ns16550_outnl - -1: - b 1b /* dead end */ - nop - -sdram_configured: - debug_ll_outc 'b' - debug_ll_ns16550_outnl - - copy_to_link_location pbl_start - - .set pop - .endm diff --git a/arch/mips/boards/netgear-wg102/lowlevel.S b/arch/mips/boards/netgear-wg102/lowlevel.S new file mode 100644 index 0000000000..f449d4e051 --- /dev/null +++ b/arch/mips/boards/netgear-wg102/lowlevel.S @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2013 Antony Pavlov + * Copyright (C) 2013 Oleksij Rempel + * + * 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 +#include +#include + +#include + +ENTRY_FUNCTION(BOARD_PBL_START) + + mips_barebox_10h + + mips_disable_interrupts + + pbl_ar2312_pll + + pbl_ar2312_rst_uart0 + debug_ll_ns16550_init + + debug_ll_outc 'a' + debug_ll_ns16550_outnl + + /* check if SDRAM is already configured, + * if yes, we are probably starting + * as second stage loader and can skip configuration */ + la t0, KSEG1 | AR2312_MEM_CFG1 + lw t1, 0(t0) + and t0, t1, MEM_CFG1_E0 + beq zero, t0, 1f + nop + + pbl_probe_mem t0, t1, KSEG1 + beq t0, t1, sdram_configured + nop + +1: + /* start SDRAM configuration */ + pbl_ar2312_x16_sdram + + /* check one more time. if some thing wrong, + * we don't need to continue */ + pbl_probe_mem t0, t1, KSEG1 + beq t0, t1, sdram_configured + nop + debug_ll_outc '#' + debug_ll_ns16550_outnl + +1: + b 1b /* dead end */ + nop + +sdram_configured: + debug_ll_outc 'b' + debug_ll_ns16550_outnl + + copy_to_link_location BOARD_PBL_START; + stack_setup; + + lw a0, 0; + la v0, pbl_main_entry; + jal v0; + nop; + + /* No return */ +__error: + b __error; + nop; diff --git a/arch/mips/boards/qemu-malta/Makefile b/arch/mips/boards/qemu-malta/Makefile index eb072c0161..237a6a5079 100644 --- a/arch/mips/boards/qemu-malta/Makefile +++ b/arch/mips/boards/qemu-malta/Makefile @@ -1 +1,2 @@ +lwl-y += lowlevel.o obj-y += init.o diff --git a/arch/mips/boards/qemu-malta/include/board/board_pbl_start.h b/arch/mips/boards/qemu-malta/include/board/board_pbl_start.h deleted file mode 100644 index 5c1537262e..0000000000 --- a/arch/mips/boards/qemu-malta/include/board/board_pbl_start.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Startup Code for MIPS CPU - * - * Copyright (C) 2012 Antony Pavlov - * - * 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 -#include - -#include -#include -#include - -#ifdef CONFIG_CPU_LITTLE_ENDIAN -#define GT_CPU_TO_LE32(x) (x) -#elif defined CONFIG_CPU_BIG_ENDIAN -#define GT_CPU_TO_LE32(x) ( \ - (((x) & 0x000000ff) << 24) | \ - (((x) & 0x0000ff00) << 8) | \ - (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0xff000000) >> 24)) -#else -#error "could not determine byte order" -#endif - -#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 - - b __start - nop - - /* - On MIPS Technologies boards - 0x1fc00010 address is reserved for BoardID - */ - .org 0x10 - .word 0xffffffff - .word 0xffffffff - -__start: - mips_disable_interrupts - - /* cpu specific setup ... */ - /* ... absent */ - - /* - * Load BAR registers of GT64120 as done by YAMON - * - * based on write_bootloader() in qemu.git/hw/mips/mips_malta.c - * see GT64120 manual and qemu.git/hw/mips/gt64xxx_pci.c for details - */ - - /* move GT64120 registers to 0x1be00000 */ - li t1, KSEG1ADDR(GT_DEF_BASE) - li t0, GT_LD(MIPS_GT_BASE) - sw t0, GT_ISD_OFS(t1) - - /* - * setup MEM-to-PCI0 mapping - */ - li t1, KSEG1ADDR(MIPS_GT_BASE) - - /* setup PCI0 io window */ - li t0, GT_LD(0x18000000) - sw t0, GT_PCI0IOLD_OFS(t1) - li t0, GT_HD(0x181fffff) - sw t0, GT_PCI0IOHD_OFS(t1) - - /* setup PCI0 mem windows */ - li t0, GT_LD(0x10000000) - sw t0, GT_PCI0M0LD_OFS(t1) - li t0, GT_HD(0x17efffff) - sw t0, GT_PCI0M0HD_OFS(t1) - - li t0, GT_LD(0x18200000) - sw t0, GT_PCI0M1LD_OFS(t1) - li t0, GT_LD(0x1bdfffff) - sw t0, GT_PCI0M1HD_OFS(t1) - - mips_nmon - - copy_to_link_location pbl_start - - .set pop - .endm diff --git a/arch/mips/boards/qemu-malta/lowlevel.S b/arch/mips/boards/qemu-malta/lowlevel.S new file mode 100644 index 0000000000..e6d57bcffa --- /dev/null +++ b/arch/mips/boards/qemu-malta/lowlevel.S @@ -0,0 +1,97 @@ +/* + * Startup Code for MIPS CPU + * + * Copyright (C) 2012 Antony Pavlov + * + * 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 +#include +#include + +#include +#include +#include + +#ifdef CONFIG_CPU_LITTLE_ENDIAN +#define GT_CPU_TO_LE32(x) (x) +#elif defined CONFIG_CPU_BIG_ENDIAN +#define GT_CPU_TO_LE32(x) ( \ + (((x) & 0x000000ff) << 24) | \ + (((x) & 0x0000ff00) << 8) | \ + (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0xff000000) >> 24)) +#else +#error "could not determine byte order" +#endif + +#define GT_LD(x) (GT_CPU_TO_LE32(((x) >> 21) & 0x7fff)) +#define GT_HD(x) (GT_CPU_TO_LE32(((x) >> 21) & 0x7f)) + +ENTRY_FUNCTION(BOARD_PBL_START) + b __start + nop + + /* + On MIPS Technologies boards + 0x1fc00010 address is reserved for BoardID + */ + .org 0x10 + .word 0xffffffff + .word 0xffffffff + +__start: + mips_disable_interrupts + + /* cpu specific setup ... */ + /* ... absent */ + + /* + * Load BAR registers of GT64120 as done by YAMON + * + * based on write_bootloader() in qemu.git/hw/mips/mips_malta.c + * see GT64120 manual and qemu.git/hw/mips/gt64xxx_pci.c for details + */ + + /* move GT64120 registers to 0x1be00000 */ + li t1, KSEG1ADDR(GT_DEF_BASE) + li t0, GT_LD(MIPS_GT_BASE) + sw t0, GT_ISD_OFS(t1) + + /* + * setup MEM-to-PCI0 mapping + */ + li t1, KSEG1ADDR(MIPS_GT_BASE) + + /* setup PCI0 io window */ + li t0, GT_LD(0x18000000) + sw t0, GT_PCI0IOLD_OFS(t1) + li t0, GT_HD(0x181fffff) + sw t0, GT_PCI0IOHD_OFS(t1) + + /* setup PCI0 mem windows */ + li t0, GT_LD(0x10000000) + sw t0, GT_PCI0M0LD_OFS(t1) + li t0, GT_HD(0x17efffff) + sw t0, GT_PCI0M0HD_OFS(t1) + + li t0, GT_LD(0x18200000) + sw t0, GT_PCI0M1LD_OFS(t1) + li t0, GT_LD(0x1bdfffff) + sw t0, GT_PCI0M1HD_OFS(t1) + +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..ded9867a8e 100644 --- a/arch/mips/boards/ritmix-rzx50/Makefile +++ b/arch/mips/boards/ritmix-rzx50/Makefile @@ -1 +1,2 @@ +lwl-y += lowlevel.o obj-y += serial.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 - * - * 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 -#include -#include - - .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 - * - * 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 - -#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..b669963ca6 --- /dev/null +++ b/arch/mips/boards/ritmix-rzx50/lowlevel.S @@ -0,0 +1,38 @@ +/* + * Startup Code for Ritmix RZX-50 board + * + * Copyright (C) 2013 Antony Pavlov + * + * 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_ritmix_rzx50 + +#include +#include +#include + +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/tplink-mr3020/Makefile b/arch/mips/boards/tplink-mr3020/Makefile index dcfc2937d3..092c31d6b2 100644 --- a/arch/mips/boards/tplink-mr3020/Makefile +++ b/arch/mips/boards/tplink-mr3020/Makefile @@ -1 +1,2 @@ +lwl-y += lowlevel.o obj-y += board.o diff --git a/arch/mips/boards/tplink-mr3020/include/board/board_pbl_start.h b/arch/mips/boards/tplink-mr3020/include/board/board_pbl_start.h deleted file mode 100644 index e70f55e873..0000000000 --- a/arch/mips/boards/tplink-mr3020/include/board/board_pbl_start.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013, 2015 Antony Pavlov - * Copyright (C) 2013 Oleksij Rempel - * - * 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 -#include -#include - - .macro board_pbl_start - .set push - .set noreorder - - mips_barebox_10h - - pbl_blt 0xbf000000 skip_pll_ram_config t8 - - hornet_mips24k_cp0_setup - - pbl_ar9331_wmac_enable - - hornet_1_1_war - - pbl_ar9331_pll - pbl_ar9331_ddr1_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 GPIO26 for the "WPS" LED and GPIO27 for the "3G" LED. - */ - pbl_ar9331_mdio_gpio_enable - - copy_to_link_location pbl_start - - .set pop - .endm diff --git a/arch/mips/boards/tplink-mr3020/lowlevel.S b/arch/mips/boards/tplink-mr3020/lowlevel.S new file mode 100644 index 0000000000..1efcbaa69a --- /dev/null +++ b/arch/mips/boards/tplink-mr3020/lowlevel.S @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2013, 2015 Antony Pavlov + * Copyright (C) 2013 Oleksij Rempel + * + * 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 +#include +#include +#include +#include + +ENTRY_FUNCTION(BOARD_PBL_START) + + mips_barebox_10h + + pbl_blt 0xbf000000 skip_pll_ram_config t8 + + hornet_mips24k_cp0_setup + + pbl_ar9331_wmac_enable + + hornet_1_1_war + + pbl_ar9331_pll + pbl_ar9331_ddr1_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 GPIO26 for the "WPS" LED and GPIO27 for the "3G" LED. + */ + pbl_ar9331_mdio_gpio_enable + +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..092c31d6b2 100644 --- a/arch/mips/boards/tplink-wdr4300/Makefile +++ b/arch/mips/boards/tplink-wdr4300/Makefile @@ -1 +1,2 @@ +lwl-y += lowlevel.o obj-y += board.o 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 - * - * 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 -#include -#include -#include -#include - - .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..9c4e6b7fad --- /dev/null +++ b/arch/mips/boards/tplink-wdr4300/lowlevel.S @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2017 Oleksij Rempel + * + * 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_wdr4300 + +#include +#include +#include +#include +#include +#include + +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 d59b247910..3d46e836f7 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -3,4 +3,4 @@ obj-y += main_entry.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/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 - * - * 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 -#include -#include - -#include -#include - - .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/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/ath79_defconfig b/arch/mips/configs/ath79_defconfig new file mode 100644 index 0000000000..781786bc52 --- /dev/null +++ b/arch/mips/configs/ath79_defconfig @@ -0,0 +1,84 @@ +CONFIG_MACH_MIPS_ATH79=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 +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_AR933X=y +CONFIG_DRIVER_NET_AG71XX=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_FS_TFTP=y +CONFIG_FS_NFS=y +CONFIG_DIGEST_SHA224_GENERIC=y +CONFIG_DIGEST_SHA256_GENERIC=y diff --git a/arch/mips/configs/bcm47xx_defconfig b/arch/mips/configs/bcm47xx_defconfig new file mode 100644 index 0000000000..04833ef2e0 --- /dev/null +++ b/arch/mips/configs/bcm47xx_defconfig @@ -0,0 +1,63 @@ +CONFIG_MACH_MIPS_BCM47XX=y +CONFIG_IMAGE_COMPRESSION_XZKERN=y +CONFIG_STACK_SIZE=0x7000 +CONFIG_EXPERIMENTAL=y +CONFIG_HUSH_FANCY_PROMPT=y +CONFIG_CMDLINE_EDITING=y +CONFIG_AUTO_COMPLETE=y +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 +CONFIG_CMD_MEMINFO=y +CONFIG_CMD_GO=y +CONFIG_CMD_LOADB=y +CONFIG_CMD_LOADY=y +CONFIG_CMD_RESET=y +CONFIG_CMD_PARTITION=y +CONFIG_CMD_EXPORT=y +CONFIG_CMD_LOADENV=y +CONFIG_CMD_PRINTENV=y +CONFIG_CMD_SAVEENV=y +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_PING=y +CONFIG_CMD_TFTP=y +CONFIG_CMD_ECHO_E=y +CONFIG_CMD_EDIT=y +CONFIG_CMD_LOGIN=y +CONFIG_CMD_MENU=y +CONFIG_CMD_MENU_MANAGEMENT=y +CONFIG_CMD_PASSWD=y +CONFIG_CMD_READLINE=y +CONFIG_CMD_TIMEOUT=y +CONFIG_CMD_CRC=y +CONFIG_CMD_CRC_CMP=y +CONFIG_CMD_MM=y +CONFIG_CMD_FLASH=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_RESOLV=y +CONFIG_OFDEVICE=y +CONFIG_OF_BAREBOX_DRIVERS=y +# CONFIG_SPI is not set +CONFIG_MTD=y +CONFIG_FS_CRAMFS=y +CONFIG_FS_TFTP=y +CONFIG_FS_FAT=y +CONFIG_FS_FAT_WRITE=y +CONFIG_FS_FAT_LFN=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/dlink-dir-320_defconfig b/arch/mips/configs/dlink-dir-320_defconfig deleted file mode 100644 index ff0638a8c6..0000000000 --- a/arch/mips/configs/dlink-dir-320_defconfig +++ /dev/null @@ -1,63 +0,0 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="dlink-dir-320" -CONFIG_MACH_MIPS_BCM47XX=y -CONFIG_STACK_SIZE=0x7000 -CONFIG_EXPERIMENTAL=y -CONFIG_HUSH_FANCY_PROMPT=y -CONFIG_CMDLINE_EDITING=y -CONFIG_AUTO_COMPLETE=y -CONFIG_MENU=y -CONFIG_BOOTM_SHOW_TYPE=y -CONFIG_PARTITION=y -# CONFIG_DEFAULT_ENVIRONMENT is not set -CONFIG_POLLER=y -CONFIG_LONGHELP=y -CONFIG_CMD_IOMEM=y -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_GO=y -CONFIG_CMD_LOADB=y -CONFIG_CMD_LOADY=y -CONFIG_CMD_RESET=y -CONFIG_CMD_PARTITION=y -CONFIG_CMD_EXPORT=y -CONFIG_CMD_LOADENV=y -CONFIG_CMD_PRINTENV=y -CONFIG_CMD_SAVEENV=y -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_PING=y -CONFIG_CMD_TFTP=y -CONFIG_CMD_ECHO_E=y -CONFIG_CMD_EDIT=y -CONFIG_CMD_LOGIN=y -CONFIG_CMD_MENU=y -CONFIG_CMD_MENU_MANAGEMENT=y -CONFIG_CMD_PASSWD=y -CONFIG_CMD_READLINE=y -CONFIG_CMD_TIMEOUT=y -CONFIG_CMD_CRC=y -CONFIG_CMD_CRC_CMP=y -CONFIG_CMD_MM=y -CONFIG_CMD_FLASH=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_RESOLV=y -CONFIG_OFDEVICE=y -CONFIG_OF_BAREBOX_DRIVERS=y -# CONFIG_SPI is not set -CONFIG_MTD=y -CONFIG_FS_CRAMFS=y -CONFIG_FS_TFTP=y -CONFIG_FS_FAT=y -CONFIG_FS_FAT_WRITE=y -CONFIG_FS_FAT_LFN=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/ritmix-rzx50_defconfig b/arch/mips/configs/ritmix-rzx50_defconfig deleted file mode 100644 index 3fb978a813..0000000000 --- a/arch/mips/configs/ritmix-rzx50_defconfig +++ /dev/null @@ -1,51 +0,0 @@ -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_BAUDRATE=57600 -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_DEBUG_LL=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_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_EDIT=y -CONFIG_CMD_GPIO=y -CONFIG_CMD_LED=y -CONFIG_CMD_POWEROFF=y -CONFIG_CMD_LED_TRIGGER=y -CONFIG_CMD_OF_NODE=y -CONFIG_CMD_OF_PROPERTY=y -CONFIG_CMD_OFTREE=y -CONFIG_OFDEVICE=y -# CONFIG_SPI is not set -CONFIG_LED=y -CONFIG_LED_GPIO=y -CONFIG_LED_GPIO_OF=y -CONFIG_LED_TRIGGERS=y -CONFIG_GPIO_JZ4740=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_JZ4740=y -CONFIG_DIGEST_SHA1_GENERIC=y -CONFIG_DIGEST_SHA224_GENERIC=y -CONFIG_DIGEST_SHA256_GENERIC=y diff --git a/arch/mips/configs/tplink-mr3020_defconfig b/arch/mips/configs/tplink-mr3020_defconfig deleted file mode 100644 index 4193bd628f..0000000000 --- a/arch/mips/configs/tplink-mr3020_defconfig +++ /dev/null @@ -1,81 +0,0 @@ -CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="tplink-mr3020" -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_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_AR933X=y -CONFIG_DRIVER_NET_AG71XX=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_FS_TFTP=y -CONFIG_FS_NFS=y -CONFIG_DIGEST_SHA224_GENERIC=y -CONFIG_DIGEST_SHA256_GENERIC=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/xburst_defconfig b/arch/mips/configs/xburst_defconfig new file mode 100644 index 0000000000..4305afc586 --- /dev/null +++ b/arch/mips/configs/xburst_defconfig @@ -0,0 +1,49 @@ +CONFIG_MACH_MIPS_XBURST=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 +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_LONGHELP=y +CONFIG_CMD_IOMEM=y +CONFIG_CMD_IMD=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_EDIT=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_LED=y +CONFIG_CMD_POWEROFF=y +CONFIG_CMD_LED_TRIGGER=y +CONFIG_CMD_OF_NODE=y +CONFIG_CMD_OF_PROPERTY=y +CONFIG_CMD_OFTREE=y +CONFIG_OFDEVICE=y +# CONFIG_SPI is not set +CONFIG_LED=y +CONFIG_LED_GPIO=y +CONFIG_LED_GPIO_OF=y +CONFIG_LED_TRIGGERS=y +CONFIG_GPIO_JZ4740=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_JZ4740=y +CONFIG_DIGEST_SHA1_GENERIC=y +CONFIG_DIGEST_SHA224_GENERIC=y +CONFIG_DIGEST_SHA256_GENERIC=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/mach-ar231x/include/mach/debug_ll.h b/arch/mips/mach-ar231x/include/mach/debug_ll.h index 5ab7f9a26a..ecec159169 100644 --- a/arch/mips/mach-ar231x/include/mach/debug_ll.h +++ b/arch/mips/mach-ar231x/include/mach/debug_ll.h @@ -21,7 +21,6 @@ /** @file * This File contains declaration for early output support */ -#include #include #endif /* __MACH_AR231X_DEBUG_LL__ */ diff --git a/arch/mips/mach-ath79/Kconfig b/arch/mips/mach-ath79/Kconfig index e4e10a2f65..3ea78b074a 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" @@ -50,6 +60,4 @@ config BOARD_BLACK_SWIFT select HAVE_IMAGE_COMPRESSION select HAS_NMON -endchoice - endif diff --git a/arch/mips/mach-ath79/include/mach/debug_ll.h b/arch/mips/mach-ath79/include/mach/debug_ll.h index 73d064a3a0..a49b6cf4ab 100644 --- a/arch/mips/mach-ath79/include/mach/debug_ll.h +++ b/arch/mips/mach-ath79/include/mach/debug_ll.h @@ -18,10 +18,18 @@ #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 -#elif defined(CONFIG_SOC_QCA_AR9344) +#elif defined CONFIG_DEBUG_AR9344_UART #include +#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..11088490d1 100644 --- a/arch/mips/mach-ath79/include/mach/debug_ll_ar9331.h +++ b/arch/mips/mach-ath79/include/mach/debug_ll_ar9331.h @@ -81,7 +81,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..359cf0d42b 100644 --- a/arch/mips/mach-ath79/include/mach/debug_ll_ar9344.h +++ b/arch/mips/mach-ath79/include/mach/debug_ll_ar9344.h @@ -19,8 +19,10 @@ #ifndef __AR9344_DEBUG_LL__ #define __AR9344_DEBUG_LL__ +#include #include #include +#include #define DEBUG_LL_UART_ADDR KSEG1ADDR(AR934X_UART0_BASE) #define DEBUG_LL_UART_SHIFT AR934X_UART0_SHIFT @@ -66,7 +68,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-bcm47xx/include/mach/debug_ll.h b/arch/mips/mach-bcm47xx/include/mach/debug_ll.h index 3e74e0f670..1e474e2d3b 100644 --- a/arch/mips/mach-bcm47xx/include/mach/debug_ll.h +++ b/arch/mips/mach-bcm47xx/include/mach/debug_ll.h @@ -21,7 +21,6 @@ #ifndef __INCLUDE_ARCH_DEBUG_LL_H__ #define __INCLUDE_ARCH_DEBUG_LL_H__ -#include #include #define DEBUG_LL_UART_SHIFT 0 diff --git a/arch/mips/mach-loongson/include/mach/debug_ll.h b/arch/mips/mach-loongson/include/mach/debug_ll.h index b999f5e019..1904fb940a 100644 --- a/arch/mips/mach-loongson/include/mach/debug_ll.h +++ b/arch/mips/mach-loongson/include/mach/debug_ll.h @@ -21,7 +21,6 @@ /** @file * This File contains declaration for early output support */ -#include #include #endif /* __MACH_LOONGSON_DEBUG_LL__ */ 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..a9cf8b3c19 100644 --- a/arch/mips/mach-malta/include/mach/debug_ll.h +++ b/arch/mips/mach-malta/include/mach/debug_ll.h @@ -21,7 +21,15 @@ #ifndef __MACH_MALTA_DEBUG_LL_H__ #define __MACH_MALTA_DEBUG_LL_H__ -#include +#include + +#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 #endif /* __MACH_MALTA_DEBUG_LL_H__ */ 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/include/mach/debug_ll.h b/arch/mips/mach-xburst/include/mach/debug_ll.h index 6c3c9804b5..a1ce17efdf 100644 --- a/arch/mips/mach-xburst/include/mach/debug_ll.h +++ b/arch/mips/mach-xburst/include/mach/debug_ll.h @@ -21,7 +21,19 @@ /** @file * This File contains declaration for early output support */ -#include + +#ifdef CONFIG_DEBUG_LL + +#ifdef CONFIG_DEBUG_JZ4750D_UART +#include +#elif defined CONFIG_DEBUG_JZ4780_UART +#include +#else +#error "unknown xburst debug uart soc type" +#endif + +#endif /* CONFIG_DEBUG_LL */ + #include #endif /* __MACH_XBURST_DEBUG_LL__ */ -- cgit v1.2.3