diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-01-19 09:26:42 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-01-19 09:26:42 +0100 |
commit | be1539b920302cfcde300f8e8607d548e1f75b8a (patch) | |
tree | b2b3315db903fb9e2ab46da5b6bf9ea7ab0c67b3 /arch/arm | |
parent | 6d6b90e1a6e2ea8ff8976eb1f1246e8fcc0babcf (diff) | |
parent | a3787cd1bb0b290de44c8e947db742057c71011b (diff) | |
download | barebox-be1539b920302cfcde300f8e8607d548e1f75b8a.tar.gz barebox-be1539b920302cfcde300f8e8607d548e1f75b8a.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'arch/arm')
20 files changed, 95 insertions, 179 deletions
diff --git a/arch/arm/boards/mnt-reform/board.c b/arch/arm/boards/mnt-reform/board.c index feb874c0a0..010690ecbd 100644 --- a/arch/arm/boards/mnt-reform/board.c +++ b/arch/arm/boards/mnt-reform/board.c @@ -5,6 +5,7 @@ #include <bootsource.h> #include <common.h> +#include <deep-probe.h> #include <init.h> #include <mach/bbu.h> @@ -31,6 +32,7 @@ static const struct of_device_id mnt_reform_of_match[] = { { .compatible = "mntre,reform2"}, { /* sentinel */ }, }; +BAREBOX_DEEP_PROBE_ENABLE(mnt_reform_of_match); static struct driver_d mnt_reform_board_driver = { .name = "board-mnt-reform", diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c index 6c5df6fd69..2684bd5ed7 100644 --- a/arch/arm/boards/raspberry-pi/rpi-common.c +++ b/arch/arm/boards/raspberry-pi/rpi-common.c @@ -374,7 +374,7 @@ static int rpi_console_clock_init(void) clk = clk_fixed("apb_pclk", 0); clk_register_clkdev(clk, "apb_pclk", NULL); - clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000); + clk = clk_fixed("uart0-pl0110", 48 * 1000 * 1000); clk_register_clkdev(clk, NULL, "uart0-pl0110"); clkdev_add_physbase(clk, BCM2835_PL011_BASE, NULL); clkdev_add_physbase(clk, BCM2836_PL011_BASE, NULL); diff --git a/arch/arm/configs/qemu_virt64_defconfig b/arch/arm/configs/qemu_virt64_defconfig index 57e715bf8d..3802ead279 100644 --- a/arch/arm/configs/qemu_virt64_defconfig +++ b/arch/arm/configs/qemu_virt64_defconfig @@ -1,8 +1,5 @@ CONFIG_ARCH_ARM64_VIRT=y -CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_ARM_PSCI_CLIENT=y -CONFIG_MMU=y -# CONFIG_MMU_EARLY is not set CONFIG_MALLOC_SIZE=0x0 CONFIG_KALLSYMS=y CONFIG_PROMPT="" diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index 9a35c51985..0b40754231 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c @@ -1,18 +1,5 @@ -/* - * Copyright - * (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.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. - * - */ +// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> #include <common.h> #include <init.h> diff --git a/arch/arm/mach-mvebu/common.c b/arch/arm/mach-mvebu/common.c index 5650c1ed87..ed0745c62a 100644 --- a/arch/arm/mach-mvebu/common.c +++ b/arch/arm/mach-mvebu/common.c @@ -1,19 +1,6 @@ -/* - * Copyright (C) 2013 - * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.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. - * - */ +// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +// SPDX-FileCopyrightText: 2013 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> #include <common.h> #include <init.h> diff --git a/arch/arm/mach-mvebu/dove.c b/arch/arm/mach-mvebu/dove.c index 3c6302dd2d..d085894d19 100644 --- a/arch/arm/mach-mvebu/dove.c +++ b/arch/arm/mach-mvebu/dove.c @@ -1,18 +1,5 @@ -/* - * Copyright - * (C) 2013 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.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. - * - */ +// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: 2013 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> #include <common.h> #include <init.h> diff --git a/arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h b/arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h index b972df151a..bed2239aa3 100644 --- a/arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h +++ b/arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h @@ -1,18 +1,5 @@ -/* - * Copyright - * (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.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. - * - */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* SPDX-FileCopyrightText: 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */ #ifndef __MACH_MVEBU_ARMADA_370_XP_REGS_H #define __MACH_MVEBU_ARMADA_370_XP_REGS_H diff --git a/arch/arm/mach-mvebu/include/mach/common.h b/arch/arm/mach-mvebu/include/mach/common.h index 8e15723fbe..81de0cbd79 100644 --- a/arch/arm/mach-mvebu/include/mach/common.h +++ b/arch/arm/mach-mvebu/include/mach/common.h @@ -1,19 +1,6 @@ -/* - * Copyright (C) 2013 - * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.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. - * - */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* SPDX-FileCopyrightText: 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */ +/* SPDX-FileCopyrightText: 2013 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> */ #ifndef __MACH_COMMON_H__ #define __MACH_COMMON_H__ diff --git a/arch/arm/mach-mvebu/include/mach/debug_ll.h b/arch/arm/mach-mvebu/include/mach/debug_ll.h index 1cf821ee2a..d213771573 100644 --- a/arch/arm/mach-mvebu/include/mach/debug_ll.h +++ b/arch/arm/mach-mvebu/include/mach/debug_ll.h @@ -1,18 +1,5 @@ -/* - * Copyright (C) 2013 - * Thomas Petazzoni <thomas.petazzoni@free-electrons.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. - * - */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* SPDX-FileCopyrightText: 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */ #ifndef __MACH_DEBUG_LL_H__ #define __MACH_DEBUG_LL_H__ diff --git a/arch/arm/mach-mvebu/include/mach/dove-regs.h b/arch/arm/mach-mvebu/include/mach/dove-regs.h index 8b4319bcab..a1335154be 100644 --- a/arch/arm/mach-mvebu/include/mach/dove-regs.h +++ b/arch/arm/mach-mvebu/include/mach/dove-regs.h @@ -1,18 +1,5 @@ -/* - * Copyright - * (C) 2013 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.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. - * - */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* SPDX-FileCopyrightText: 2013 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> */ #ifndef __MACH_MVEBU_DOVE_REGS_H #define __MACH_MVEBU_DOVE_REGS_H diff --git a/arch/arm/mach-mvebu/include/mach/kirkwood-regs.h b/arch/arm/mach-mvebu/include/mach/kirkwood-regs.h index 39fa37900b..5e21c4a587 100644 --- a/arch/arm/mach-mvebu/include/mach/kirkwood-regs.h +++ b/arch/arm/mach-mvebu/include/mach/kirkwood-regs.h @@ -1,18 +1,5 @@ -/* - * Copyright - * (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.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. - * - */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* SPDX-FileCopyrightText: 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */ #ifndef __MACH_MVEBU_KIRKWOOD_REGS_H #define __MACH_MVEBU_KIRKWOOD_REGS_H diff --git a/arch/arm/mach-mvebu/include/mach/lowlevel.h b/arch/arm/mach-mvebu/include/mach/lowlevel.h index 3e639fc1bd..08104b4b16 100644 --- a/arch/arm/mach-mvebu/include/mach/lowlevel.h +++ b/arch/arm/mach-mvebu/include/mach/lowlevel.h @@ -1,19 +1,6 @@ -/* - * Copyright (C) 2013 - * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.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. - * - */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* SPDX-FileCopyrightText: 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */ +/* SPDX-FileCopyrightText: 2013 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> */ #ifndef __MACH_LOWLEVEL_H__ #define __MACH_LOWLEVEL_H__ diff --git a/arch/arm/mach-mvebu/include/mach/socid.h b/arch/arm/mach-mvebu/include/mach/socid.h index 7a29c82b30..2fcccdc0f3 100644 --- a/arch/arm/mach-mvebu/include/mach/socid.h +++ b/arch/arm/mach-mvebu/include/mach/socid.h @@ -1,17 +1,6 @@ -/* - * Marvell MVEBU SoC Ids - * - * 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 */ + +/* Marvell MVEBU SoC Ids */ #ifndef __MACH_MVEBU_SOCID_H #define __MACH_MVEBU_SOCID_H diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c index e50d7501c8..d311058a61 100644 --- a/arch/arm/mach-mvebu/kirkwood.c +++ b/arch/arm/mach-mvebu/kirkwood.c @@ -1,17 +1,5 @@ -/* - * Copyright (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.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. - * - */ +// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> #include <common.h> #include <init.h> diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 5603fc12c3..98dc3a8dfd 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -4,30 +4,46 @@ menu "Rockchip Features" config ARCH_TEXT_BASE hex default 0x68000000 if ARCH_RK3188 - default 0x0 if ARCH_RK3288 + default 0x0 config RK_TIMER hex default 1 -config ARCH_RK3188 +config ARCH_ROCKCHIP_V7 bool select CPU_V7 select ARM_SMP_TWD select ARCH_HAS_L2X0 +config ARCH_RK3188 + bool + select ARCH_ROCKCHIP_V7 + config ARCH_RK3288 bool - select CPU_V7 - select ARM_SMP_TWD - select ARCH_HAS_L2X0 + select ARCH_ROCKCHIP_V7 select CLOCKSOURCE_ROCKCHIP -config ARCH_RK3568 +config ARCH_ROCKCHIP_V8 bool select CPU_V8 - select ARM_ATF select SYS_SUPPORTS_64BIT_KERNEL + select ARM_ATF + select RELOCATABLE + +config ARCH_RK3399 + bool + select ARCH_ROCKCHIP_V8 + select ARCH_HAS_RESET_CONTROLLER + +config ARCH_RK3399PRO + bool + select ARCH_RK3399 + +config ARCH_RK3568 + bool + select ARCH_ROCKCHIP_V8 comment "select Rockchip boards:" @@ -58,6 +74,13 @@ config MACH_PINE64_QUARTZ64 comment "select board features:" +config ARCH_RK3399_OPTEE + bool "Build rk3399 OP-TEE binary into barebox" + depends on ARCH_RK3399 + help + With this option enabled the RK3399 OP-TEE binary is compiled + into barebox and started along with the BL31 trusted firmware. + config ARCH_RK3568_OPTEE bool "Build rk3568 OP-TEE binary into barebox" depends on ARCH_RK3568 diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index 66bcdba2eb..2aa70210de 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -1,7 +1,7 @@ obj-y += rockchip.o -pbl-$(CONFIG_ARCH_RK3568) += atf.o +pbl-$(CONFIG_ARCH_ROCKCHIP_V8) += atf.o obj-$(CONFIG_ARCH_RK3188) += rk3188.o obj-$(CONFIG_ARCH_RK3288) += rk3288.o obj-pbl-$(CONFIG_ARCH_RK3568) += rk3568.o -obj-$(CONFIG_ARCH_RK3568) += bootm.o +obj-$(CONFIG_ARCH_ROCKCHIP_V8) += bootm.o obj-$(CONFIG_BAREBOX_UPDATE) += bbu.o diff --git a/arch/arm/mach-rockchip/atf.c b/arch/arm/mach-rockchip/atf.c index de22784489..0512ff99f4 100644 --- a/arch/arm/mach-rockchip/atf.c +++ b/arch/arm/mach-rockchip/atf.c @@ -60,6 +60,10 @@ static unsigned long load_elf64_image_phdr(const void *elf) SOC##_BAREBOX_LOAD_ADDRESS, (uintptr_t)fdt); \ } while (0) \ +void rk3399_atf_load_bl31(void *fdt) +{ + rockchip_atf_load_bl31(RK3399, rk3399_bl31_bin, rk3399_op_tee_bin, fdt); +} void rk3568_atf_load_bl31(void *fdt) { diff --git a/arch/arm/mach-rockchip/include/mach/atf.h b/arch/arm/mach-rockchip/include/mach/atf.h index 337a8261c8..b1d7a53dbf 100644 --- a/arch/arm/mach-rockchip/include/mach/atf.h +++ b/arch/arm/mach-rockchip/include/mach/atf.h @@ -2,17 +2,23 @@ #define __MACH_ATF_H /* First usable DRAM address. Lower mem is used for ATF and OP-TEE */ +#define RK3399_DRAM_BOTTOM 0xa00000 #define RK3568_DRAM_BOTTOM 0xa00000 /* OP-TEE expects to be loaded here */ +#define RK3399_OPTEE_LOAD_ADDRESS 0x200000 #define RK3568_OPTEE_LOAD_ADDRESS 0x200000 /* * board lowlevel code should relocate barebox here. This is where * OP-TEE jumps to after initialization. */ +#define RK3399_BAREBOX_LOAD_ADDRESS (RK3399_DRAM_BOTTOM + 1024*1024) #define RK3568_BAREBOX_LOAD_ADDRESS (RK3568_DRAM_BOTTOM + 1024*1024) +#ifndef __ASSEMBLY__ +void rk3399_atf_load_bl31(void *fdt); void rk3568_atf_load_bl31(void *fdt); +#endif #endif /* __MACH_ATF_H */ diff --git a/arch/arm/mach-rockchip/include/mach/debug_ll.h b/arch/arm/mach-rockchip/include/mach/debug_ll.h index af6257a674..80e8dcf552 100644 --- a/arch/arm/mach-rockchip/include/mach/debug_ll.h +++ b/arch/arm/mach-rockchip/include/mach/debug_ll.h @@ -6,6 +6,7 @@ #include <mach/rk3188-regs.h> #include <mach/rk3288-regs.h> #include <mach/rk3568-regs.h> +#include <mach/rk3399-regs.h> #ifdef CONFIG_DEBUG_LL @@ -30,6 +31,13 @@ #define serial_out(a, v) writel(v, a) #define serial_in(a) readl(a) +#elif defined CONFIG_DEBUG_ROCKCHIP_RK3399_UART + +#define UART_CLOCK 24000000 +#define RK_DEBUG_SOC RK3399 +#define serial_out(a, v) writel(v, a) +#define serial_in(a) readl(a) + #endif #define __RK_UART_BASE(soc, num) soc##_UART##num##_BASE diff --git a/arch/arm/mach-rockchip/include/mach/rk3399-regs.h b/arch/arm/mach-rockchip/include/mach/rk3399-regs.h new file mode 100644 index 0000000000..57033b6510 --- /dev/null +++ b/arch/arm/mach-rockchip/include/mach/rk3399-regs.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef __MACH_RK3399_REGS_H +#define __MACH_RK3399_REGS_H + +/* UART */ +#define RK3399_UART0_BASE 0xff180000 +#define RK3399_UART1_BASE 0xff190000 +#define RK3399_UART2_BASE 0xff1a0000 +#define RK3399_UART3_BASE 0xff1b0000 +#define RK3399_UART4_BASE 0xff370000 + +#define RK3399_IRAM_BASE 0xff8c0000 +#define RK3399_STIMER_BASE 0xff8680a0 + +#endif |