diff options
Diffstat (limited to 'board')
823 files changed, 5399 insertions, 1516 deletions
diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c index 36945bbdccf..192a2fa6327 100644 --- a/board/BuR/brppt1/board.c +++ b/board/BuR/brppt1/board.c @@ -9,7 +9,7 @@ * */ -#include <common.h> +#include <config.h> #include <bootcount.h> #include <env.h> #include <errno.h> diff --git a/board/BuR/brppt1/mux.c b/board/BuR/brppt1/mux.c index 5d2c7a201ea..8932b9ab3b1 100644 --- a/board/BuR/brppt1/mux.c +++ b/board/BuR/brppt1/mux.c @@ -8,7 +8,6 @@ * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> #include <asm/arch/mux.h> diff --git a/board/BuR/brppt2/board.c b/board/BuR/brppt2/board.c index ee006f0196c..105fac8912d 100644 --- a/board/BuR/brppt2/board.c +++ b/board/BuR/brppt2/board.c @@ -6,7 +6,6 @@ * B&R Industrial Automation GmbH - http://www.br-automation.com/ * */ -#include <common.h> #include <cpu_func.h> #include <hang.h> #include <init.h> diff --git a/board/BuR/brsmarc1/board.c b/board/BuR/brsmarc1/board.c index 738a5d2ff94..2d3f593d0ab 100644 --- a/board/BuR/brsmarc1/board.c +++ b/board/BuR/brsmarc1/board.c @@ -8,7 +8,6 @@ * B&R Industrial Automation GmbH - http://www.br-automation.com * */ -#include <common.h> #include <errno.h> #include <init.h> #include <spl.h> diff --git a/board/BuR/brsmarc1/mux.c b/board/BuR/brsmarc1/mux.c index 33c214d6b2a..b59d64f93ef 100644 --- a/board/BuR/brsmarc1/mux.c +++ b/board/BuR/brsmarc1/mux.c @@ -9,7 +9,6 @@ * */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> #include <asm/arch/mux.h> diff --git a/board/BuR/brxre1/board.c b/board/BuR/brxre1/board.c index a909104df4a..b9b595cb156 100644 --- a/board/BuR/brxre1/board.c +++ b/board/BuR/brxre1/board.c @@ -8,7 +8,6 @@ * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com * */ -#include <common.h> #include <env.h> #include <errno.h> #include <init.h> diff --git a/board/BuR/brxre1/mux.c b/board/BuR/brxre1/mux.c index 6c5ad891ba9..e2e8ec57678 100644 --- a/board/BuR/brxre1/mux.c +++ b/board/BuR/brxre1/mux.c @@ -8,7 +8,6 @@ * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> #include <asm/arch/mux.h> diff --git a/board/BuR/common/br_resetc.c b/board/BuR/common/br_resetc.c index 32f32b65e9d..f5d09fef3d3 100644 --- a/board/BuR/common/br_resetc.c +++ b/board/BuR/common/br_resetc.c @@ -5,7 +5,6 @@ * Copyright (C) 2019 Hannes Schmelzer <oe5hpm@oevsv.at> * B&R Industrial Automation GmbH - http://www.br-automation.com/ * */ -#include <common.h> #include <env.h> #include <errno.h> #include <i2c.h> diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index 3c78020bf93..8aff821cfe8 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -10,7 +10,6 @@ */ #include <log.h> #include <version.h> -#include <common.h> #include <env.h> #include <fdtdec.h> #include <i2c.h> diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c index ea49c7a99c0..cf5610861b5 100644 --- a/board/BuS/eb_cpu5282/eb_cpu5282.c +++ b/board/BuS/eb_cpu5282/eb_cpu5282.c @@ -7,7 +7,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <command.h> #include <asm/global_data.h> #include "asm/m5282.h" diff --git a/board/CZ.NIC/turris_mox/mox_sp.c b/board/CZ.NIC/turris_mox/mox_sp.c index 11d87564717..1591b40deee 100644 --- a/board/CZ.NIC/turris_mox/mox_sp.c +++ b/board/CZ.NIC/turris_mox/mox_sp.c @@ -3,7 +3,7 @@ * Copyright (C) 2018 Marek Behún <kabel@kernel.org> */ -#include <common.h> +#include <vsprintf.h> #include <asm/arch/soc.h> #include <asm/io.h> #include <linux/bitops.h> diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index 00114e6d915..e4ed7f25810 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -3,7 +3,7 @@ * Copyright (C) 2018 Marek Behún <kabel@kernel.org> */ -#include <common.h> +#include <config.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> #include <net.h> diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 3b7a71bdad2..4ee1a394b02 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -7,7 +7,7 @@ * Marvell/db-88f6820-gp by Stefan Roese <sr@denx.de> */ -#include <common.h> +#include <config.h> #include <env.h> #include <i2c.h> #include <init.h> diff --git a/board/LaCie/common/common.c b/board/LaCie/common/common.c index 52880a16fad..e8a7830fc05 100644 --- a/board/LaCie/common/common.c +++ b/board/LaCie/common/common.c @@ -3,7 +3,6 @@ * Copyright (C) 2011 Simon Guinot <sguinot@lacie.com> */ -#include <common.h> #include <i2c.h> #include <miiphy.h> diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c index 91709134000..083d91b696a 100644 --- a/board/LaCie/net2big_v2/net2big_v2.c +++ b/board/LaCie/net2big_v2/net2big_v2.c @@ -8,7 +8,7 @@ * Written-by: Prafulla Wadaskar <prafulla@marvell.com> */ -#include <common.h> +#include <config.h> #include <command.h> #include <env.h> #include <i2c.h> diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c index 22bb008745e..3a2fdb5c154 100644 --- a/board/LaCie/netspace_v2/netspace_v2.c +++ b/board/LaCie/netspace_v2/netspace_v2.c @@ -8,7 +8,6 @@ * Written-by: Prafulla Wadaskar <prafulla@marvell.com> */ -#include <common.h> #include <command.h> #include <env.h> #include <init.h> diff --git a/board/Marvell/db-88f6720/db-88f6720.c b/board/Marvell/db-88f6720/db-88f6720.c index 26c30647fbb..920421366f1 100644 --- a/board/Marvell/db-88f6720/db-88f6720.c +++ b/board/Marvell/db-88f6720/db-88f6720.c @@ -3,7 +3,6 @@ * Copyright (C) 2016 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <init.h> #include <miiphy.h> #include <net.h> diff --git a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c index 122c63d11f9..0f92cc385bc 100644 --- a/board/Marvell/db-88f6820-amc/db-88f6820-amc.c +++ b/board/Marvell/db-88f6820-amc/db-88f6820-amc.c @@ -3,7 +3,7 @@ * Copyright (C) 2015 Stefan Roese <sr@denx.de> */ -#include <common.h> +#include <config.h> #include <i2c.h> #include <init.h> #include <miiphy.h> diff --git a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c index 1edc1cb6515..8f8b2720107 100644 --- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c +++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c @@ -3,7 +3,7 @@ * Copyright (C) 2015 Stefan Roese <sr@denx.de> */ -#include <common.h> +#include <config.h> #include <i2c.h> #include <init.h> #include <miiphy.h> diff --git a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c index 9e1fdecfca4..6bca1f91a0a 100644 --- a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c +++ b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c @@ -3,7 +3,6 @@ * Copyright (C) 2014 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <init.h> #include <miiphy.h> #include <net.h> diff --git a/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c b/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c index 0abdca1cd21..a7a84798a53 100644 --- a/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c +++ b/board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c @@ -3,7 +3,6 @@ * Copyright (C) 2015 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <i2c.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/Marvell/dreamplug/dreamplug.c b/board/Marvell/dreamplug/dreamplug.c index d15faa1cb7f..38127506131 100644 --- a/board/Marvell/dreamplug/dreamplug.c +++ b/board/Marvell/dreamplug/dreamplug.c @@ -8,7 +8,6 @@ * Written-by: Siddarth Gore <gores@marvell.com> */ -#include <common.h> #include <init.h> #include <netdev.h> #include <asm/arch/cpu.h> diff --git a/board/Marvell/guruplug/guruplug.c b/board/Marvell/guruplug/guruplug.c index ea87ded222e..7c3cea22b93 100644 --- a/board/Marvell/guruplug/guruplug.c +++ b/board/Marvell/guruplug/guruplug.c @@ -5,7 +5,6 @@ * Written-by: Siddarth Gore <gores@marvell.com> */ -#include <common.h> #include <init.h> #include <miiphy.h> #include <net.h> diff --git a/board/Marvell/mvebu_alleycat-5/board.c b/board/Marvell/mvebu_alleycat-5/board.c index 0c4f8e03b85..c1b7cc3b613 100644 --- a/board/Marvell/mvebu_alleycat-5/board.c +++ b/board/Marvell/mvebu_alleycat-5/board.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> +#include <config.h> #include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c index 1685b12b847..df3fb6d2164 100644 --- a/board/Marvell/mvebu_armada-37xx/board.c +++ b/board/Marvell/mvebu_armada-37xx/board.c @@ -3,7 +3,7 @@ * Copyright (C) 2016 Stefan Roese <sr@denx.de> */ -#include <common.h> +#include <config.h> #include <dm.h> #include <dm/device-internal.h> #include <env.h> diff --git a/board/Marvell/mvebu_armada-8k/board.c b/board/Marvell/mvebu_armada-8k/board.c index a8899af6e5a..6d704211742 100644 --- a/board/Marvell/mvebu_armada-8k/board.c +++ b/board/Marvell/mvebu_armada-8k/board.c @@ -3,7 +3,7 @@ * Copyright (C) 2016 Stefan Roese <sr@denx.de> */ -#include <common.h> +#include <config.h> #include <dm.h> #include <i2c.h> #include <init.h> diff --git a/board/Marvell/octeon_nic23/board.c b/board/Marvell/octeon_nic23/board.c index bc9332cb74a..cf20c97684a 100644 --- a/board/Marvell/octeon_nic23/board.c +++ b/board/Marvell/octeon_nic23/board.c @@ -249,7 +249,7 @@ void board_configure_qlms(void) * read the incorrect device ID 0x9700 (reset value) instead of 0x9702 * (restored value). */ -static void octeon_board_restore_pf(void *ctx) +static void octeon_board_restore_pf(struct cyclic_info *c) { union cvmx_spemx_flr_pf_stopreq stopreq; static bool start_initialized[2] = {false, false}; @@ -357,10 +357,13 @@ int board_late_init(void) board_configure_qlms(); /* Register cyclic function for PCIe FLR fixup */ - cyclic = cyclic_register(octeon_board_restore_pf, 100, - "pcie_flr_fix", NULL); - if (!cyclic) + cyclic = calloc(1, sizeof(*cyclic)); + if (cyclic) { + cyclic_register(cyclic, octeon_board_restore_pf, 100, + "pcie_flr_fix"); + } else { printf("Registering of cyclic function failed\n"); + } return 0; } diff --git a/board/Marvell/octeontx2/soc-utils.c b/board/Marvell/octeontx2/soc-utils.c index 43a19a90717..64eb95f3b40 100644 --- a/board/Marvell/octeontx2/soc-utils.c +++ b/board/Marvell/octeontx2/soc-utils.c @@ -5,7 +5,6 @@ * https://spdx.org/licenses */ -#include <common.h> #include <dm.h> #include <malloc.h> #include <errno.h> diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c index 581e2e084d6..dda56a582b3 100644 --- a/board/Marvell/openrd/openrd.c +++ b/board/Marvell/openrd/openrd.c @@ -10,7 +10,6 @@ * Written-by: Prafulla Wadaskar <prafulla@marvell.com> */ -#include <common.h> #include <init.h> #include <miiphy.h> #include <net.h> diff --git a/board/Marvell/sheevaplug/sheevaplug.c b/board/Marvell/sheevaplug/sheevaplug.c index 26ee39ef77f..23e761d5feb 100644 --- a/board/Marvell/sheevaplug/sheevaplug.c +++ b/board/Marvell/sheevaplug/sheevaplug.c @@ -6,7 +6,6 @@ * Written-by: Prafulla Wadaskar <prafulla@marvell.com> */ -#include <common.h> #include <init.h> #include <netdev.h> #include <asm/global_data.h> diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c index d72e3ef24ee..e6ec00a9c6c 100644 --- a/board/Seagate/dockstar/dockstar.c +++ b/board/Seagate/dockstar/dockstar.c @@ -9,7 +9,6 @@ * Marvell Semiconductor <www.marvell.com> */ -#include <common.h> #include <bootstage.h> #include <init.h> #include <netdev.h> diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c index caea89c10e0..b2d0ad8c3f2 100644 --- a/board/Seagate/goflexhome/goflexhome.c +++ b/board/Seagate/goflexhome/goflexhome.c @@ -12,7 +12,6 @@ * Marvell Semiconductor <www.marvell.com> */ -#include <common.h> #include <bootstage.h> #include <init.h> #include <netdev.h> diff --git a/board/Seagate/nas220/nas220.c b/board/Seagate/nas220/nas220.c index cd2bbdad1cd..fa7553250d1 100644 --- a/board/Seagate/nas220/nas220.c +++ b/board/Seagate/nas220/nas220.c @@ -8,7 +8,6 @@ * Marvell Semiconductor <www.marvell.com> */ -#include <common.h> #include <init.h> #include <miiphy.h> #include <net.h> diff --git a/board/Synology/common/legacy.c b/board/Synology/common/legacy.c index a0bace7b46c..2e3aa660eaa 100644 --- a/board/Synology/common/legacy.c +++ b/board/Synology/common/legacy.c @@ -6,6 +6,7 @@ */ #include <config.h> +#include <stdio.h> #include <vsprintf.h> #include <env.h> #include <net.h> diff --git a/board/Synology/ds109/ds109.c b/board/Synology/ds109/ds109.c index 5c3f46e23f4..4f397578182 100644 --- a/board/Synology/ds109/ds109.c +++ b/board/Synology/ds109/ds109.c @@ -5,7 +5,7 @@ * Luka Perkov <luka@openwrt.org> */ -#include <common.h> +#include <config.h> #include <init.h> #include <miiphy.h> #include <net.h> diff --git a/board/Synology/ds414/cmd_syno.c b/board/Synology/ds414/cmd_syno.c index a62658a2eb6..29ea35e5e91 100644 --- a/board/Synology/ds414/cmd_syno.c +++ b/board/Synology/ds414/cmd_syno.c @@ -5,7 +5,6 @@ * Copyright (C) 2015 Phil Sutter <phil@nwl.cc> */ -#include <common.h> #include <command.h> #include <div64.h> #include <env.h> diff --git a/board/Synology/ds414/ds414.c b/board/Synology/ds414/ds414.c index abe6f9eb5e2..8db810ad3eb 100644 --- a/board/Synology/ds414/ds414.c +++ b/board/Synology/ds414/ds414.c @@ -4,7 +4,6 @@ * Copyright (C) 2015 Phil Sutter <phil@nwl.cc> */ -#include <common.h> #include <init.h> #include <miiphy.h> #include <asm/global_data.h> diff --git a/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c b/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c index d87fe3606f6..070933fb54b 100644 --- a/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c +++ b/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c @@ -4,7 +4,6 @@ * Copyright 2022 Linaro */ -#include <common.h> #include <dwc3-uboot.h> #include <efi.h> #include <efi_loader.h> diff --git a/board/advantech/imx8mp_rsb3720a1/spl.c b/board/advantech/imx8mp_rsb3720a1/spl.c index f4257bc993d..1f7c1f25adc 100644 --- a/board/advantech/imx8mp_rsb3720a1/spl.c +++ b/board/advantech/imx8mp_rsb3720a1/spl.c @@ -4,7 +4,7 @@ * Copyright 2022 Linaro */ -#include <common.h> +#include <config.h> #include <command.h> #include <cpu_func.h> #include <errno.h> diff --git a/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c b/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c index 56b7bdb57c9..50b35db5f6c 100644 --- a/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c +++ b/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c @@ -4,7 +4,6 @@ * Copyright 2019-2023 Kococonnector GmbH */ -#include <common.h> #include <errno.h> #include <linux/libfdt.h> #include <asm/io.h> diff --git a/board/advantech/imx8qm_dmsse20_a1/spl.c b/board/advantech/imx8qm_dmsse20_a1/spl.c index e8959ede51d..93cf0744002 100644 --- a/board/advantech/imx8qm_dmsse20_a1/spl.c +++ b/board/advantech/imx8qm_dmsse20_a1/spl.c @@ -3,7 +3,7 @@ * Copyright 2017-2018 NXP * Copyright 2019-2023 Kococonnector GmbH */ -#include <common.h> +#include <config.h> #include <dm.h> #include <spl.h> #include <init.h> diff --git a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c index 7f766a688bb..3def182f296 100644 --- a/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c +++ b/board/advantech/imx8qm_rom7720_a1/imx8qm_rom7720_a1.c @@ -4,7 +4,6 @@ * Copyright (C) 2019 Oliver Graute <oliver.graute@kococonnector.com> */ -#include <common.h> #include <cpu_func.h> #include <env.h> #include <errno.h> diff --git a/board/advantech/imx8qm_rom7720_a1/spl.c b/board/advantech/imx8qm_rom7720_a1/spl.c index d32400101fc..5863e335a8b 100644 --- a/board/advantech/imx8qm_rom7720_a1/spl.c +++ b/board/advantech/imx8qm_rom7720_a1/spl.c @@ -2,7 +2,7 @@ /* * Copyright 2017-2018 NXP */ -#include <common.h> +#include <config.h> #include <dm.h> #include <image.h> #include <init.h> diff --git a/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c b/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c index 8499fc541fa..9bbd5fd291a 100644 --- a/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c +++ b/board/advantech/som-db5800-som-6867/som-db5800-som-6867.c @@ -4,7 +4,6 @@ * Copyright (C) 2016 George McCollister <george.mccollister@gmail.com> */ -#include <common.h> #include <init.h> #include <asm/fsp1/fsp_support.h> diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c index e0a7f3fa89f..5e6d6c6234f 100644 --- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c +++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c @@ -4,7 +4,6 @@ * Allied Telesis <www.alliedtelesis.com> */ -#include <common.h> #include <init.h> #include <net.h> #include <asm/global_data.h> diff --git a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c index 52b8eba92fc..f30821c1796 100644 --- a/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c +++ b/board/alliedtelesis/SBx81LIFXCAT/sbx81lifxcat.c @@ -4,7 +4,6 @@ * Allied Telesis <www.alliedtelesis.com> */ -#include <common.h> #include <init.h> #include <miiphy.h> #include <net.h> diff --git a/board/alliedtelesis/common/gpio_hog.c b/board/alliedtelesis/common/gpio_hog.c index 4aecf7e2cef..7da70fb4f7d 100644 --- a/board/alliedtelesis/common/gpio_hog.c +++ b/board/alliedtelesis/common/gpio_hog.c @@ -3,7 +3,6 @@ * Copyright (C) 2018 Allied Telesis Labs */ -#include <common.h> #include <dm.h> #include <asm/global_data.h> #include <asm/gpio.h> diff --git a/board/alliedtelesis/x240/x240.c b/board/alliedtelesis/x240/x240.c index 0c4f8e03b85..c1b7cc3b613 100644 --- a/board/alliedtelesis/x240/x240.c +++ b/board/alliedtelesis/x240/x240.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> +#include <config.h> #include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/board/alliedtelesis/x530/x530.c b/board/alliedtelesis/x530/x530.c index 80ad62c2c66..65e6d48db0a 100644 --- a/board/alliedtelesis/x530/x530.c +++ b/board/alliedtelesis/x530/x530.c @@ -3,7 +3,7 @@ * Copyright (C) 2017 Allied Telesis Labs */ -#include <common.h> +#include <config.h> #include <command.h> #include <dm.h> #include <env.h> diff --git a/board/amarula/vyasa-rk3288/vyasa-rk3288.c b/board/amarula/vyasa-rk3288/vyasa-rk3288.c index 92e0698c534..b220256c67f 100644 --- a/board/amarula/vyasa-rk3288/vyasa-rk3288.c +++ b/board/amarula/vyasa-rk3288/vyasa-rk3288.c @@ -3,7 +3,6 @@ * Copyright (C) 2017 Amarula Solutions */ -#include <common.h> #include <serial.h> #ifndef CONFIG_TPL_BUILD diff --git a/board/amd/common b/board/amd/common new file mode 120000 index 00000000000..cd4d172974b --- /dev/null +++ b/board/amd/common @@ -0,0 +1 @@ +../xilinx/common/
\ No newline at end of file diff --git a/board/amd/versal2/Kconfig b/board/amd/versal2/Kconfig new file mode 100644 index 00000000000..ab46af6935e --- /dev/null +++ b/board/amd/versal2/Kconfig @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (C) 2020 - 2022, Xilinx, Inc. +# Copyright (C) 2022 - 2024, Advanced Micro Devices, Inc. +# +if ARCH_VERSAL2 + +config CMD_VERSAL2 + bool "Enable Versal Gen 2 specific commands" + default y + depends on ZYNQMP_FIRMWARE + help + Select this to enable AMD Versal Gen 2 specific commands. + Commands like versal2 loadpdi are enabled by this. + +endif diff --git a/board/amd/versal2/MAINTAINERS b/board/amd/versal2/MAINTAINERS new file mode 100644 index 00000000000..af7913d8db3 --- /dev/null +++ b/board/amd/versal2/MAINTAINERS @@ -0,0 +1,7 @@ +XILINX_VERSAL2 BOARDS +M: Michal Simek <michal.simek@amd.com> +S: Maintained +T: git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git +F: arch/arm/dts/versal2* +F: board/amd/ +F: configs/amd* diff --git a/board/amd/versal2/Makefile b/board/amd/versal2/Makefile new file mode 100644 index 00000000000..3a044517f0c --- /dev/null +++ b/board/amd/versal2/Makefile @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (C) 2021 - 2022, Xilinx, Inc. +# Copyright (C) 2022 - 2024, Advanced Micro Devices, Inc. +# +# Michal Simek <michal.simek@amd.com> +# + +obj-y := board.o + +obj-$(CONFIG_CMD_VERSAL2) += cmds.o diff --git a/board/amd/versal2/board.c b/board/amd/versal2/board.c new file mode 100644 index 00000000000..5651d516a9e --- /dev/null +++ b/board/amd/versal2/board.c @@ -0,0 +1,343 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2021 - 2022, Xilinx, Inc. + * Copyright (C) 2022 - 2024, Advanced Micro Devices, Inc. + * + * Michal Simek <michal.simek@amd.com> + */ + +#include <cpu_func.h> +#include <fdtdec.h> +#include <init.h> +#include <env_internal.h> +#include <log.h> +#include <malloc.h> +#include <time.h> +#include <asm/cache.h> +#include <asm/global_data.h> +#include <asm/io.h> +#include <asm/arch/hardware.h> +#include <asm/arch/sys_proto.h> +#include <dm/device.h> +#include <dm/uclass.h> +#include "../../xilinx/common/board.h" + +#include <linux/bitfield.h> +#include <debug_uart.h> +#include <generated/dt.h> + +DECLARE_GLOBAL_DATA_PTR; + +int board_init(void) +{ + printf("EL Level:\tEL%d\n", current_el()); + + return 0; +} + +static u32 platform_id, platform_version; + +char *soc_name_decode(void) +{ + char *name, *platform_name; + + switch (platform_id) { + case VERSAL2_SPP: + platform_name = "spp"; + break; + case VERSAL2_EMU: + platform_name = "emu"; + break; + case VERSAL2_SPP_MMD: + platform_name = "spp-mmd"; + break; + case VERSAL2_EMU_MMD: + platform_name = "emu-mmd"; + break; + case VERSAL2_QEMU: + platform_name = "qemu"; + break; + default: + return NULL; + } + + /* + * --rev. are 6 chars + * max platform name is qemu which is 4 chars + * platform version number are 1+1 + * Plus 1 char for \n + */ + name = calloc(1, strlen(CONFIG_SYS_BOARD) + 13); + if (!name) + return NULL; + + sprintf(name, "%s-%s-rev%d.%d-el%d", CONFIG_SYS_BOARD, + platform_name, platform_version / 10, + platform_version % 10, current_el()); + + return name; +} + +bool soc_detection(void) +{ + u32 version, ps_version; + + version = readl(PMC_TAP_VERSION); + platform_id = FIELD_GET(PLATFORM_MASK, version); + ps_version = FIELD_GET(PS_VERSION_MASK, version); + + debug("idcode %x, version %x, usercode %x\n", + readl(PMC_TAP_IDCODE), version, + readl(PMC_TAP_USERCODE)); + + debug("pmc_ver %lx, ps version %x, rtl version %lx\n", + FIELD_GET(PMC_VERSION_MASK, version), + ps_version, + FIELD_GET(RTL_VERSION_MASK, version)); + + platform_version = FIELD_GET(PLATFORM_VERSION_MASK, version); + + debug("Platform id: %d version: %d.%d\n", platform_id, + platform_version / 10, platform_version % 10); + + return true; +} + +int board_early_init_r(void) +{ + u32 val; + + if (current_el() != 3) + return 0; + + debug("iou_switch ctrl div0 %x\n", + readl(&crlapb_base->iou_switch_ctrl)); + + writel(IOU_SWITCH_CTRL_CLKACT_BIT | + (CONFIG_IOU_SWITCH_DIVISOR0 << IOU_SWITCH_CTRL_DIVISOR0_SHIFT), + &crlapb_base->iou_switch_ctrl); + + /* Global timer init - Program time stamp reference clk */ + val = readl(&crlapb_base->timestamp_ref_ctrl); + val |= CRL_APB_TIMESTAMP_REF_CTRL_CLKACT_BIT; + writel(val, &crlapb_base->timestamp_ref_ctrl); + + debug("ref ctrl 0x%x\n", + readl(&crlapb_base->timestamp_ref_ctrl)); + + /* Clear reset of timestamp reg */ + writel(0, &crlapb_base->rst_timestamp); + + /* + * Program freq register in System counter and + * enable system counter. + */ + writel(CONFIG_COUNTER_FREQUENCY, + &iou_scntr_secure->base_frequency_id_register); + + debug("counter val 0x%x\n", + readl(&iou_scntr_secure->base_frequency_id_register)); + + writel(IOU_SCNTRS_CONTROL_EN, + &iou_scntr_secure->counter_control_register); + + debug("scntrs control 0x%x\n", + readl(&iou_scntr_secure->counter_control_register)); + debug("timer 0x%llx\n", get_ticks()); + debug("timer 0x%llx\n", get_ticks()); + + return 0; +} + +static u8 versal_net_get_bootmode(void) +{ + u8 bootmode; + u32 reg = 0; + + reg = readl(&crp_base->boot_mode_usr); + + if (reg >> BOOT_MODE_ALT_SHIFT) + reg >>= BOOT_MODE_ALT_SHIFT; + + bootmode = reg & BOOT_MODES_MASK; + + return bootmode; +} + +static int boot_targets_setup(void) +{ + u8 bootmode; + struct udevice *dev; + int bootseq = -1; + int bootseq_len = 0; + int env_targets_len = 0; + const char *mode = NULL; + char *new_targets; + char *env_targets; + + bootmode = versal_net_get_bootmode(); + + puts("Bootmode: "); + switch (bootmode) { + case USB_MODE: + puts("USB_MODE\n"); + mode = "usb_dfu0 usb_dfu1"; + break; + case JTAG_MODE: + puts("JTAG_MODE\n"); + mode = "jtag pxe dhcp"; + break; + case QSPI_MODE_24BIT: + puts("QSPI_MODE_24\n"); + if (uclass_get_device_by_name(UCLASS_SPI, + "spi@f1030000", &dev)) { + debug("QSPI driver for QSPI device is not present\n"); + break; + } + mode = "xspi"; + bootseq = dev_seq(dev); + break; + case QSPI_MODE_32BIT: + puts("QSPI_MODE_32\n"); + if (uclass_get_device_by_name(UCLASS_SPI, + "spi@f1030000", &dev)) { + debug("QSPI driver for QSPI device is not present\n"); + break; + } + mode = "xspi"; + bootseq = dev_seq(dev); + break; + case OSPI_MODE: + puts("OSPI_MODE\n"); + if (uclass_get_device_by_name(UCLASS_SPI, + "spi@f1010000", &dev)) { + debug("OSPI driver for OSPI device is not present\n"); + break; + } + mode = "xspi"; + bootseq = dev_seq(dev); + break; + case EMMC_MODE: + puts("EMMC_MODE\n"); + mode = "mmc"; + bootseq = dev_seq(dev); + break; + case SELECTMAP_MODE: + puts("SELECTMAP_MODE\n"); + break; + case SD_MODE: + puts("SD_MODE\n"); + if (uclass_get_device_by_name(UCLASS_MMC, + "mmc@f1040000", &dev)) { + debug("SD0 driver for SD0 device is not present\n"); + break; + } + debug("mmc0 device found at %p, seq %d\n", dev, dev_seq(dev)); + + mode = "mmc"; + bootseq = dev_seq(dev); + break; + case SD1_LSHFT_MODE: + puts("LVL_SHFT_"); + fallthrough; + case SD_MODE1: + puts("SD_MODE1\n"); + if (uclass_get_device_by_name(UCLASS_MMC, + "mmc@f1050000", &dev)) { + debug("SD1 driver for SD1 device is not present\n"); + break; + } + debug("mmc1 device found at %p, seq %d\n", dev, dev_seq(dev)); + + mode = "mmc"; + bootseq = dev_seq(dev); + break; + default: + printf("Invalid Boot Mode:0x%x\n", bootmode); + break; + } + + if (mode) { + if (bootseq >= 0) { + bootseq_len = snprintf(NULL, 0, "%i", bootseq); + debug("Bootseq len: %x\n", bootseq_len); + } + + /* + * One terminating char + one byte for space between mode + * and default boot_targets + */ + env_targets = env_get("boot_targets"); + if (env_targets) + env_targets_len = strlen(env_targets); + + new_targets = calloc(1, strlen(mode) + env_targets_len + 2 + + bootseq_len); + if (!new_targets) + return -ENOMEM; + + if (bootseq >= 0) + sprintf(new_targets, "%s%x %s", mode, bootseq, + env_targets ? env_targets : ""); + else + sprintf(new_targets, "%s %s", mode, + env_targets ? env_targets : ""); + + env_set("boot_targets", new_targets); + } + + return 0; +} + +int board_late_init(void) +{ + int ret; + + if (!(gd->flags & GD_FLG_ENV_DEFAULT)) { + debug("Saved variables - Skipping\n"); + return 0; + } + + if (!IS_ENABLED(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)) + return 0; + + if (IS_ENABLED(CONFIG_DISTRO_DEFAULTS)) { + ret = boot_targets_setup(); + if (ret) + return ret; + } + + return board_late_init_xilinx(); +} + +int dram_init_banksize(void) +{ + int ret; + + ret = fdtdec_setup_memory_banksize(); + if (ret) + return ret; + + mem_map_fill(); + + return 0; +} + +int dram_init(void) +{ + int ret; + + if (IS_ENABLED(CONFIG_SYS_MEM_RSVD_FOR_MMU)) + ret = fdtdec_setup_mem_size_base(); + else + ret = fdtdec_setup_mem_size_base_lowest(); + + if (ret) + return -EINVAL; + + return 0; +} + +void reset_cpu(void) +{ +} diff --git a/board/amd/versal2/cmds.c b/board/amd/versal2/cmds.c new file mode 100644 index 00000000000..56ae39bc6a1 --- /dev/null +++ b/board/amd/versal2/cmds.c @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2024, Advanced Micro Devices, Inc. + * + * Michal Simek <michal.simek@amd.com> + */ + +#include <cpu_func.h> +#include <command.h> +#include <log.h> +#include <memalign.h> +#include <versalpl.h> +#include <vsprintf.h> +#include <zynqmp_firmware.h> + +/** + * do_versal2_load_pdi - Handle the "versal2 load pdi" command-line command + * @cmdtp: Command data struct pointer + * @flag: Command flag + * @argc: Command-line argument count + * @argv: Array of command-line arguments + * + * Processes the versal2 load pdi command + * + * Return: return 0 on success, Error value if command fails. + * CMD_RET_USAGE incase of incorrect/missing parameters. + */ +static int do_versal2_load_pdi(struct cmd_tbl *cmdtp, int flag, int argc, + char * const argv[]) +{ + u32 buf_lo, buf_hi; + u32 ret_payload[PAYLOAD_ARG_CNT]; + ulong addr, *pdi_buf; + size_t len; + int ret; + + if (argc != cmdtp->maxargs) { + debug("pdi_load: incorrect parameters passed\n"); + return CMD_RET_USAGE; + } + + addr = simple_strtol(argv[1], NULL, 16); + if (!addr) { + debug("pdi_load: zero pdi_data address\n"); + return CMD_RET_USAGE; + } + + len = hextoul(argv[2], NULL); + if (!len) { + debug("pdi_load: zero size\n"); + return CMD_RET_USAGE; + } + + pdi_buf = (ulong *)ALIGN((ulong)addr, ARCH_DMA_MINALIGN); + if ((ulong)addr != (ulong)pdi_buf) { + memcpy((void *)pdi_buf, (void *)addr, len); + debug("Pdi addr:0x%lx aligned to 0x%lx\n", + addr, (ulong)pdi_buf); + } + + flush_dcache_range((ulong)pdi_buf, (ulong)pdi_buf + len); + + buf_lo = lower_32_bits((ulong)pdi_buf); + buf_hi = upper_32_bits((ulong)pdi_buf); + + ret = xilinx_pm_request(VERSAL_PM_LOAD_PDI, VERSAL_PM_PDI_TYPE, buf_lo, + buf_hi, 0, ret_payload); + if (ret) + printf("PDI load failed with err: 0x%08x\n", ret); + + return cmd_process_error(cmdtp, ret); +} + +U_BOOT_LONGHELP(versal2, + "loadpdi addr len - Load pdi image\n" + "load pdi image at ddr address 'addr' with pdi image size 'len'\n"); + +U_BOOT_CMD_WITH_SUBCMDS(versal2, "Versal Gen 2 sub-system", versal2_help_text, + U_BOOT_SUBCMD_MKENT(loadpdi, 3, 1, + do_versal2_load_pdi)); diff --git a/board/amlogic/beelink-s922x/beelink-s922x.c b/board/amlogic/beelink-s922x/beelink-s922x.c index c2776310a3d..ccb2f7d1bb1 100644 --- a/board/amlogic/beelink-s922x/beelink-s922x.c +++ b/board/amlogic/beelink-s922x/beelink-s922x.c @@ -4,7 +4,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/amlogic/jethub-j100/jethub-j100.c b/board/amlogic/jethub-j100/jethub-j100.c index 010fc0df7d1..b770a1f8c53 100644 --- a/board/amlogic/jethub-j100/jethub-j100.c +++ b/board/amlogic/jethub-j100/jethub-j100.c @@ -4,7 +4,6 @@ * Author: Vyacheslav Bocharov <adeep@lexina.in> */ -#include <common.h> #include <dm.h> #include <init.h> #include <net.h> diff --git a/board/amlogic/jethub-j80/jethub-j80.c b/board/amlogic/jethub-j80/jethub-j80.c index 0b781666e98..07a08dcd170 100644 --- a/board/amlogic/jethub-j80/jethub-j80.c +++ b/board/amlogic/jethub-j80/jethub-j80.c @@ -6,7 +6,6 @@ * */ -#include <common.h> #include <dm.h> #include <adc.h> #include <env.h> diff --git a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c index bbd23e20fcd..8f3f2045d74 100644 --- a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c +++ b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c @@ -3,7 +3,7 @@ * Copyright (C) 2023 Neil Armstrong <neil.armstrong@linaro.org> */ -#include <common.h> +#include <log.h> #include <asm/arch/boot.h> #include <power/regulator.h> diff --git a/board/amlogic/odroid-n2/odroid-n2.c b/board/amlogic/odroid-n2/odroid-n2.c index a4bcc62174a..ae953d0e4ba 100644 --- a/board/amlogic/odroid-n2/odroid-n2.c +++ b/board/amlogic/odroid-n2/odroid-n2.c @@ -4,7 +4,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <adc.h> #include <env.h> diff --git a/board/amlogic/p200/p200.c b/board/amlogic/p200/p200.c index 754242e4a9f..3bede46b324 100644 --- a/board/amlogic/p200/p200.c +++ b/board/amlogic/p200/p200.c @@ -3,7 +3,6 @@ * (C) Copyright 2016 Beniamino Galvani <b.galvani@gmail.com> */ -#include <common.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/amlogic/p201/p201.c b/board/amlogic/p201/p201.c index 769e2735d27..d44ebae07dd 100644 --- a/board/amlogic/p201/p201.c +++ b/board/amlogic/p201/p201.c @@ -3,7 +3,6 @@ * (C) Copyright 2016 Beniamino Galvani <b.galvani@gmail.com> */ -#include <common.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/amlogic/p212/p212.c b/board/amlogic/p212/p212.c index f6e60ae3af1..ae9834c0bf8 100644 --- a/board/amlogic/p212/p212.c +++ b/board/amlogic/p212/p212.c @@ -4,7 +4,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/amlogic/q200/q200.c b/board/amlogic/q200/q200.c index 47f1566a9d3..0c0afccb38c 100644 --- a/board/amlogic/q200/q200.c +++ b/board/amlogic/q200/q200.c @@ -4,7 +4,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/amlogic/s400/s400.c b/board/amlogic/s400/s400.c index 06a9044fd80..96244c9ccb1 100644 --- a/board/amlogic/s400/s400.c +++ b/board/amlogic/s400/s400.c @@ -4,7 +4,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <init.h> #include <net.h> diff --git a/board/amlogic/sei510/sei510.c b/board/amlogic/sei510/sei510.c index bb188c21f75..1a978d1290a 100644 --- a/board/amlogic/sei510/sei510.c +++ b/board/amlogic/sei510/sei510.c @@ -4,7 +4,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <env.h> #include <env_internal.h> diff --git a/board/amlogic/sei610/sei610.c b/board/amlogic/sei610/sei610.c index 6490bac9eb5..8a096b15bfb 100644 --- a/board/amlogic/sei610/sei610.c +++ b/board/amlogic/sei610/sei610.c @@ -4,7 +4,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <env.h> #include <env_internal.h> diff --git a/board/amlogic/u200/u200.c b/board/amlogic/u200/u200.c index 06a9044fd80..96244c9ccb1 100644 --- a/board/amlogic/u200/u200.c +++ b/board/amlogic/u200/u200.c @@ -4,7 +4,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <init.h> #include <net.h> diff --git a/board/amlogic/vim3/vim3.c b/board/amlogic/vim3/vim3.c index a4850364f41..bbc2d826e05 100644 --- a/board/amlogic/vim3/vim3.c +++ b/board/amlogic/vim3/vim3.c @@ -4,7 +4,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <env_internal.h> #include <init.h> diff --git a/board/amlogic/w400/w400.c b/board/amlogic/w400/w400.c index 4199198496b..b84366aaeb1 100644 --- a/board/amlogic/w400/w400.c +++ b/board/amlogic/w400/w400.c @@ -4,7 +4,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ -#include <common.h> #include <dm.h> #include <env_internal.h> #include <init.h> diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c index 17f37badd74..8cfac9fbb34 100644 --- a/board/aristainetos/aristainetos.c +++ b/board/aristainetos/aristainetos.c @@ -9,7 +9,6 @@ * Author: Fabio Estevam <fabio.estevam@freescale.com> */ -#include <common.h> #include <bmp_layout.h> #include <command.h> #include <image.h> diff --git a/board/armadeus/opos6uldev/board.c b/board/armadeus/opos6uldev/board.c index 365fdca1b76..5b25545cdb8 100644 --- a/board/armadeus/opos6uldev/board.c +++ b/board/armadeus/opos6uldev/board.c @@ -3,7 +3,6 @@ * Copyright (C) 2018 Armadeus Systems */ -#include <common.h> #include <init.h> #include <asm/arch/sys_proto.h> #include <asm/gpio.h> diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c index 01c80aaf9d7..3ad77f51949 100644 --- a/board/armltd/corstone1000/corstone1000.c +++ b/board/armltd/corstone1000/corstone1000.c @@ -6,7 +6,6 @@ */ #include <blk.h> -#include <common.h> #include <cpu_func.h> #include <dm.h> #include <env.h> diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c index ad02cf16da5..eaf87e3bfe3 100644 --- a/board/armltd/integrator/integrator.c +++ b/board/armltd/integrator/integrator.c @@ -16,7 +16,7 @@ * Philippe Robin, <philippe.robin@arm.com> */ -#include <common.h> +#include <config.h> #include <bootstage.h> #include <cpu_func.h> #include <dm.h> diff --git a/board/armltd/integrator/timer.c b/board/armltd/integrator/timer.c index 9db5135a8ff..f4101b649e3 100644 --- a/board/armltd/integrator/timer.c +++ b/board/armltd/integrator/timer.c @@ -16,7 +16,7 @@ * Philippe Robin, <philippe.robin@arm.com> */ -#include <common.h> +#include <config.h> #include <div64.h> #include <time.h> #include <linux/delay.h> diff --git a/board/armltd/total_compute/total_compute.c b/board/armltd/total_compute/total_compute.c index 53941b5f5f2..e1b4f49d044 100644 --- a/board/armltd/total_compute/total_compute.c +++ b/board/armltd/total_compute/total_compute.c @@ -4,7 +4,7 @@ * Usama Arif <usama.arif@arm.com> */ -#include <common.h> +#include <config.h> #include <dm.h> #include <dm/platform_data/serial_pl01x.h> #include <asm/armv8/mmu.h> diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c index 763131c217e..6c374e25e32 100644 --- a/board/armltd/vexpress/vexpress_common.c +++ b/board/armltd/vexpress/vexpress_common.c @@ -15,7 +15,7 @@ * ARM Ltd. * Philippe Robin, <philippe.robin@arm.com> */ -#include <common.h> +#include <config.h> #include <bootstage.h> #include <cpu_func.h> #include <init.h> diff --git a/board/armltd/vexpress64/pcie.c b/board/armltd/vexpress64/pcie.c index e553da86e0e..1045c905f73 100644 --- a/board/armltd/vexpress64/pcie.c +++ b/board/armltd/vexpress64/pcie.c @@ -5,7 +5,6 @@ * Author: Liviu Dudau <Liviu.Dudau@arm.com> */ -#include <common.h> #include <init.h> #include <log.h> #include <asm/io.h> diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c index ee65a596838..0119f54f0df 100644 --- a/board/armltd/vexpress64/vexpress64.c +++ b/board/armltd/vexpress64/vexpress64.c @@ -4,7 +4,7 @@ * David Feng <fenghua@phytium.com.cn> * Sharma Bhupesh <bhupesh.sharma@freescale.com> */ -#include <common.h> +#include <config.h> #include <cpu_func.h> #include <dm.h> #include <init.h> diff --git a/board/armsom/sige7-rk3588/Kconfig b/board/armsom/sige7-rk3588/Kconfig new file mode 100644 index 00000000000..793985f531b --- /dev/null +++ b/board/armsom/sige7-rk3588/Kconfig @@ -0,0 +1,12 @@ +if TARGET_SIGE7_RK3588 + +config SYS_BOARD + default "sige7-rk3588" + +config SYS_VENDOR + default "armsom" + +config SYS_CONFIG_NAME + default "sige7-rk3588" + +endif diff --git a/board/armsom/sige7-rk3588/MAINTAINERS b/board/armsom/sige7-rk3588/MAINTAINERS new file mode 100644 index 00000000000..0fba39b76c2 --- /dev/null +++ b/board/armsom/sige7-rk3588/MAINTAINERS @@ -0,0 +1,7 @@ +SIGE7-RK3588 +M: Jianfeng Liu <liujianfeng1994@gmail.com> +S: Maintained +F: board/armsom/sige7-rk3588 +F: include/configs/sige7-rk3588.h +F: configs/sige7-rk3588_defconfig +F: arch/arm/dts/rk3588-armsom-sige7* diff --git a/board/astro/mcf5373l/fpga.c b/board/astro/mcf5373l/fpga.c index f85737432b3..6e505c630d1 100644 --- a/board/astro/mcf5373l/fpga.c +++ b/board/astro/mcf5373l/fpga.c @@ -13,7 +13,6 @@ /* Altera/Xilinx FPGA configuration support for the ASTRO "URMEL" board */ -#include <common.h> #include <console.h> #include <watchdog.h> #include <altera.h> diff --git a/board/astro/mcf5373l/mcf5373l.c b/board/astro/mcf5373l/mcf5373l.c index 43563c41279..43fcbc65513 100644 --- a/board/astro/mcf5373l/mcf5373l.c +++ b/board/astro/mcf5373l/mcf5373l.c @@ -5,9 +5,10 @@ * modified by Wolfgang Wegner <w.wegner@astro-kom.de> for ASTRO 5373l */ -#include <common.h> +#include <config.h> #include <init.h> #include <serial.h> +#include <time.h> #include <watchdog.h> #include <command.h> #include <asm/global_data.h> diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c index b8e02f45903..48aec652c4a 100644 --- a/board/atmel/at91sam9260ek/at91sam9260ek.c +++ b/board/atmel/at91sam9260ek/at91sam9260ek.c @@ -5,7 +5,7 @@ * Lead Tech Design <www.leadtechdesign.com> */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <init.h> #include <net.h> diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c index eab3a130819..5d7a18379fa 100644 --- a/board/atmel/at91sam9261ek/at91sam9261ek.c +++ b/board/atmel/at91sam9261ek/at91sam9261ek.c @@ -5,7 +5,7 @@ * Lead Tech Design <www.leadtechdesign.com> */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <init.h> #include <vsprintf.h> diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 15f20b62f67..2b0b01798ea 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -5,7 +5,7 @@ * Lead Tech Design <www.leadtechdesign.com> */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <init.h> #include <net.h> diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c index f53c1cf612d..3bd94d0889d 100644 --- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c @@ -5,7 +5,7 @@ * Lead Tech Design <www.leadtechdesign.com> */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <init.h> #include <net.h> diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c index a3e294c88fc..afc0c0520e1 100644 --- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c +++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c @@ -4,7 +4,7 @@ * Josh Wu <josh.wu@atmel.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <net.h> #include <vsprintf.h> diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c index 11725f778b7..214e917381e 100644 --- a/board/atmel/at91sam9rlek/at91sam9rlek.c +++ b/board/atmel/at91sam9rlek/at91sam9rlek.c @@ -5,7 +5,7 @@ * Lead Tech Design <www.leadtechdesign.com> */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <init.h> #include <vsprintf.h> diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c index ab666b6be34..e5688c6cf13 100644 --- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c +++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c @@ -3,7 +3,7 @@ * Copyright (C) 2012 Atmel Corporation */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/atmel/common/board.c b/board/atmel/common/board.c index c93c0e52e30..55afd43d4f3 100644 --- a/board/atmel/common/board.c +++ b/board/atmel/common/board.c @@ -4,7 +4,6 @@ * Wenyou Yang <wenyou.yang@microchip.com> */ -#include <common.h> #include <dm.h> #include <env.h> #include <w1.h> diff --git a/board/atmel/common/mac-spi-nor.c b/board/atmel/common/mac-spi-nor.c index ced27b65e63..628f7958129 100644 --- a/board/atmel/common/mac-spi-nor.c +++ b/board/atmel/common/mac-spi-nor.c @@ -5,7 +5,6 @@ * Author: Tudor Ambarus <tudor.ambarus@microchip.com> */ -#include <common.h> #include <dm.h> #include <env.h> #include <net.h> diff --git a/board/atmel/common/mac_eeprom.c b/board/atmel/common/mac_eeprom.c index 4606008c697..97edb7a549d 100644 --- a/board/atmel/common/mac_eeprom.c +++ b/board/atmel/common/mac_eeprom.c @@ -4,9 +4,7 @@ * Wenyou Yang <wenyou.yang@microchip.com> */ -#include <common.h> #include <dm.h> -#include <eeprom.h> #include <env.h> #include <i2c_eeprom.h> #include <net.h> diff --git a/board/atmel/common/video_display.c b/board/atmel/common/video_display.c index a5049f4aad4..77188820581 100644 --- a/board/atmel/common/video_display.c +++ b/board/atmel/common/video_display.c @@ -4,7 +4,6 @@ * Wenyou Yang <wenyou.yang@microchip.com> */ -#include <common.h> #include <atmel_lcd.h> #include <dm.h> #include <init.h> diff --git a/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c b/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c index f53d359404e..e75043ec00f 100644 --- a/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c +++ b/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c @@ -5,7 +5,6 @@ * Author: Durai Manickam KR <durai.manickamkr@microchip.com> */ -#include <common.h> #include <debug_uart.h> #include <fdtdec.h> #include <init.h> diff --git a/board/atmel/sam9x60ek/sam9x60ek.c b/board/atmel/sam9x60ek/sam9x60ek.c index 3fbfca4acc9..2e5073f02b3 100644 --- a/board/atmel/sam9x60ek/sam9x60ek.c +++ b/board/atmel/sam9x60ek/sam9x60ek.c @@ -5,7 +5,7 @@ * Author: Sandeep Sheriker M <sandeep.sheriker@microchip.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c index 329eac7223a..36995a927cf 100644 --- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c +++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c @@ -4,7 +4,6 @@ * Wenyou.Yang <wenyou.yang@microchip.com> */ -#include <common.h> #include <debug_uart.h> #include <fdtdec.h> #include <init.h> diff --git a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c index 6e41017af17..c775d593e58 100644 --- a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c +++ b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c @@ -5,7 +5,7 @@ * Author: Nicolas Ferre <nicolas.ferre@microcihp.com> */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/atmel/sama5d29_curiosity/sama5d29_curiosity.c b/board/atmel/sama5d29_curiosity/sama5d29_curiosity.c index d0679317fb2..8759ff6f01a 100644 --- a/board/atmel/sama5d29_curiosity/sama5d29_curiosity.c +++ b/board/atmel/sama5d29_curiosity/sama5d29_curiosity.c @@ -6,7 +6,6 @@ * */ -#include <common.h> #include <debug_uart.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/atmel/sama5d2_icp/sama5d2_icp.c b/board/atmel/sama5d2_icp/sama5d2_icp.c index fabe492715a..986da01639f 100644 --- a/board/atmel/sama5d2_icp/sama5d2_icp.c +++ b/board/atmel/sama5d2_icp/sama5d2_icp.c @@ -4,7 +4,7 @@ * Eugen Hristev <eugen.hristev@microchip.com> */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c index 854715ea226..438829df82d 100644 --- a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c +++ b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c @@ -4,7 +4,7 @@ * Wenyou Yang <wenyou.yang@microchip.com> */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <dm.h> #include <i2c.h> diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index aa522075691..c8a8eb49826 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -4,7 +4,6 @@ * Wenyou.Yang <wenyou.yang@atmel.com> */ -#include <common.h> #include <debug_uart.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c index ce73a801e50..54cc3c4d900 100644 --- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c +++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c @@ -4,7 +4,7 @@ * Bo Shen <voice.shen@atmel.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c index 660a6b9d583..f2e1242fcb0 100644 --- a/board/atmel/sama5d3xek/sama5d3xek.c +++ b/board/atmel/sama5d3xek/sama5d3xek.c @@ -4,7 +4,7 @@ * Bo Shen <voice.shen@atmel.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index 780aba15ab1..09ca16ca88c 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -4,7 +4,7 @@ * Bo Shen <voice.shen@atmel.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c index 2226906a3b3..1f8b85f0614 100644 --- a/board/atmel/sama5d4ek/sama5d4ek.c +++ b/board/atmel/sama5d4ek/sama5d4ek.c @@ -4,7 +4,7 @@ * Bo Shen <voice.shen@atmel.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/atmel/sama7g54_curiosity/sama7g54_curiosity.c b/board/atmel/sama7g54_curiosity/sama7g54_curiosity.c index 33cd0903d25..b05c9754c96 100644 --- a/board/atmel/sama7g54_curiosity/sama7g54_curiosity.c +++ b/board/atmel/sama7g54_curiosity/sama7g54_curiosity.c @@ -6,7 +6,6 @@ * */ -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/atmel/sama7g5ek/sama7g5ek.c b/board/atmel/sama7g5ek/sama7g5ek.c index 295fd079dcf..c07115a2119 100644 --- a/board/atmel/sama7g5ek/sama7g5ek.c +++ b/board/atmel/sama7g5ek/sama7g5ek.c @@ -4,7 +4,7 @@ * Eugen Hristev <eugen.hristev@microchip.com> */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/avionic-design/common/tamonten-ng.c b/board/avionic-design/common/tamonten-ng.c index 29bde60228f..e35bda81468 100644 --- a/board/avionic-design/common/tamonten-ng.c +++ b/board/avionic-design/common/tamonten-ng.c @@ -4,7 +4,6 @@ * Avionic Design GmbH <www.avionic-design.de> */ -#include <common.h> #include <dm.h> #include <log.h> #include <asm/arch/pinmux.h> diff --git a/board/avionic-design/common/tamonten.c b/board/avionic-design/common/tamonten.c index 988f057a281..4d7477237d4 100644 --- a/board/avionic-design/common/tamonten.c +++ b/board/avionic-design/common/tamonten.c @@ -6,7 +6,6 @@ * Avionic Design GmbH <www.avionic-design.de> */ -#include <common.h> #include <ns16550.h> #include <asm/io.h> #include <asm/gpio.h> diff --git a/board/avionic-design/tec-ng/tec-ng-spl.c b/board/avionic-design/tec-ng/tec-ng-spl.c index 6e544641833..25049452495 100644 --- a/board/avionic-design/tec-ng/tec-ng-spl.c +++ b/board/avionic-design/tec-ng/tec-ng-spl.c @@ -7,7 +7,6 @@ * Svyatoslav Ryhel <clamor95@gmail.com> */ -#include <common.h> #include <asm/arch-tegra/tegra_i2c.h> #include <linux/delay.h> diff --git a/board/beacon/beacon-rzg2m/beacon-rzg2m.c b/board/beacon/beacon-rzg2m/beacon-rzg2m.c index 99fe1edfb33..099053235de 100644 --- a/board/beacon/beacon-rzg2m/beacon-rzg2m.c +++ b/board/beacon/beacon-rzg2m/beacon-rzg2m.c @@ -3,7 +3,6 @@ * Copyright 2020 Compass Electronics Group, LLC */ -#include <common.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/beacon/imx8mm/lpddr4_timing.c b/board/beacon/imx8mm/lpddr4_timing.c index 8e48b9d81b7..c1498dd5eaf 100644 --- a/board/beacon/imx8mm/lpddr4_timing.c +++ b/board/beacon/imx8mm/lpddr4_timing.c @@ -4,7 +4,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/beacon/imx8mm/spl.c b/board/beacon/imx8mm/spl.c index 1632238bf5d..12013aa5a4d 100644 --- a/board/beacon/imx8mm/spl.c +++ b/board/beacon/imx8mm/spl.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> #include <cpu_func.h> #include <hang.h> #include <init.h> diff --git a/board/beacon/imx8mn/spl.c b/board/beacon/imx8mn/spl.c index b4d46f11f98..f03841e5a01 100644 --- a/board/beacon/imx8mn/spl.c +++ b/board/beacon/imx8mn/spl.c @@ -3,7 +3,6 @@ * Copyright 2020 Compass Electronics Group, LLC */ -#include <common.h> #include <hang.h> #include <image.h> #include <init.h> diff --git a/board/beacon/imx8mp/imx8mp_beacon.c b/board/beacon/imx8mp/imx8mp_beacon.c index 8963a51fbba..dd74e7c0f75 100644 --- a/board/beacon/imx8mp/imx8mp_beacon.c +++ b/board/beacon/imx8mp/imx8mp_beacon.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* Copyright 2023 Logic PD, Inc dba Beacon EmbeddedWorks */ -#include <common.h> #include <init.h> #include <miiphy.h> #include <asm/arch/sys_proto.h> diff --git a/board/beacon/imx8mp/spl.c b/board/beacon/imx8mp/spl.c index 591e8ca9ab5..30d577f7e0e 100644 --- a/board/beacon/imx8mp/spl.c +++ b/board/beacon/imx8mp/spl.c @@ -4,7 +4,6 @@ * */ -#include <common.h> #include <hang.h> #include <init.h> #include <log.h> diff --git a/board/beagle/beagle/beagle.c b/board/beagle/beagle/beagle.c index 847d596646e..ac2f89cf213 100644 --- a/board/beagle/beagle/beagle.c +++ b/board/beagle/beagle/beagle.c @@ -12,7 +12,7 @@ * Syed Mohammed Khasim <khasim@ti.com> * */ -#include <common.h> +#include <config.h> #include <bootstage.h> #include <dm.h> #include <env.h> diff --git a/board/beagle/beagle/led.c b/board/beagle/beagle/led.c index e21c0169db7..efbd7c1e0e3 100644 --- a/board/beagle/beagle/led.c +++ b/board/beagle/beagle/led.c @@ -3,7 +3,6 @@ * Copyright (c) 2010 Texas Instruments, Inc. * Jason Kridner <jkridner@beagleboard.org> */ -#include <common.h> #include <status_led.h> #include <asm/arch/cpu.h> #include <asm/io.h> diff --git a/board/beagle/beagleboneai64/Kconfig b/board/beagle/beagleboneai64/Kconfig index 7cfccf9baf0..0f21582614d 100644 --- a/board/beagle/beagleboneai64/Kconfig +++ b/board/beagle/beagleboneai64/Kconfig @@ -37,7 +37,7 @@ config SYS_VENDOR default "beagle" config SYS_CONFIG_NAME - default "j721e_evm" + default "beagleboneai64" source "board/ti/common/Kconfig" @@ -52,7 +52,7 @@ config SYS_VENDOR default "beagle" config SYS_CONFIG_NAME - default "j721e_evm" + default "beagleboneai64" source "board/ti/common/Kconfig" diff --git a/board/beagle/beagleboneai64/beagleboneai64.c b/board/beagle/beagleboneai64/beagleboneai64.c index c5b4ff7df47..1e43d1c1bd2 100644 --- a/board/beagle/beagleboneai64/beagleboneai64.c +++ b/board/beagle/beagleboneai64/beagleboneai64.c @@ -7,6 +7,7 @@ * Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation */ +#include <efi_loader.h> #include <cpu_func.h> #include <env.h> #include <fdt_support.h> @@ -14,6 +15,44 @@ DECLARE_GLOBAL_DATA_PTR; +struct efi_fw_image fw_images[] = { + { + .image_type_id = BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = BEAGLEBONEAI64_SPL_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_SPL", + .image_index = 2, + }, + { + .image_type_id = BEAGLEBONEAI64_UBOOT_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_UBOOT", + .image_index = 3, + }, + { + .image_type_id = BEAGLEBONEAI64_SYSFW_IMAGE_GUID, + .fw_name = u"BEAGLEBONEAI64_SYSFW", + .image_index = 4, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "mmc 0=tiboot3.bin raw 0 2000 mmcpart 1;" + "tispl.bin fat 0 1;u-boot.img fat 0 1; sysfw.itb fat 0 1", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/board/beagle/beagleplay/Kconfig b/board/beagle/beagleplay/Kconfig index 896a1c1be30..592b53e493c 100644 --- a/board/beagle/beagleplay/Kconfig +++ b/board/beagle/beagleplay/Kconfig @@ -36,7 +36,7 @@ config SYS_VENDOR default "beagle" config SYS_CONFIG_NAME - default "am62x_evm" + default "beagleplay" source "board/ti/common/Kconfig" @@ -51,7 +51,7 @@ config SYS_VENDOR default "beagle" config SYS_CONFIG_NAME - default "am62x_evm" + default "beagleplay" config SPL_LDSCRIPT default "arch/arm/mach-omap2/u-boot-spl.lds" diff --git a/board/beagle/beagleplay/beagleplay.c b/board/beagle/beagleplay/beagleplay.c index af36439e2e2..a21f09e3122 100644 --- a/board/beagle/beagleplay/beagleplay.c +++ b/board/beagle/beagleplay/beagleplay.c @@ -6,6 +6,7 @@ * Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation */ +#include <efi_loader.h> #include <cpu_func.h> #include <env.h> #include <fdt_support.h> @@ -15,6 +16,39 @@ DECLARE_GLOBAL_DATA_PTR; +struct efi_fw_image fw_images[] = { + { + .image_type_id = BEAGLEPLAY_TIBOOT3_IMAGE_GUID, + .fw_name = u"BEAGLEPLAY_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = BEAGLEPLAY_SPL_IMAGE_GUID, + .fw_name = u"BEAGLEPLAY_SPL", + .image_index = 2, + }, + { + .image_type_id = BEAGLEPLAY_UBOOT_IMAGE_GUID, + .fw_name = u"BEAGLEPLAY_UBOOT", + .image_index = 3, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "mmc 0=tiboot3.bin raw 0 2000 mmcpart 1;" + "tispl.bin fat 0 1;u-boot.img fat 0 1", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/board/beagle/beagleplay/beagleplay.env b/board/beagle/beagleplay/beagleplay.env index bbf6b925d02..354bc987d12 100644 --- a/board/beagle/beagleplay/beagleplay.env +++ b/board/beagle/beagleplay/beagleplay.env @@ -1,5 +1,6 @@ #include <env/ti/ti_common.env> #include <env/ti/mmc.env> +#include <env/ti/k3_dfu.env> name_kern=Image console=ttyS2,115200n8 @@ -11,7 +12,7 @@ set_led_state_start_load=led led-0 on; led led-1 off; led led-2 on; led led-3 off; led led-4 on boot=mmc mmcdev=1 -bootpart=1:1 +bootpart=1:2 bootdir=/boot boot_targets=mmc1 mmc0 bootmeths=script extlinux efi pxe diff --git a/board/beckhoff/mx53cx9020/mx53cx9020.c b/board/beckhoff/mx53cx9020/mx53cx9020.c index e7b131836b6..3a766728a6f 100644 --- a/board/beckhoff/mx53cx9020/mx53cx9020.c +++ b/board/beckhoff/mx53cx9020/mx53cx9020.c @@ -7,7 +7,6 @@ * Copyright (C) 2011 Freescale Semiconductor, Inc. */ -#include <common.h> #include <cpu_func.h> #include <init.h> #include <asm/arch/sys_proto.h> diff --git a/board/beckhoff/mx53cx9020/mx53cx9020_video.c b/board/beckhoff/mx53cx9020/mx53cx9020_video.c index bf472902562..fd28a70f4d7 100644 --- a/board/beckhoff/mx53cx9020/mx53cx9020_video.c +++ b/board/beckhoff/mx53cx9020/mx53cx9020_video.c @@ -7,7 +7,6 @@ * Copyright (C) 2012 Freescale Semiconductor, Inc. */ -#include <common.h> #include <asm/arch/iomux-mx53.h> #include <asm/gpio.h> #include <asm/mach-imx/video.h> diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c index 9b42299b080..3275803226a 100644 --- a/board/bluewater/gurnard/gurnard.c +++ b/board/bluewater/gurnard/gurnard.c @@ -7,7 +7,7 @@ * Author: Ryan Mallon <ryan@bluewatersys.com> */ -#include <common.h> +#include <config.h> #include <atmel_lcd.h> #include <atmel_lcdc.h> #include <atmel_mci.h> diff --git a/board/bosch/acc/acc.c b/board/bosch/acc/acc.c index 65c2f356713..a1a00e7ffc4 100644 --- a/board/bosch/acc/acc.c +++ b/board/bosch/acc/acc.c @@ -5,7 +5,7 @@ * Copyright (c) 2022 DENX Software Engineering GmbH, Philip Oberfichtner <pro@denx.de> */ -#include <common.h> +#include <config.h> #include <cpu_func.h> #include <bootstage.h> #include <dm.h> diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c index ee9e6d632ed..41d7567ad21 100644 --- a/board/bosch/guardian/board.c +++ b/board/bosch/guardian/board.c @@ -8,7 +8,7 @@ * Copyright (C) 2018 Robert Bosch Power Tools GmbH */ -#include <common.h> +#include <config.h> #include <dm.h> #include <env_internal.h> #include <errno.h> diff --git a/board/bosch/guardian/mux.c b/board/bosch/guardian/mux.c index 53850ffb8f7..eab3398c4ae 100644 --- a/board/bosch/guardian/mux.c +++ b/board/bosch/guardian/mux.c @@ -6,7 +6,6 @@ * Copyright (C) 2018 Robert Bosch Power Tools GmbH */ -#include <common.h> #include <i2c.h> #include <asm/arch/hardware.h> #include <asm/arch/mux.h> diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c index aebdfd4dfec..ab688745938 100644 --- a/board/bosch/shc/board.c +++ b/board/bosch/shc/board.c @@ -11,7 +11,7 @@ * Copyright (C) 2011, Texas Instruments, Incorporated - https://www.ti.com/ */ -#include <common.h> +#include <config.h> #include <bootstage.h> #include <cpu_func.h> #include <env.h> diff --git a/board/bosch/shc/mux.c b/board/bosch/shc/mux.c index f19d1866c72..a2a8947a3bd 100644 --- a/board/bosch/shc/mux.c +++ b/board/bosch/shc/mux.c @@ -9,7 +9,6 @@ * Copyright (C) 2011 Texas Instruments Incorporated - https://www.ti.com/ */ -#include <common.h> #include <hang.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 382c01ddf4e..2b0cb2361c4 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -4,7 +4,6 @@ * Copyright (C) 2013, Boundary Devices <info@boundarydevices.com> */ -#include <common.h> #include <command.h> #include <env.h> #include <init.h> diff --git a/board/broadcom/bcmbca/board.c b/board/broadcom/bcmbca/board.c index bcecb4d7839..a6ced92565f 100644 --- a/board/broadcom/bcmbca/board.c +++ b/board/broadcom/bcmbca/board.c @@ -3,7 +3,6 @@ * (C) Copyright 2022 Broadcom Ltd. */ -#include <common.h> #include <fdtdec.h> int board_init(void) diff --git a/board/broadcom/bcmns/ns.c b/board/broadcom/bcmns/ns.c index 1249e45af03..45cc62936ce 100644 --- a/board/broadcom/bcmns/ns.c +++ b/board/broadcom/bcmns/ns.c @@ -4,7 +4,6 @@ * Copyright (C) 2023 Linus Walleij <linus.walleij@linaro.org> */ -#include <common.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/broadcom/bcmns3/ns3.c b/board/broadcom/bcmns3/ns3.c index 7ae6742c4be..bb2f1e4f62a 100644 --- a/board/broadcom/bcmns3/ns3.c +++ b/board/broadcom/bcmns3/ns3.c @@ -4,8 +4,8 @@ * */ -#include <common.h> #include <fdt_support.h> +#include <linux/errno.h> #include <asm/io.h> #include <asm/gic-v3.h> #include <asm/global_data.h> diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c index aead6f099e8..bc05aecc446 100644 --- a/board/broadcom/bcmstb/bcmstb.c +++ b/board/broadcom/bcmstb/bcmstb.c @@ -12,7 +12,6 @@ #include <time.h> #include <asm/global_data.h> #include <linux/types.h> -#include <common.h> #include <env.h> #include <asm/io.h> #include <asm/bootm.h> diff --git a/board/bsh/imx6ulz_smm_m2/imx6ulz_smm_m2.c b/board/bsh/imx6ulz_smm_m2/imx6ulz_smm_m2.c index c82eabbfbea..c03e390762a 100644 --- a/board/bsh/imx6ulz_smm_m2/imx6ulz_smm_m2.c +++ b/board/bsh/imx6ulz_smm_m2/imx6ulz_smm_m2.c @@ -14,7 +14,6 @@ #include <asm/mach-imx/boot_mode.h> #include <asm/global_data.h> #include <asm/gpio.h> -#include <common.h> #include <env.h> #include <linux/sizes.h> diff --git a/board/bsh/imx6ulz_smm_m2/spl.c b/board/bsh/imx6ulz_smm_m2/spl.c index 5b4812e129e..724841b5745 100644 --- a/board/bsh/imx6ulz_smm_m2/spl.c +++ b/board/bsh/imx6ulz_smm_m2/spl.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> #include <cpu_func.h> #include <hang.h> #include <init.h> diff --git a/board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c b/board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c index 0ebf208be82..c9989687399 100644 --- a/board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c +++ b/board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c @@ -3,7 +3,6 @@ * Copyright 2021 Collabora Ltd. */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <env.h> diff --git a/board/bticino/mamoj/mamoj.c b/board/bticino/mamoj/mamoj.c index c9da42b43bf..71497b8ab1e 100644 --- a/board/bticino/mamoj/mamoj.c +++ b/board/bticino/mamoj/mamoj.c @@ -5,7 +5,6 @@ * Copyright (C) 2018 Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <init.h> #include <asm/arch/sys_proto.h> #include <asm/global_data.h> diff --git a/board/bticino/mamoj/spl.c b/board/bticino/mamoj/spl.c index 883b7f4133b..59b7c24ccc9 100644 --- a/board/bticino/mamoj/spl.c +++ b/board/bticino/mamoj/spl.c @@ -5,7 +5,6 @@ * Copyright (C) 2018 Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <init.h> #include <serial.h> #include <spl.h> diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index 6a866b5470d..1e501a09813 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -7,7 +7,6 @@ * Marvell Semiconductor <www.marvell.com> */ -#include <common.h> #include <bootstage.h> #include <button.h> #include <command.h> diff --git a/board/cadence/xtfpga/xtfpga.c b/board/cadence/xtfpga/xtfpga.c index 8e4081b4c6d..5110fed3119 100644 --- a/board/cadence/xtfpga/xtfpga.c +++ b/board/cadence/xtfpga/xtfpga.c @@ -4,7 +4,7 @@ * (C) Copyright 2014 - 2016 Cadence Design Systems Inc. */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <command.h> #include <dm.h> diff --git a/board/calao/usb_a9263/usb_a9263.c b/board/calao/usb_a9263/usb_a9263.c index 3d31776d484..8e39a157ea3 100644 --- a/board/calao/usb_a9263/usb_a9263.c +++ b/board/calao/usb_a9263/usb_a9263.c @@ -7,7 +7,7 @@ * Mateusz Kulikowski <mateusz.kulikowski@gmail.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/arch/at91sam9_smc.h> #include <asm/arch/at91_common.h> diff --git a/board/cavium/thunderx/atf.c b/board/cavium/thunderx/atf.c index 37340fe9700..ce7afb78ed5 100644 --- a/board/cavium/thunderx/atf.c +++ b/board/cavium/thunderx/atf.c @@ -3,8 +3,9 @@ * (C) Copyright 2014, Cavium Inc. **/ -#include <common.h> +#include <config.h> #include <command.h> +#include <vsprintf.h> #include <asm/cache.h> #include <asm/io.h> #include <asm/ptrace.h> diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c index ab20825ed36..b1a805c1360 100644 --- a/board/cavium/thunderx/thunderx.c +++ b/board/cavium/thunderx/thunderx.c @@ -3,7 +3,7 @@ * (C) Copyright 2014, Cavium Inc. **/ -#include <common.h> +#include <config.h> #include <cpu_func.h> #include <dm.h> #include <init.h> diff --git a/board/cei/cei-tk1-som/cei-tk1-som.c b/board/cei/cei-tk1-som/cei-tk1-som.c index 95ee7bbfe29..15b200454da 100644 --- a/board/cei/cei-tk1-som/cei-tk1-som.c +++ b/board/cei/cei-tk1-som/cei-tk1-som.c @@ -4,7 +4,7 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> +#include <linux/kernel.h> #include <power/as3722.h> #include <asm/arch/gpio.h> diff --git a/board/chipspark/popmetal_rk3288/popmetal-rk3288.c b/board/chipspark/popmetal_rk3288/popmetal-rk3288.c index e6909b3b1c5..dd7551170d2 100644 --- a/board/chipspark/popmetal_rk3288/popmetal-rk3288.c +++ b/board/chipspark/popmetal_rk3288/popmetal-rk3288.c @@ -3,7 +3,6 @@ * (C) Copyright 2016 Rockchip Electronics Co., Ltd */ -#include <common.h> #include <init.h> #include <asm/gpio.h> diff --git a/board/cloos/imx8mm_phg/imx8mm_phg.c b/board/cloos/imx8mm_phg/imx8mm_phg.c index bc4e984d505..091c9a59a52 100644 --- a/board/cloos/imx8mm_phg/imx8mm_phg.c +++ b/board/cloos/imx8mm_phg/imx8mm_phg.c @@ -3,7 +3,6 @@ * Copyright 2018 NXP */ -#include <common.h> #include <env.h> #include <init.h> #include <miiphy.h> diff --git a/board/cloos/imx8mm_phg/spl.c b/board/cloos/imx8mm_phg/spl.c index 0c3a0135a86..b8892ed2fcc 100644 --- a/board/cloos/imx8mm_phg/spl.c +++ b/board/cloos/imx8mm_phg/spl.c @@ -3,7 +3,6 @@ * Copyright 2019 NXP */ -#include <common.h> #include <command.h> #include <cpu_func.h> #include <hang.h> diff --git a/board/cloudengines/pogo_e02/pogo_e02.c b/board/cloudengines/pogo_e02/pogo_e02.c index 59e1218b411..48eee67129f 100644 --- a/board/cloudengines/pogo_e02/pogo_e02.c +++ b/board/cloudengines/pogo_e02/pogo_e02.c @@ -10,7 +10,6 @@ * Written-by: Prafulla Wadaskar <prafulla@marvell.com> */ -#include <common.h> #include <init.h> #include <log.h> #include <netdev.h> diff --git a/board/cloudengines/pogo_v4/pogo_v4.c b/board/cloudengines/pogo_v4/pogo_v4.c index 61ce0d59c77..c8ad563f721 100644 --- a/board/cloudengines/pogo_v4/pogo_v4.c +++ b/board/cloudengines/pogo_v4/pogo_v4.c @@ -11,7 +11,6 @@ * Written-by: Prafulla Wadaskar <prafulla@marvell.com> */ -#include <common.h> #include <netdev.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> diff --git a/board/cobra5272/cobra5272.c b/board/cobra5272/cobra5272.c index 69a9df94231..774aa82b57f 100644 --- a/board/cobra5272/cobra5272.c +++ b/board/cobra5272/cobra5272.c @@ -4,7 +4,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/immap.h> diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c index 8416af163ad..157b71da85e 100644 --- a/board/cobra5272/flash.c +++ b/board/cobra5272/flash.c @@ -4,13 +4,17 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <console.h> #include <cpu_func.h> #include <flash.h> #include <irq_func.h> +#include <stdio.h> +#include <time.h> #include <uuid.h> +#include <vsprintf.h> #include <linux/delay.h> +#include <linux/string.h> #define PHYS_FLASH_1 CFG_SYS_FLASH_BASE #define FLASH_BANK_SIZE 0x200000 diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c index af19a658b54..7853c4d024a 100644 --- a/board/compulab/cl-som-imx7/cl-som-imx7.c +++ b/board/compulab/cl-som-imx7/cl-som-imx7.c @@ -7,7 +7,7 @@ * Author: Uri Mashiach <uri.mashiach@compulab.co.il> */ -#include <common.h> +#include <config.h> #include <env.h> #include <init.h> #include <mmc.h> diff --git a/board/compulab/cl-som-imx7/common.c b/board/compulab/cl-som-imx7/common.c index 40ba0f7a960..ae8e8346620 100644 --- a/board/compulab/cl-som-imx7/common.c +++ b/board/compulab/cl-som-imx7/common.c @@ -7,7 +7,6 @@ * Author: Uri Mashiach <uri.mashiach@compulab.co.il> */ -#include <common.h> #include <fsl_esdhc_imx.h> #include <asm-generic/gpio.h> #include "common.h" diff --git a/board/compulab/cl-som-imx7/mux.c b/board/compulab/cl-som-imx7/mux.c index 18f16a48738..25123ee145a 100644 --- a/board/compulab/cl-som-imx7/mux.c +++ b/board/compulab/cl-som-imx7/mux.c @@ -7,7 +7,7 @@ * Author: Uri Mashiach <uri.mashiach@compulab.co.il> */ -#include <common.h> +#include <linux/kernel.h> #include <asm/mach-imx/iomux-v3.h> #include <asm/arch-mx7/mx7-pins.h> diff --git a/board/compulab/cl-som-imx7/spl.c b/board/compulab/cl-som-imx7/spl.c index 98c3b831f1e..9b6bbb974da 100644 --- a/board/compulab/cl-som-imx7/spl.c +++ b/board/compulab/cl-som-imx7/spl.c @@ -7,7 +7,6 @@ * Author: Uri Mashiach <uri.mashiach@compulab.co.il> */ -#include <common.h> #include <hang.h> #include <init.h> #include <spl.h> diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index 7bce09e432c..4a6cc3e5630 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -7,7 +7,7 @@ * Author: Nikita Kiryanov <nikita@compulab.co.il> */ -#include <common.h> +#include <config.h> #include <ahci.h> #include <dm.h> #include <dwc_ahsata.h> diff --git a/board/compulab/cm_fx6/common.c b/board/compulab/cm_fx6/common.c index ed8c7a3bf5f..a71861b1731 100644 --- a/board/compulab/cm_fx6/common.c +++ b/board/compulab/cm_fx6/common.c @@ -7,7 +7,6 @@ * Author: Nikita Kiryanov <nikita@compulab.co.il> */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/gpio.h> #include <asm/mach-imx/spi.h> diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c index 079f196200e..b11bf2d28c6 100644 --- a/board/compulab/cm_fx6/spl.c +++ b/board/compulab/cm_fx6/spl.c @@ -7,7 +7,6 @@ * Author: Nikita Kiryanov <nikita@compulab.co.il> */ -#include <common.h> #include <clock_legacy.h> #include <hang.h> #include <init.h> diff --git a/board/compulab/cm_t43/cm_t43.c b/board/compulab/cm_t43/cm_t43.c index 5df378a62e3..181581926c3 100644 --- a/board/compulab/cm_t43/cm_t43.c +++ b/board/compulab/cm_t43/cm_t43.c @@ -3,7 +3,7 @@ * Copyright (C) 2015 Compulab, Ltd. */ -#include <common.h> +#include <config.h> #include <i2c.h> #include <miiphy.h> #include <cpsw.h> diff --git a/board/compulab/cm_t43/mux.c b/board/compulab/cm_t43/mux.c index 778ea05e84c..f10910565d5 100644 --- a/board/compulab/cm_t43/mux.c +++ b/board/compulab/cm_t43/mux.c @@ -3,7 +3,6 @@ * Copyright (C) 2015 Compulab, Ltd. */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/arch/mux.h> #include "board.h" diff --git a/board/compulab/cm_t43/spl.c b/board/compulab/cm_t43/spl.c index a6223a477fe..212bfeb5c30 100644 --- a/board/compulab/cm_t43/spl.c +++ b/board/compulab/cm_t43/spl.c @@ -3,7 +3,7 @@ * Copyright (C) 2016 Compulab, Ltd. */ -#include <common.h> +#include <config.h> #include <hang.h> #include <init.h> #include <spl.h> diff --git a/board/compulab/common/common.c b/board/compulab/common/common.c index 528c97df19a..6ffebe6bdb4 100644 --- a/board/compulab/common/common.c +++ b/board/compulab/common/common.c @@ -5,7 +5,6 @@ * Authors: Igor Grinberg <grinberg@compulab.co.il> */ -#include <common.h> #include <malloc.h> #include <asm/bootm.h> #include <asm/gpio.h> diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c index c4b257f851d..efdaf342d5c 100644 --- a/board/compulab/common/eeprom.c +++ b/board/compulab/common/eeprom.c @@ -6,13 +6,13 @@ * Igor Grinberg <grinberg@compulab.co.il> */ -#include <common.h> -#include <eeprom.h> #include <i2c.h> +#include <vsprintf.h> #include <eeprom_layout.h> #include <eeprom_field.h> #include <asm/setup.h> #include <linux/kernel.h> +#include <linux/string.h> #include "eeprom.h" #define EEPROM_LAYOUT_VER_OFFSET 44 diff --git a/board/compulab/common/omap3_smc911x.c b/board/compulab/common/omap3_smc911x.c index f0d365272c1..411fc4943ba 100644 --- a/board/compulab/common/omap3_smc911x.c +++ b/board/compulab/common/omap3_smc911x.c @@ -5,7 +5,6 @@ * Authors: Igor Grinberg <grinberg@compulab.co.il> */ -#include <common.h> #include <netdev.h> #include <linux/delay.h> diff --git a/board/compulab/imx8mm-cl-iot-gate/ddr/ddr.c b/board/compulab/imx8mm-cl-iot-gate/ddr/ddr.c index b230478b611..6a3d816a48a 100644 --- a/board/compulab/imx8mm-cl-iot-gate/ddr/ddr.c +++ b/board/compulab/imx8mm-cl-iot-gate/ddr/ddr.c @@ -5,7 +5,6 @@ * */ -#include <common.h> #include <spl.h> #include <asm/io.h> #include <errno.h> @@ -47,7 +46,9 @@ struct lpddr4_desc { static const struct lpddr4_desc lpddr4_array[] = { { .name = "Nanya", .id = 0x05000010, .subind = 0xff, .size = 2048, .count = 1, .timing = &ucm_dram_timing_01061010}, - { .name = "Samsung", .id = 0x01061010, .subind = 0xff, + { .name = "Samsung", .id = 0x01061010, .subind = 0x04, + .size = 4096, .count = 1, .timing = &ucm_dram_timing_ff000110}, + { .name = "Samsung", .id = 0x01061010, .subind = 0x02, .size = 2048, .count = 1, .timing = &ucm_dram_timing_01061010}, { .name = "Kingston", .id = 0xff000010, .subind = 0x04, .size = 4096, .count = 1, .timing = &ucm_dram_timing_ff000110}, diff --git a/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_01061010.1_2.c b/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_01061010.1_2.c index 9019a1f2035..efcc95c739f 100644 --- a/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_01061010.1_2.c +++ b/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_01061010.1_2.c @@ -7,7 +7,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_01061010.c b/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_01061010.c index 5141c04f12d..67f59ed9407 100644 --- a/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_01061010.c +++ b/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_01061010.c @@ -7,7 +7,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_ff000110.c b/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_ff000110.c index 2334722497d..273ee89c0bc 100644 --- a/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_ff000110.c +++ b/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_ff000110.c @@ -7,7 +7,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_ff020008.c b/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_ff020008.c index e65445e0155..1243800b324 100644 --- a/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_ff020008.c +++ b/board/compulab/imx8mm-cl-iot-gate/ddr/lpddr4_timing_ff020008.c @@ -7,7 +7,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/compulab/imx8mm-cl-iot-gate/eeprom_spl.c b/board/compulab/imx8mm-cl-iot-gate/eeprom_spl.c index 90cc33a6e46..1256848f9a9 100644 --- a/board/compulab/imx8mm-cl-iot-gate/eeprom_spl.c +++ b/board/compulab/imx8mm-cl-iot-gate/eeprom_spl.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* (C) Copyright 2019 CompuLab, Ltd. <www.compulab.co.il> */ -#include <common.h> +#include <config.h> #include <i2c.h> #include <linux/kernel.h> #include <asm/arch/imx8mq_pins.h> diff --git a/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c b/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c index af070ec315c..bda7aac5be4 100644 --- a/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c +++ b/board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c @@ -4,11 +4,11 @@ * Copyright 2020 Linaro */ -#include <common.h> #include <efi.h> #include <efi_loader.h> #include <env.h> #include <extension_board.h> +#include <fdt_support.h> #include <hang.h> #include <i2c.h> #include <init.h> @@ -31,6 +31,8 @@ DECLARE_GLOBAL_DATA_PTR; +static int fec_phyaddr = -1; + #if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) struct efi_fw_image fw_images[] = { #if defined(CONFIG_TARGET_IMX8MM_CL_IOT_GATE) @@ -110,10 +112,72 @@ static int setup_fec(void) return 0; } +#define FDT_PHYADDR "/soc@0/bus@30800000/ethernet@30be0000/mdio/ethernet-phy@0" +#define FLIP_32B(val) (((val >> 24) & 0xff) | ((val << 8) & 0xff0000) | ((val >> 8) & 0xff00) | ((val << 24) & 0xff000000)) +static int fdt_set_fec_phy_addr(void *blob) +{ + u32 val; + + if (fec_phyaddr < 0) + return -EINVAL; + + val = FLIP_32B(fec_phyaddr); + return fdt_find_and_setprop(blob, FDT_PHYADDR, "reg", (const void *)&val, + sizeof(val), 0); +} + +int ft_board_setup(void *blob, struct bd_info *bd) +{ + fdt_set_fec_phy_addr(blob); + return 0; +} + +/* + * These are specific ID, purposed to distiguish between PHY vendors. + * These values are not equal to real vendors' OUI (half of MAC address) + */ +#define OUI_PHY_ATHEROS 0x1374 +#define OUI_PHY_REALTEK 0x0732 + int board_phy_config(struct phy_device *phydev) { - if (IS_ENABLED(CONFIG_FEC_MXC)) { + unsigned int model, rev, oui; + int phyid1, phyid2; + unsigned int reg; + + if (!IS_ENABLED(CONFIG_FEC_MXC)) + return 0; + + phyid1 = phy_read(phydev, MDIO_DEVAD_NONE, MII_PHYSID1); + if (phyid1 < 0) { + printf("%s: PHYID1 registry read fail %i\n", __func__, phyid1); + return phyid1; + } + + phyid2 = phy_read(phydev, MDIO_DEVAD_NONE, MII_PHYSID2); + if (phyid2 < 0) { + printf("%s: PHYID2 registry read fail %i\n", __func__, phyid2); + return phyid2; + } + + reg = phyid2 | phyid1 << 16; + if (reg == 0xffff) { + printf("%s: There is no device @%i\n", __func__, phydev->addr); + return -ENODEV; + } + + rev = reg & 0xf; + reg >>= 4; + model = reg & 0x3f; + reg >>= 6; + oui = reg; + debug("%s: PHY @0x%x OUI 0x%06x model 0x%x rev 0x%x\n", + __func__, phydev->addr, oui, model, rev); + + switch (oui) { + case OUI_PHY_ATHEROS: /* enable rgmii rxc skew and phy mode select to RGMII copper */ + printf("phy: AR803x@%x\t", phydev->addr); phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x1f); phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x8); @@ -121,10 +185,45 @@ int board_phy_config(struct phy_device *phydev) phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x82ee); phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05); phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x100); + break; + case OUI_PHY_REALTEK: + printf("phy: RTL8211E@%x\t", phydev->addr); + /* RTL8211E-VB-CG - add TX and RX delay */ + unsigned short val; + + phy_write(phydev, MDIO_DEVAD_NONE, 0x1f, 0x07); + phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0xa4); + val = phy_read(phydev, MDIO_DEVAD_NONE, 0x1c); + val |= (0x1 << 13) | (0x1 << 12) | (0x1 << 11); + phy_write(phydev, MDIO_DEVAD_NONE, 0x1c, val); + /* LEDs: set to extension page */ + phy_write(phydev, MDIO_DEVAD_NONE, 0x1f, 0x0007); + /* extension Page44 */ + phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x002c); + phy_write(phydev, MDIO_DEVAD_NONE, 0x1c, 0x0430);//LCR + phy_write(phydev, MDIO_DEVAD_NONE, 0x1a, 0x0010);//LACR + /* + * To disable EEE LED mode (blinking .4s/2s) + * Extension Page5 + */ + phy_write(phydev, MDIO_DEVAD_NONE, 0x1f, 0x0005); + phy_write(phydev, MDIO_DEVAD_NONE, 0x05, 0x8b82);//magic const + phy_write(phydev, MDIO_DEVAD_NONE, 0x06, 0x052b);//magic const + + phy_write(phydev, MDIO_DEVAD_NONE, 0x1f, 0x00);// Back to Page0 - if (phydev->drv->config) - phydev->drv->config(phydev); + break; + default: + printf("%s: ERROR: unknown PHY @0x%x OUI 0x%06x model 0x%x rev 0x%x\n", + __func__, phydev->addr, oui, model, rev); + return -ENOSYS; } + + fec_phyaddr = phydev->addr; + + if (phydev->drv->config) + phydev->drv->config(phydev); + return 0; } diff --git a/board/compulab/imx8mm-cl-iot-gate/spl.c b/board/compulab/imx8mm-cl-iot-gate/spl.c index 19c1acd8a52..6d9af2538b6 100644 --- a/board/compulab/imx8mm-cl-iot-gate/spl.c +++ b/board/compulab/imx8mm-cl-iot-gate/spl.c @@ -4,7 +4,6 @@ * Copyright 2020 Linaro */ -#include <common.h> #include <command.h> #include <cpu_func.h> #include <hang.h> diff --git a/board/compulab/trimslice/trimslice.c b/board/compulab/trimslice/trimslice.c index 21ff0cda7f7..af05c0c0f05 100644 --- a/board/compulab/trimslice/trimslice.c +++ b/board/compulab/trimslice/trimslice.c @@ -4,7 +4,6 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> #include <asm/io.h> #include <asm/arch/tegra.h> #include <asm/arch/clock.h> diff --git a/board/conclusive/kstr-sama5d27/kstr-sama5d27.c b/board/conclusive/kstr-sama5d27/kstr-sama5d27.c index 1b765b11374..64282ae9dc7 100644 --- a/board/conclusive/kstr-sama5d27/kstr-sama5d27.c +++ b/board/conclusive/kstr-sama5d27/kstr-sama5d27.c @@ -4,7 +4,7 @@ * Copyright (C) 2021-2023 Conclusive Engineering Sp. z o. o. */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <init.h> #include <env.h> diff --git a/board/congatec/cgtqmx8/cgtqmx8.c b/board/congatec/cgtqmx8/cgtqmx8.c index d8e5b1d6963..99c33a1943e 100644 --- a/board/congatec/cgtqmx8/cgtqmx8.c +++ b/board/congatec/cgtqmx8/cgtqmx8.c @@ -3,7 +3,7 @@ * Copyright 2018 congatec AG * Copyright (C) 2019 Oliver Graute <oliver.graute@kococonnector.com> */ -#include <common.h> +#include <config.h> #include <errno.h> #include <linux/libfdt.h> #include <fsl_esdhc.h> diff --git a/board/congatec/cgtqmx8/spl.c b/board/congatec/cgtqmx8/spl.c index b432ce27459..242e794981b 100644 --- a/board/congatec/cgtqmx8/spl.c +++ b/board/congatec/cgtqmx8/spl.c @@ -4,7 +4,6 @@ * */ -#include <common.h> #include <dm.h> #include <fdt_support.h> #include <init.h> diff --git a/board/congatec/common/mmc.c b/board/congatec/common/mmc.c index bb7a3d4a9aa..74a189ab4d7 100644 --- a/board/congatec/common/mmc.c +++ b/board/congatec/common/mmc.c @@ -4,7 +4,8 @@ * Copyright 2018 NXP * */ -#include <common.h> + +#include <vsprintf.h> #include <linux/errno.h> #include <asm/io.h> #include <env.h> diff --git a/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c b/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c index 315b6dc5429..4197e88fb6f 100644 --- a/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c +++ b/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c @@ -3,7 +3,6 @@ * Copyright (C) 2016 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <i2c.h> #include <init.h> #include <winbond_w83627.h> diff --git a/board/coreboot/coreboot/coreboot.c b/board/coreboot/coreboot/coreboot.c index e58dce37477..f2ca1076768 100644 --- a/board/coreboot/coreboot/coreboot.c +++ b/board/coreboot/coreboot/coreboot.c @@ -3,7 +3,6 @@ * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> */ -#include <common.h> #include <splash.h> #include <init.h> #include <smbios.h> diff --git a/board/cortina/presidio-asic/presidio.c b/board/cortina/presidio-asic/presidio.c index fdfa3affc3b..c07e0eae4e9 100644 --- a/board/cortina/presidio-asic/presidio.c +++ b/board/cortina/presidio-asic/presidio.c @@ -3,7 +3,7 @@ * (C) Copyright 2020 - Cortina Access Inc. * */ -#include <common.h> +#include <config.h> #include <event.h> #include <init.h> #include <malloc.h> diff --git a/board/cssi/cmpcpro/cmpcpro.c b/board/cssi/cmpcpro/cmpcpro.c index ef304124564..ec13d9a7ed7 100644 --- a/board/cssi/cmpcpro/cmpcpro.c +++ b/board/cssi/cmpcpro/cmpcpro.c @@ -7,7 +7,6 @@ #include <dm.h> #include <env.h> #include <env_internal.h> -#include <eeprom.h> #include <fdt_support.h> #include <hang.h> #include <ioports.h> diff --git a/board/d-link/dns325/dns325.c b/board/d-link/dns325/dns325.c index 8ebfe4c6018..3bbde9808d2 100644 --- a/board/d-link/dns325/dns325.c +++ b/board/d-link/dns325/dns325.c @@ -9,7 +9,6 @@ * Written-by: Prafulla Wadaskar <prafulla@marvell.com> */ -#include <common.h> #include <init.h> #include <log.h> #include <miiphy.h> diff --git a/board/data_modul/common/common.c b/board/data_modul/common/common.c index 4ece82c7303..b4d74a8fd8b 100644 --- a/board/data_modul/common/common.c +++ b/board/data_modul/common/common.c @@ -3,7 +3,6 @@ * Copyright 2022 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <asm-generic/gpio.h> #include <asm-generic/sections.h> #include <asm/arch/clock.h> diff --git a/board/data_modul/imx8mm_edm_sbc/imx8mm_data_modul_edm_sbc.c b/board/data_modul/imx8mm_edm_sbc/imx8mm_data_modul_edm_sbc.c index bfb2bddc1d1..339702e8392 100644 --- a/board/data_modul/imx8mm_edm_sbc/imx8mm_data_modul_edm_sbc.c +++ b/board/data_modul/imx8mm_edm_sbc/imx8mm_data_modul_edm_sbc.c @@ -3,7 +3,6 @@ * Copyright 2022 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <asm/arch/clock.h> #include <asm/arch/imx8mm_pins.h> #include <asm/io.h> diff --git a/board/data_modul/imx8mm_edm_sbc/spl.c b/board/data_modul/imx8mm_edm_sbc/spl.c index 4a9c62fb86f..17aafd719c9 100644 --- a/board/data_modul/imx8mm_edm_sbc/spl.c +++ b/board/data_modul/imx8mm_edm_sbc/spl.c @@ -3,7 +3,6 @@ * Copyright 2022 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <hang.h> #include <image.h> #include <init.h> diff --git a/board/data_modul/imx8mp_edm_sbc/imx8mp_data_modul_edm_sbc.c b/board/data_modul/imx8mp_edm_sbc/imx8mp_data_modul_edm_sbc.c index f0f373aa280..138acd36ad2 100644 --- a/board/data_modul/imx8mp_edm_sbc/imx8mp_data_modul_edm_sbc.c +++ b/board/data_modul/imx8mp_edm_sbc/imx8mp_data_modul_edm_sbc.c @@ -3,7 +3,6 @@ * Copyright 2022 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <asm/arch/clock.h> #include <asm/arch/imx8mp_pins.h> #include <asm/io.h> diff --git a/board/data_modul/imx8mp_edm_sbc/spl.c b/board/data_modul/imx8mp_edm_sbc/spl.c index cc2d253e391..c1935898533 100644 --- a/board/data_modul/imx8mp_edm_sbc/spl.c +++ b/board/data_modul/imx8mp_edm_sbc/spl.c @@ -3,7 +3,6 @@ * Copyright 2022 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <hang.h> #include <image.h> #include <init.h> diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index 05053a87a5a..0011c828523 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -8,7 +8,7 @@ * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> */ -#include <common.h> +#include <config.h> #include <dm.h> #include <env.h> #include <i2c.h> diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index 9738e2bd9c7..607e05ad9ae 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -8,7 +8,7 @@ * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> */ -#include <common.h> +#include <config.h> #include <env.h> #include <i2c.h> #include <init.h> diff --git a/board/davinci/da8xxevm/u-boot-spl-da850evm.lds b/board/davinci/da8xxevm/u-boot-spl-da850evm.lds index 7e0f09f3b5b..56d6f4f114b 100644 --- a/board/davinci/da8xxevm/u-boot-spl-da850evm.lds +++ b/board/davinci/da8xxevm/u-boot-spl-da850evm.lds @@ -46,12 +46,7 @@ SECTIONS } >.sram __image_copy_end = .; - - .end : - { - *(.__end) - } - + _end = .; _image_binary_end = .; .bss : diff --git a/board/dfi/dfi-bt700/dfi-bt700.c b/board/dfi/dfi-bt700/dfi-bt700.c index 87506a77a17..907cc985d7a 100644 --- a/board/dfi/dfi-bt700/dfi-bt700.c +++ b/board/dfi/dfi-bt700/dfi-bt700.c @@ -3,7 +3,6 @@ * Copyright (C) 2016 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <init.h> #include <log.h> #include <nuvoton_nct6102d.h> diff --git a/board/dhelectronics/common/dh_common.c b/board/dhelectronics/common/dh_common.c index 34094a020b0..32c50b4f0f5 100644 --- a/board/dhelectronics/common/dh_common.c +++ b/board/dhelectronics/common/dh_common.c @@ -4,7 +4,6 @@ * Copyright 2022 DENX Software Engineering GmbH, Philip Oberfichtner <pro@denx.de> */ -#include <common.h> #include <dm.h> #include <i2c_eeprom.h> #include <net.h> diff --git a/board/dhelectronics/common/dh_imx.c b/board/dhelectronics/common/dh_imx.c index 7f451bad59c..3d6487dd0d8 100644 --- a/board/dhelectronics/common/dh_imx.c +++ b/board/dhelectronics/common/dh_imx.c @@ -4,9 +4,9 @@ * Copyright 2022 DENX Software Engineering GmbH, Philip Oberfichtner <pro@denx.de> */ +#include <linux/errno.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> -#include <common.h> #include <net.h> #include "dh_imx.h" diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c index 0676587c38a..c8dd30dfeaf 100644 --- a/board/dhelectronics/dh_imx6/dh_imx6.c +++ b/board/dhelectronics/dh_imx6/dh_imx6.c @@ -5,9 +5,7 @@ * Copyright (C) 2017 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <dm.h> -#include <eeprom.h> #include <image.h> #include <init.h> #include <net.h> diff --git a/board/dhelectronics/dh_imx6/dh_imx6_spl.c b/board/dhelectronics/dh_imx6/dh_imx6_spl.c index e6d5657c62d..3a5495ea18e 100644 --- a/board/dhelectronics/dh_imx6/dh_imx6_spl.c +++ b/board/dhelectronics/dh_imx6/dh_imx6_spl.c @@ -5,7 +5,6 @@ * Copyright (C) 2017 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <cpu_func.h> #include <init.h> #include <asm/arch/clock.h> diff --git a/board/dhelectronics/dh_imx8mp/common.c b/board/dhelectronics/dh_imx8mp/common.c index 44456da681c..f6db9f67804 100644 --- a/board/dhelectronics/dh_imx8mp/common.c +++ b/board/dhelectronics/dh_imx8mp/common.c @@ -3,7 +3,6 @@ * Copyright 2022 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <asm/io.h> #include <asm-generic/gpio.h> diff --git a/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c b/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c index ff2c0e87215..c635735d89c 100644 --- a/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c +++ b/board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c @@ -3,7 +3,6 @@ * Copyright 2022 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <asm/arch/clock.h> #include <asm/arch/ddr.h> #include <asm/arch/sys_proto.h> diff --git a/board/dhelectronics/dh_imx8mp/spl.c b/board/dhelectronics/dh_imx8mp/spl.c index 7d228da8e5b..714f846521e 100644 --- a/board/dhelectronics/dh_imx8mp/spl.c +++ b/board/dhelectronics/dh_imx8mp/spl.c @@ -3,7 +3,6 @@ * Copyright 2022 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <hang.h> #include <image.h> #include <init.h> diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c index acfdf2e87c0..4f4f537fee5 100644 --- a/board/dhelectronics/dh_stm32mp1/board.c +++ b/board/dhelectronics/dh_stm32mp1/board.c @@ -3,7 +3,6 @@ * Copyright (C) 2018, STMicroelectronics - All Rights Reserved */ -#include <common.h> #include <adc.h> #include <log.h> #include <net.h> @@ -38,6 +37,7 @@ #include <power/regulator.h> #include <remoteproc.h> #include <reset.h> +#include <spl.h> #include <syscon.h> #include <usb.h> #include <usb/dwc2_udc.h> @@ -684,12 +684,69 @@ void board_quiesce_devices(void) #endif } +static void dh_stm32_ks8851_fixup(void *blob) +{ + struct gpio_desc ks8851intrn; + bool compatible = false; + int ks8851intrn_value; + const char *prop; + ofnode node; + int idx = 0; + int offset; + int ret; + + /* Do nothing if not STM32MP15xx DHCOM SoM */ + while ((prop = fdt_stringlist_get(blob, 0, "compatible", idx++, NULL))) { + if (!strstr(prop, "dhcom-som")) + continue; + compatible = true; + break; + } + + if (!compatible) + return; + + /* + * Read state of INTRN pull up resistor, if this pull up is populated, + * KS8851-16MLL is populated as well and should be enabled, otherwise + * it should be disabled. + */ + node = ofnode_path("/config"); + if (!ofnode_valid(node)) + return; + + ret = gpio_request_by_name_nodev(node, "dh,mac-coding-gpios", 0, + &ks8851intrn, GPIOD_IS_IN); + if (ret) + return; + + ks8851intrn_value = dm_gpio_get_value(&ks8851intrn); + + dm_gpio_free(NULL, &ks8851intrn); + + /* Set the 'status' property into KS8851-16MLL DT node. */ + offset = fdt_path_offset(blob, "ethernet1"); + ret = fdt_node_check_compatible(blob, offset, "micrel,ks8851-mll"); + if (ret) /* Not compatible */ + return; + + /* Add a bit of extra space for new 'status' property */ + ret = fdt_shrink_to_minimum(blob, 4096); + if (!ret) + return; + + fdt_setprop_string(blob, offset, "status", + ks8851intrn_value ? "okay" : "disabled"); +} + #if defined(CONFIG_OF_BOARD_SETUP) int ft_board_setup(void *blob, struct bd_info *bd) { const char *buck3path = "/soc/i2c@5c002000/stpmic@33/regulators/buck3"; int buck3off, ret, uv; + dh_stm32_ks8851_fixup(blob); + ret = board_get_regulator_buck3_nvm_uv_av96(&uv); if (ret) /* Not Avenger96 board, do not patch Buck3 in DT. */ return 0; @@ -710,6 +767,13 @@ int ft_board_setup(void *blob, struct bd_info *bd) } #endif +#if defined(CONFIG_SPL_BUILD) +void spl_perform_fixups(struct spl_image_info *spl_image) +{ + dh_stm32_ks8851_fixup(spl_image_fdt_addr(spl_image)); +} +#endif + static void board_copro_image_process(ulong fw_image, size_t fw_size) { int ret, id = 0; /* Copro id fixed to 0 as only one coproc on mp1 */ diff --git a/board/ea/ea-lpc3250devkitv2/ea-lpc3250devkitv2.c b/board/ea/ea-lpc3250devkitv2/ea-lpc3250devkitv2.c index 2b03e4891d9..222e5facf43 100644 --- a/board/ea/ea-lpc3250devkitv2/ea-lpc3250devkitv2.c +++ b/board/ea/ea-lpc3250devkitv2/ea-lpc3250devkitv2.c @@ -5,7 +5,7 @@ */ #include <init.h> -#include <common.h> +#include <config.h> #include <asm/io.h> #include <asm/global_data.h> diff --git a/board/ea/mx7ulp_com/mx7ulp_com.c b/board/ea/mx7ulp_com/mx7ulp_com.c index cd9591a9e32..8f78937e097 100644 --- a/board/ea/mx7ulp_com/mx7ulp_com.c +++ b/board/ea/mx7ulp_com/mx7ulp_com.c @@ -3,7 +3,6 @@ * Copyright (C) 2016 Freescale Semiconductor, Inc. */ -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c index 3a52e4ae675..2ad256f8635 100644 --- a/board/eets/pdu001/board.c +++ b/board/eets/pdu001/board.c @@ -9,7 +9,7 @@ * Copyright (C) 2011, Texas Instruments, Incorporated - https://www.ti.com/ */ -#include <common.h> +#include <config.h> #include <env.h> #include <errno.h> #include <init.h> diff --git a/board/eets/pdu001/mux.c b/board/eets/pdu001/mux.c index c97927e5cfe..f306a134031 100644 --- a/board/eets/pdu001/mux.c +++ b/board/eets/pdu001/mux.c @@ -7,7 +7,7 @@ * Copyright (C) 2011 Texas Instruments Incorporated - https://www.ti.com/ */ -#include <common.h> +#include <config.h> #include <i2c.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> diff --git a/board/efi/efi-x86_payload/payload.c b/board/efi/efi-x86_payload/payload.c index 5d4492cdc77..d7d1e53e911 100644 --- a/board/efi/efi-x86_payload/payload.c +++ b/board/efi/efi-x86_payload/payload.c @@ -3,7 +3,6 @@ * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> */ -#include <common.h> #include <init.h> #include <usb.h> diff --git a/board/egnite/ethernut5/ethernut5.c b/board/egnite/ethernut5/ethernut5.c index 9953df017e1..64e341c3779 100644 --- a/board/egnite/ethernut5/ethernut5.c +++ b/board/egnite/ethernut5/ethernut5.c @@ -52,7 +52,7 @@ * http://www.ethernut.de/ */ -#include <common.h> +#include <config.h> #include <init.h> #include <net.h> #include <netdev.h> diff --git a/board/egnite/ethernut5/ethernut5_pwrman.c b/board/egnite/ethernut5/ethernut5_pwrman.c index 81f1abf2fad..42e1914a875 100644 --- a/board/egnite/ethernut5/ethernut5_pwrman.c +++ b/board/egnite/ethernut5/ethernut5_pwrman.c @@ -31,8 +31,8 @@ * For additional information visit the project home page at * http://www.ethernut.de/ */ -#include <common.h> #include <command.h> +#include <vsprintf.h> #include <asm/arch/at91sam9260.h> #include <asm/arch/at91_common.h> #include <asm/arch/gpio.h> diff --git a/board/elgin/elgin_rv1108/elgin_rv1108.c b/board/elgin/elgin_rv1108/elgin_rv1108.c index 10398e7f712..9fea4f86d5a 100644 --- a/board/elgin/elgin_rv1108/elgin_rv1108.c +++ b/board/elgin/elgin_rv1108/elgin_rv1108.c @@ -4,7 +4,6 @@ * Authors: Andy Yan <andy.yan@rock-chips.com> */ -#include <common.h> #include <init.h> #include <syscon.h> #include <asm/global_data.h> diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c index a3c23bdfb64..896350140d6 100644 --- a/board/embest/mx6boards/mx6boards.c +++ b/board/embest/mx6boards/mx6boards.c @@ -12,7 +12,6 @@ * Copyright (C) 2013 Jon Nettleton <jon.nettleton@gmail.com>. */ -#include <common.h> #include <init.h> #include <net.h> #include <asm/arch/clock.h> diff --git a/board/emulation/common/qemu_dfu.c b/board/emulation/common/qemu_dfu.c index 7e7d84f6c00..393fcaeb742 100644 --- a/board/emulation/common/qemu_dfu.c +++ b/board/emulation/common/qemu_dfu.c @@ -3,7 +3,6 @@ * Copyright (c) 2020 Linaro Limited */ -#include <common.h> #include <dfu.h> #include <env.h> #include <memalign.h> diff --git a/board/emulation/common/qemu_mtdparts.c b/board/emulation/common/qemu_mtdparts.c index 60212e97acf..c1501276789 100644 --- a/board/emulation/common/qemu_mtdparts.c +++ b/board/emulation/common/qemu_mtdparts.c @@ -3,7 +3,6 @@ * Copyright (c) 2020 Linaro Limited */ -#include <common.h> #include <dm.h> #include <mtd.h> diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c index ecfd19f1a7e..6095cb02b23 100644 --- a/board/emulation/qemu-arm/qemu-arm.c +++ b/board/emulation/qemu-arm/qemu-arm.c @@ -3,7 +3,7 @@ * Copyright (c) 2017 Tuomas Tynkkynen */ -#include <common.h> +#include <config.h> #include <cpu_func.h> #include <dm.h> #include <efi.h> diff --git a/board/emulation/qemu-ppce500/qemu-ppce500.c b/board/emulation/qemu-ppce500/qemu-ppce500.c index 221361691c1..58e5d5eb942 100644 --- a/board/emulation/qemu-ppce500/qemu-ppce500.c +++ b/board/emulation/qemu-ppce500/qemu-ppce500.c @@ -4,7 +4,7 @@ * Copyright (C) 2021, Bin Meng <bmeng.cn@gmail.com> */ -#include <common.h> +#include <config.h> #include <command.h> #include <cpu_func.h> #include <dm.h> diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c index 173245b40e3..e5193e31e37 100644 --- a/board/emulation/qemu-riscv/qemu-riscv.c +++ b/board/emulation/qemu-riscv/qemu-riscv.c @@ -3,7 +3,6 @@ * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> */ -#include <common.h> #include <dm.h> #include <dm/ofnode.h> #include <env.h> diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c index df9149e0d6d..8e0477c7a6e 100644 --- a/board/engicam/common/board.c +++ b/board/engicam/common/board.c @@ -5,7 +5,6 @@ * Author: Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <command.h> #include <env.h> #include <hang.h> diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c index f1ccdc33436..8bc80ee6baa 100644 --- a/board/engicam/common/spl.c +++ b/board/engicam/common/spl.c @@ -5,7 +5,6 @@ * Author: Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <image.h> #include <init.h> #include <serial.h> diff --git a/board/engicam/imx6q/imx6q.c b/board/engicam/imx6q/imx6q.c index e6c888fcfde..d799fe6526a 100644 --- a/board/engicam/imx6q/imx6q.c +++ b/board/engicam/imx6q/imx6q.c @@ -5,7 +5,6 @@ * Author: Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <asm/io.h> #include <asm/gpio.h> diff --git a/board/engicam/imx6ul/imx6ul.c b/board/engicam/imx6ul/imx6ul.c index 412d6c302e8..24d654445db 100644 --- a/board/engicam/imx6ul/imx6ul.c +++ b/board/engicam/imx6ul/imx6ul.c @@ -5,7 +5,6 @@ * Author: Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <mmc.h> #include <asm/io.h> diff --git a/board/engicam/imx8mm/icore_mx8mm.c b/board/engicam/imx8mm/icore_mx8mm.c index 320388faae3..236337546ae 100644 --- a/board/engicam/imx8mm/icore_mx8mm.c +++ b/board/engicam/imx8mm/icore_mx8mm.c @@ -5,7 +5,6 @@ * Author: Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <miiphy.h> #include <netdev.h> diff --git a/board/engicam/imx8mm/lpddr4_timing.c b/board/engicam/imx8mm/lpddr4_timing.c index 821212740bc..fcd45c158f2 100644 --- a/board/engicam/imx8mm/lpddr4_timing.c +++ b/board/engicam/imx8mm/lpddr4_timing.c @@ -6,7 +6,6 @@ * Align with uboot-imx_v2018.03_4.14.78_1.0.0_ga */ -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/engicam/imx8mm/spl.c b/board/engicam/imx8mm/spl.c index af9044a3c2b..d51ae241e85 100644 --- a/board/engicam/imx8mm/spl.c +++ b/board/engicam/imx8mm/spl.c @@ -5,7 +5,6 @@ * Author: Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <hang.h> #include <init.h> #include <log.h> diff --git a/board/engicam/imx8mp/icore_mx8mp.c b/board/engicam/imx8mp/icore_mx8mp.c index 5f820cc8dd7..e2ed70caa43 100644 --- a/board/engicam/imx8mp/icore_mx8mp.c +++ b/board/engicam/imx8mp/icore_mx8mp.c @@ -8,7 +8,6 @@ * Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <env.h> #include <errno.h> #include <init.h> diff --git a/board/engicam/imx8mp/spl.c b/board/engicam/imx8mp/spl.c index 36b83aace39..cd31aa6041d 100644 --- a/board/engicam/imx8mp/spl.c +++ b/board/engicam/imx8mp/spl.c @@ -8,7 +8,6 @@ * Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <hang.h> #include <init.h> #include <log.h> diff --git a/board/engicam/stm32mp1/spl.c b/board/engicam/stm32mp1/spl.c index 2b7779cc01d..bb2bd446aa8 100644 --- a/board/engicam/stm32mp1/spl.c +++ b/board/engicam/stm32mp1/spl.c @@ -5,7 +5,7 @@ * Copyright (C) 2020 Amarula Solutions(India) */ -#include <common.h> +#include <linux/types.h> /* board early initialisation in board_f: need to use global variable */ static u32 opp_voltage_mv __section(".data"); diff --git a/board/engicam/stm32mp1/stm32mp1.c b/board/engicam/stm32mp1/stm32mp1.c index 5223e9bae8d..bc2af66d8e9 100644 --- a/board/engicam/stm32mp1/stm32mp1.c +++ b/board/engicam/stm32mp1/stm32mp1.c @@ -6,7 +6,6 @@ * Author: Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <env.h> #include <env_internal.h> #include <syscon.h> diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c index 9e362104224..dce69abdfd1 100644 --- a/board/esd/meesc/meesc.c +++ b/board/esd/meesc/meesc.c @@ -9,7 +9,7 @@ * esd electronic system design gmbh <www.esd.eu> */ -#include <common.h> +#include <config.h> #include <env.h> #include <init.h> #include <net.h> diff --git a/board/firefly/firefly-rk3288/firefly-rk3288.c b/board/firefly/firefly-rk3288/firefly-rk3288.c index 95d8b00924d..8e67ab4b132 100644 --- a/board/firefly/firefly-rk3288/firefly-rk3288.c +++ b/board/firefly/firefly-rk3288/firefly-rk3288.c @@ -3,7 +3,6 @@ * (C) Copyright 2015 Google, Inc */ -#include <common.h> #include <hang.h> #include <led.h> #include <log.h> diff --git a/board/firefly/firefly-rk3308/roc_cc_rk3308.c b/board/firefly/firefly-rk3308/roc_cc_rk3308.c index af00250e118..404bdc632bb 100644 --- a/board/firefly/firefly-rk3308/roc_cc_rk3308.c +++ b/board/firefly/firefly-rk3308/roc_cc_rk3308.c @@ -3,7 +3,6 @@ * (C) Copyright 2019 Rockchip Electronics Co., Ltd */ -#include <common.h> #include <adc.h> #include <asm/arch-rockchip/grf_rk3308.h> #include <asm/arch-rockchip/hardware.h> diff --git a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c index 590519b32af..a149e4fe822 100644 --- a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c +++ b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c @@ -3,7 +3,6 @@ * (C) Copyright 2016 Rockchip Electronics Co., Ltd */ -#include <common.h> #include <dm.h> #include <env.h> #include <log.h> diff --git a/board/freescale/common/cadmus.c b/board/freescale/common/cadmus.c index e7e07fff86c..6f66ed6851d 100644 --- a/board/freescale/common/cadmus.c +++ b/board/freescale/common/cadmus.c @@ -4,8 +4,9 @@ */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> +#include <linux/types.h> /* * CADMUS Board System Registers diff --git a/board/freescale/common/cds_pci_ft.c b/board/freescale/common/cds_pci_ft.c index dc2d62850d1..56b01e3f51f 100644 --- a/board/freescale/common/cds_pci_ft.c +++ b/board/freescale/common/cds_pci_ft.c @@ -3,7 +3,6 @@ * Copyright 2004 Freescale Semiconductor. */ -#include <common.h> #include <linux/libfdt.h> #include <fdt_support.h> #include "cadmus.h" diff --git a/board/freescale/common/cds_via.c b/board/freescale/common/cds_via.c index 6184472b165..6fc3a21780f 100644 --- a/board/freescale/common/cds_via.c +++ b/board/freescale/common/cds_via.c @@ -3,7 +3,6 @@ * Copyright 2006 Freescale Semiconductor. */ -#include <common.h> #include <pci.h> /* Config the VIA chip */ diff --git a/board/freescale/common/cmd_esbc_validate.c b/board/freescale/common/cmd_esbc_validate.c index 6c096266b48..3344653ba2d 100644 --- a/board/freescale/common/cmd_esbc_validate.c +++ b/board/freescale/common/cmd_esbc_validate.c @@ -3,10 +3,10 @@ * Copyright 2015 Freescale Semiconductor, Inc. */ -#include <common.h> #include <command.h> #include <env.h> #include <fsl_validate.h> +#include <vsprintf.h> int do_esbc_halt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) @@ -63,14 +63,14 @@ static int do_esbc_validate(struct cmd_tbl *cmdtp, int flag, int argc, } /***************************************************/ -static char esbc_validate_help_text[] = +U_BOOT_LONGHELP(esbc_validate, "esbc_validate hdr_addr <hash_val> - Validates signature using\n" " RSA verification\n" " $hdr_addr Address of header of the image\n" " to be validated.\n" " $hash_val -Optional\n" " It provides Hash of public/srk key to be\n" - " used to verify signature.\n"; + " used to verify signature.\n"); U_BOOT_CMD( esbc_validate, 3, 0, do_esbc_validate, diff --git a/board/freescale/common/emc2305.c b/board/freescale/common/emc2305.c index 9a75c5a09dd..50252bb5007 100644 --- a/board/freescale/common/emc2305.c +++ b/board/freescale/common/emc2305.c @@ -4,7 +4,6 @@ * */ -#include <common.h> #include <command.h> #include <i2c.h> #include <asm/global_data.h> diff --git a/board/freescale/common/fman.c b/board/freescale/common/fman.c index 358303108d8..650ecc7b440 100644 --- a/board/freescale/common/fman.c +++ b/board/freescale/common/fman.c @@ -3,7 +3,6 @@ * Copyright 2011-2015 Freescale Semiconductor, Inc. */ -#include <common.h> #include <linux/libfdt.h> #include <linux/libfdt_env.h> #include <fdt_support.h> diff --git a/board/freescale/common/fsl_chain_of_trust.c b/board/freescale/common/fsl_chain_of_trust.c index 87ed814d6a2..27a33924c84 100644 --- a/board/freescale/common/fsl_chain_of_trust.c +++ b/board/freescale/common/fsl_chain_of_trust.c @@ -4,7 +4,7 @@ * Copyright 2022 NXP */ -#include <common.h> +#include <config.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/freescale/common/fsl_validate.c b/board/freescale/common/fsl_validate.c index bfe6357b0d6..e03434dcdfe 100644 --- a/board/freescale/common/fsl_validate.c +++ b/board/freescale/common/fsl_validate.c @@ -4,7 +4,7 @@ * Copyright 2021-2022 NXP */ -#include <common.h> +#include <config.h> #include <dm.h> #include <fsl_validate.h> #include <fsl_secboot_err.h> diff --git a/board/freescale/common/i2c_common.c b/board/freescale/common/i2c_common.c index 119ed3c6171..20705ecc8e4 100644 --- a/board/freescale/common/i2c_common.c +++ b/board/freescale/common/i2c_common.c @@ -5,7 +5,7 @@ * Copyright 2021 Microsoft Corporation */ -#include <common.h> +#include <stdio.h> #include <i2c.h> #include "i2c_common.h" diff --git a/board/freescale/common/i2c_mux.c b/board/freescale/common/i2c_mux.c index d40b34f1039..89151ccaf06 100644 --- a/board/freescale/common/i2c_mux.c +++ b/board/freescale/common/i2c_mux.c @@ -5,8 +5,9 @@ * Copyright 2021 Microsoft Corporation */ -#include <common.h> +#include <config.h> #include <i2c.h> +#include <stdio.h> #include "i2c_common.h" #include "i2c_mux.h" diff --git a/board/freescale/common/ics307_clk.c b/board/freescale/common/ics307_clk.c index 5f95571d24c..af30faa0c5f 100644 --- a/board/freescale/common/ics307_clk.c +++ b/board/freescale/common/ics307_clk.c @@ -3,7 +3,7 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <log.h> #include <asm/io.h> diff --git a/board/freescale/common/ls102xa_stream_id.c b/board/freescale/common/ls102xa_stream_id.c index f754cf42fd3..bf76274c43c 100644 --- a/board/freescale/common/ls102xa_stream_id.c +++ b/board/freescale/common/ls102xa_stream_id.c @@ -3,7 +3,7 @@ * Copyright 2014 Freescale Semiconductor */ -#include <common.h> +#include <config.h> #include <asm/io.h> #include <asm/arch/ls102xa_stream_id.h> diff --git a/board/freescale/common/mc34vr500.c b/board/freescale/common/mc34vr500.c index d6b4c65a3c0..cf14b29a3ec 100644 --- a/board/freescale/common/mc34vr500.c +++ b/board/freescale/common/mc34vr500.c @@ -4,7 +4,6 @@ * Hou Zhiqiang <Zhiqiang.Hou@freescale.com> */ -#include <common.h> #include <errno.h> #include <i2c.h> #include <log.h> diff --git a/board/freescale/common/mmc.c b/board/freescale/common/mmc.c index 8cd5079f962..00e4f3675fe 100644 --- a/board/freescale/common/mmc.c +++ b/board/freescale/common/mmc.c @@ -4,8 +4,8 @@ * Copyright 2018-2022 NXP */ -#include <common.h> #include <command.h> +#include <vsprintf.h> #include <asm/arch/sys_proto.h> #include <linux/errno.h> #include <asm/io.h> diff --git a/board/freescale/common/ngpixis.c b/board/freescale/common/ngpixis.c index 7be1ccee638..74c345807e6 100644 --- a/board/freescale/common/ngpixis.c +++ b/board/freescale/common/ngpixis.c @@ -29,7 +29,6 @@ * boot from the alternate bank. */ -#include <common.h> #include <command.h> #include <asm/io.h> diff --git a/board/freescale/common/ns_access.c b/board/freescale/common/ns_access.c index a95d15c1ef3..c46e87f4cce 100644 --- a/board/freescale/common/ns_access.c +++ b/board/freescale/common/ns_access.c @@ -3,7 +3,7 @@ * Copyright 2014 Freescale Semiconductor */ -#include <common.h> +#include <config.h> #include <log.h> #include <asm/cache.h> #include <asm/io.h> diff --git a/board/freescale/common/p_corenet/law.c b/board/freescale/common/p_corenet/law.c index 1a1e9343d23..83818d6d847 100644 --- a/board/freescale/common/p_corenet/law.c +++ b/board/freescale/common/p_corenet/law.c @@ -6,7 +6,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <asm/fsl_law.h> #include <asm/mmu.h> diff --git a/board/freescale/common/p_corenet/tlb.c b/board/freescale/common/p_corenet/tlb.c index 1a2d9cbfc0c..cebdedfa4a7 100644 --- a/board/freescale/common/p_corenet/tlb.c +++ b/board/freescale/common/p_corenet/tlb.c @@ -6,8 +6,9 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <asm/mmu.h> +#include <asm/ppc.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ diff --git a/board/freescale/common/pfuze.c b/board/freescale/common/pfuze.c index a9288820b2e..0d7a94fd232 100644 --- a/board/freescale/common/pfuze.c +++ b/board/freescale/common/pfuze.c @@ -3,7 +3,6 @@ * Copyright 2014 Freescale Semiconductor, Inc. */ -#include <common.h> #include <errno.h> #include <power/pmic.h> #include <power/pfuze100_pmic.h> diff --git a/board/freescale/common/qixis.c b/board/freescale/common/qixis.c index da2c1de078b..6400ac05245 100644 --- a/board/freescale/common/qixis.c +++ b/board/freescale/common/qixis.c @@ -7,7 +7,7 @@ * This file provides support for the QIXIS of some Freescale reference boards. */ -#include <common.h> +#include <config.h> #include <command.h> #include <asm/io.h> #include <linux/compiler.h> diff --git a/board/freescale/common/sdhc_boot.c b/board/freescale/common/sdhc_boot.c index a1c7a94a90e..5ee730cefd0 100644 --- a/board/freescale/common/sdhc_boot.c +++ b/board/freescale/common/sdhc_boot.c @@ -3,7 +3,6 @@ * Copyright 2011 Freescale Semiconductor, Inc. */ -#include <common.h> #include <mmc.h> #include <malloc.h> diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c index 64139d4659f..ec3c9e37222 100644 --- a/board/freescale/common/sys_eeprom.c +++ b/board/freescale/common/sys_eeprom.c @@ -6,7 +6,6 @@ * Timur Tabi (timur@freescale.com) */ -#include <common.h> #include <command.h> #include <env.h> #include <i2c.h> diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index fc5d400cfe1..84cb43fad56 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -5,12 +5,13 @@ * Copyright 2020 Stephen Carlson <stcarlso@linux.microsoft.com> */ -#include <common.h> +#include <config.h> #include <command.h> #include <env.h> #include <i2c.h> #include <irq_func.h> #include <log.h> +#include <vsprintf.h> #include <asm/io.h> #ifdef CONFIG_FSL_LSCH2 #include <asm/arch/immap_lsch2.h> diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.c b/board/freescale/imx8mm_evk/imx8mm_evk.c index e0975fcda70..4c4436af3b1 100644 --- a/board/freescale/imx8mm_evk/imx8mm_evk.c +++ b/board/freescale/imx8mm_evk/imx8mm_evk.c @@ -3,7 +3,6 @@ * Copyright 2018 NXP */ -#include <common.h> #include <env.h> #include <init.h> #include <miiphy.h> diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c index 35437811d9d..cd251d274ff 100644 --- a/board/freescale/imx8mm_evk/spl.c +++ b/board/freescale/imx8mm_evk/spl.c @@ -3,7 +3,6 @@ * Copyright 2019, 2021 NXP */ -#include <common.h> #include <command.h> #include <cpu_func.h> #include <hang.h> diff --git a/board/freescale/imx8mn_evk/imx8mn_evk.c b/board/freescale/imx8mn_evk/imx8mn_evk.c index e35d505aea9..6b6fb0a7dd2 100644 --- a/board/freescale/imx8mn_evk/imx8mn_evk.c +++ b/board/freescale/imx8mn_evk/imx8mn_evk.c @@ -3,7 +3,6 @@ * Copyright 2019 NXP */ -#include <common.h> #include <env.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c index dd54fa9b608..231b9289eea 100644 --- a/board/freescale/imx8mn_evk/spl.c +++ b/board/freescale/imx8mn_evk/spl.c @@ -4,7 +4,6 @@ * */ -#include <common.h> #include <command.h> #include <cpu_func.h> #include <hang.h> diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c index 9dd2cbc799c..12da1b2abfb 100644 --- a/board/freescale/imx8mp_evk/spl.c +++ b/board/freescale/imx8mp_evk/spl.c @@ -4,7 +4,6 @@ * */ -#include <common.h> #include <hang.h> #include <init.h> #include <log.h> diff --git a/board/freescale/imx8mq_evk/imx8mq_evk.c b/board/freescale/imx8mq_evk/imx8mq_evk.c index e577e4d9cca..ab920a4539c 100644 --- a/board/freescale/imx8mq_evk/imx8mq_evk.c +++ b/board/freescale/imx8mq_evk/imx8mq_evk.c @@ -3,7 +3,6 @@ * Copyright 2018 NXP */ -#include <common.h> #include <env.h> #include <init.h> #include <malloc.h> diff --git a/board/freescale/imx8mq_evk/lpddr4_timing.c b/board/freescale/imx8mq_evk/lpddr4_timing.c index 46bc7f8591c..e9559e3d843 100644 --- a/board/freescale/imx8mq_evk/lpddr4_timing.c +++ b/board/freescale/imx8mq_evk/lpddr4_timing.c @@ -4,7 +4,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/freescale/imx8mq_evk/lpddr4_timing_b0.c b/board/freescale/imx8mq_evk/lpddr4_timing_b0.c index ec68edaf690..5d8f2803be6 100644 --- a/board/freescale/imx8mq_evk/lpddr4_timing_b0.c +++ b/board/freescale/imx8mq_evk/lpddr4_timing_b0.c @@ -4,7 +4,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c index 818cdd615eb..a346305c863 100644 --- a/board/freescale/imx8mq_evk/spl.c +++ b/board/freescale/imx8mq_evk/spl.c @@ -4,7 +4,7 @@ * */ -#include <common.h> +#include <config.h> #include <hang.h> #include <image.h> #include <init.h> diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c index 2b209c8886f..72527f774ca 100644 --- a/board/freescale/imx8qm_mek/imx8qm_mek.c +++ b/board/freescale/imx8qm_mek/imx8qm_mek.c @@ -3,7 +3,6 @@ * Copyright 2018 NXP */ -#include <common.h> #include <cpu_func.h> #include <env.h> #include <errno.h> diff --git a/board/freescale/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c index 17fd437116d..ad786833309 100644 --- a/board/freescale/imx8qm_mek/spl.c +++ b/board/freescale/imx8qm_mek/spl.c @@ -4,7 +4,6 @@ * */ -#include <common.h> #include <dm.h> #include <image.h> #include <init.h> diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c index 833bee55462..adb9556a021 100644 --- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c +++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c @@ -3,7 +3,6 @@ * Copyright 2018 NXP */ -#include <common.h> #include <cpu_func.h> #include <env.h> #include <errno.h> diff --git a/board/freescale/imx8qxp_mek/spl.c b/board/freescale/imx8qxp_mek/spl.c index 462c43ceebc..05e3c0a2ff2 100644 --- a/board/freescale/imx8qxp_mek/spl.c +++ b/board/freescale/imx8qxp_mek/spl.c @@ -4,7 +4,6 @@ * */ -#include <common.h> #include <dm.h> #include <image.h> #include <init.h> diff --git a/board/freescale/imx8ulp_evk/imx8ulp_evk.c b/board/freescale/imx8ulp_evk/imx8ulp_evk.c index dd04d5925a0..0af61067263 100644 --- a/board/freescale/imx8ulp_evk/imx8ulp_evk.c +++ b/board/freescale/imx8ulp_evk/imx8ulp_evk.c @@ -3,7 +3,6 @@ * Copyright 2020 NXP */ -#include <common.h> #include <miiphy.h> #include <netdev.h> #include <asm/arch/imx8ulp-pins.h> diff --git a/board/freescale/imx8ulp_evk/spl.c b/board/freescale/imx8ulp_evk/spl.c index c49b5be4762..d123b21b722 100644 --- a/board/freescale/imx8ulp_evk/spl.c +++ b/board/freescale/imx8ulp_evk/spl.c @@ -3,7 +3,6 @@ * Copyright 2021 NXP */ -#include <common.h> #include <init.h> #include <spl.h> #include <asm/io.h> diff --git a/board/freescale/imx93_evk/imx93_evk.c b/board/freescale/imx93_evk/imx93_evk.c index c54dc9d05c5..341831a7d30 100644 --- a/board/freescale/imx93_evk/imx93_evk.c +++ b/board/freescale/imx93_evk/imx93_evk.c @@ -3,7 +3,6 @@ * Copyright 2022 NXP */ -#include <common.h> #include <env.h> #include <init.h> #include <miiphy.h> diff --git a/board/freescale/imx93_evk/spl.c b/board/freescale/imx93_evk/spl.c index 6d5e110b277..e5807134bb2 100644 --- a/board/freescale/imx93_evk/spl.c +++ b/board/freescale/imx93_evk/spl.c @@ -3,7 +3,6 @@ * Copyright 2022 NXP */ -#include <common.h> #include <command.h> #include <cpu_func.h> #include <hang.h> diff --git a/board/freescale/imxrt1020-evk/imxrt1020-evk.c b/board/freescale/imxrt1020-evk/imxrt1020-evk.c index 785da604b96..42a0a67ae93 100644 --- a/board/freescale/imxrt1020-evk/imxrt1020-evk.c +++ b/board/freescale/imxrt1020-evk/imxrt1020-evk.c @@ -4,7 +4,6 @@ * Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com> */ -#include <common.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/freescale/imxrt1050-evk/imxrt1050-evk.c b/board/freescale/imxrt1050-evk/imxrt1050-evk.c index 4cc3defc882..46a644908e9 100644 --- a/board/freescale/imxrt1050-evk/imxrt1050-evk.c +++ b/board/freescale/imxrt1050-evk/imxrt1050-evk.c @@ -4,7 +4,6 @@ * Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com> */ -#include <common.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/freescale/imxrt1170-evk/imxrt1170-evk.c b/board/freescale/imxrt1170-evk/imxrt1170-evk.c index 4b82ee5e9ce..e10b8830ec6 100644 --- a/board/freescale/imxrt1170-evk/imxrt1170-evk.c +++ b/board/freescale/imxrt1170-evk/imxrt1170-evk.c @@ -4,7 +4,6 @@ * Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com> */ -#include <common.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/freescale/ls1012afrdm/eth.c b/board/freescale/ls1012afrdm/eth.c index d2df9351eac..c431e5e611b 100644 --- a/board/freescale/ls1012afrdm/eth.c +++ b/board/freescale/ls1012afrdm/eth.c @@ -4,7 +4,6 @@ * Copyright 2017 NXP */ -#include <common.h> #include <dm.h> #include <net.h> #include <asm/io.h> diff --git a/board/freescale/ls1012afrdm/ls1012afrdm.c b/board/freescale/ls1012afrdm/ls1012afrdm.c index 271072bf7a1..dae2cf097bc 100644 --- a/board/freescale/ls1012afrdm/ls1012afrdm.c +++ b/board/freescale/ls1012afrdm/ls1012afrdm.c @@ -3,7 +3,7 @@ * Copyright 2017-2018, 2021 NXP */ -#include <common.h> +#include <config.h> #include <fdt_support.h> #include <i2c.h> #include <asm/cache.h> diff --git a/board/freescale/ls1012aqds/eth.c b/board/freescale/ls1012aqds/eth.c index 38267acedde..d5e87c5393b 100644 --- a/board/freescale/ls1012aqds/eth.c +++ b/board/freescale/ls1012aqds/eth.c @@ -4,7 +4,7 @@ * Copyright 2017 NXP */ -#include <common.h> +#include <config.h> #include <dm.h> #include <asm/io.h> #include <netdev.h> diff --git a/board/freescale/ls1012aqds/ls1012aqds.c b/board/freescale/ls1012aqds/ls1012aqds.c index a5ea8d634ed..7d56eb0117d 100644 --- a/board/freescale/ls1012aqds/ls1012aqds.c +++ b/board/freescale/ls1012aqds/ls1012aqds.c @@ -4,7 +4,7 @@ * Copyright 2021 NXP */ -#include <common.h> +#include <config.h> #include <i2c.h> #include <fdt_support.h> #include <asm/cache.h> diff --git a/board/freescale/ls1012ardb/eth.c b/board/freescale/ls1012ardb/eth.c index 5c661274987..71cb2988a56 100644 --- a/board/freescale/ls1012ardb/eth.c +++ b/board/freescale/ls1012ardb/eth.c @@ -4,7 +4,7 @@ * Copyright 2017 NXP */ -#include <common.h> +#include <config.h> #include <dm.h> #include <net.h> #include <asm/io.h> diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c index 18f92089cae..7f8001b4981 100644 --- a/board/freescale/ls1012ardb/ls1012ardb.c +++ b/board/freescale/ls1012ardb/ls1012ardb.c @@ -4,7 +4,7 @@ * Copyright 2021 NXP */ -#include <common.h> +#include <config.h> #include <command.h> #include <fdt_support.h> #include <hang.h> diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c index d6f22bd6a2a..7abc4126933 100644 --- a/board/freescale/ls1021aiot/ls1021aiot.c +++ b/board/freescale/ls1021aiot/ls1021aiot.c @@ -4,7 +4,7 @@ * Copyright 2021 NXP */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <fdt_support.h> #include <init.h> diff --git a/board/freescale/ls1021aqds/ddr.c b/board/freescale/ls1021aqds/ddr.c index 4e70acc5a0c..5b0f23688f0 100644 --- a/board/freescale/ls1021aqds/ddr.c +++ b/board/freescale/ls1021aqds/ddr.c @@ -3,7 +3,7 @@ * Copyright 2014 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <init.h> diff --git a/board/freescale/ls1028a/ddr.c b/board/freescale/ls1028a/ddr.c index 3e976da6b30..c406f2436d1 100644 --- a/board/freescale/ls1028a/ddr.c +++ b/board/freescale/ls1028a/ddr.c @@ -3,7 +3,6 @@ * Copyright 2019 NXP */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <asm/global_data.h> diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c index 7f181ab3dfb..e01b5a8c2eb 100644 --- a/board/freescale/ls1028a/ls1028a.c +++ b/board/freescale/ls1028a/ls1028a.c @@ -3,7 +3,7 @@ * Copyright 2019-2022 NXP */ -#include <common.h> +#include <config.h> #include <display_options.h> #include <init.h> #include <malloc.h> diff --git a/board/freescale/ls1043aqds/ddr.c b/board/freescale/ls1043aqds/ddr.c index 23947bdb84c..2a9717df616 100644 --- a/board/freescale/ls1043aqds/ddr.c +++ b/board/freescale/ls1043aqds/ddr.c @@ -3,7 +3,6 @@ * Copyright 2015 Freescale Semiconductor, Inc. */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #ifdef CONFIG_FSL_DEEP_SLEEP diff --git a/board/freescale/ls1043aqds/eth.c b/board/freescale/ls1043aqds/eth.c index cd1f83e3d06..5a8ca27b327 100644 --- a/board/freescale/ls1043aqds/eth.c +++ b/board/freescale/ls1043aqds/eth.c @@ -4,7 +4,7 @@ * Copyright 2019 NXP */ -#include <common.h> +#include <config.h> #include <log.h> #include <net.h> #include <asm/io.h> diff --git a/board/freescale/ls1043aqds/ls1043aqds.c b/board/freescale/ls1043aqds/ls1043aqds.c index b87da41e408..fdf011efc5b 100644 --- a/board/freescale/ls1043aqds/ls1043aqds.c +++ b/board/freescale/ls1043aqds/ls1043aqds.c @@ -4,7 +4,7 @@ * Copyright 2019-2020 NXP */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <i2c.h> #include <fdt_support.h> diff --git a/board/freescale/ls1043ardb/cpld.c b/board/freescale/ls1043ardb/cpld.c index 9db3aa58605..bda2f3ac3a6 100644 --- a/board/freescale/ls1043ardb/cpld.c +++ b/board/freescale/ls1043ardb/cpld.c @@ -5,7 +5,7 @@ * Freescale LS1043ARDB board-specific CPLD controlling supports. */ -#include <common.h> +#include <config.h> #include <command.h> #include <asm/io.h> #include "cpld.h" diff --git a/board/freescale/ls1043ardb/ddr.c b/board/freescale/ls1043ardb/ddr.c index 4d2fce38412..187925e981a 100644 --- a/board/freescale/ls1043ardb/ddr.c +++ b/board/freescale/ls1043ardb/ddr.c @@ -3,7 +3,6 @@ * Copyright 2015 Freescale Semiconductor, Inc. */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <asm/global_data.h> diff --git a/board/freescale/ls1043ardb/eth.c b/board/freescale/ls1043ardb/eth.c index cc95214c4e3..cacc49c0584 100644 --- a/board/freescale/ls1043ardb/eth.c +++ b/board/freescale/ls1043ardb/eth.c @@ -2,7 +2,7 @@ /* * Copyright 2015 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <net.h> #include <asm/io.h> #include <netdev.h> diff --git a/board/freescale/ls1046afrwy/ddr.c b/board/freescale/ls1046afrwy/ddr.c index 256397b52b6..b08caee1d97 100644 --- a/board/freescale/ls1046afrwy/ddr.c +++ b/board/freescale/ls1046afrwy/ddr.c @@ -3,7 +3,6 @@ * Copyright 2019 NXP */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <asm/global_data.h> diff --git a/board/freescale/ls1046afrwy/eth.c b/board/freescale/ls1046afrwy/eth.c index d1a2bfe1885..8efc7f68424 100644 --- a/board/freescale/ls1046afrwy/eth.c +++ b/board/freescale/ls1046afrwy/eth.c @@ -2,7 +2,7 @@ /* * Copyright 2019 NXP */ -#include <common.h> +#include <config.h> #include <fdt_support.h> #include <net.h> #include <asm/io.h> diff --git a/board/freescale/ls1046afrwy/ls1046afrwy.c b/board/freescale/ls1046afrwy/ls1046afrwy.c index 899c22a367e..8889c24f1f0 100644 --- a/board/freescale/ls1046afrwy/ls1046afrwy.c +++ b/board/freescale/ls1046afrwy/ls1046afrwy.c @@ -3,7 +3,7 @@ * Copyright 2019, 2021 NXP */ -#include <common.h> +#include <config.h> #include <i2c.h> #include <fdt_support.h> #include <init.h> diff --git a/board/freescale/ls1046aqds/ddr.c b/board/freescale/ls1046aqds/ddr.c index 9a96de27178..ac1b6049721 100644 --- a/board/freescale/ls1046aqds/ddr.c +++ b/board/freescale/ls1046aqds/ddr.c @@ -3,7 +3,6 @@ * Copyright 2016 Freescale Semiconductor, Inc. */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #ifdef CONFIG_FSL_DEEP_SLEEP diff --git a/board/freescale/ls1046aqds/eth.c b/board/freescale/ls1046aqds/eth.c index bbf8b8c2bee..cd3500c2e96 100644 --- a/board/freescale/ls1046aqds/eth.c +++ b/board/freescale/ls1046aqds/eth.c @@ -4,7 +4,7 @@ * Copyright 2018-2020 NXP */ -#include <common.h> +#include <config.h> #include <log.h> #include <net.h> #include <asm/io.h> diff --git a/board/freescale/ls1046aqds/ls1046aqds.c b/board/freescale/ls1046aqds/ls1046aqds.c index 2faac54a0e2..a83b2170651 100644 --- a/board/freescale/ls1046aqds/ls1046aqds.c +++ b/board/freescale/ls1046aqds/ls1046aqds.c @@ -4,7 +4,7 @@ * Copyright 2019-2021 NXP */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <i2c.h> #include <fdt_support.h> diff --git a/board/freescale/ls1046ardb/cpld.c b/board/freescale/ls1046ardb/cpld.c index ee19d4ff8aa..7f8ca2e857f 100644 --- a/board/freescale/ls1046ardb/cpld.c +++ b/board/freescale/ls1046ardb/cpld.c @@ -5,7 +5,7 @@ * Freescale LS1046ARDB board-specific CPLD controlling supports. */ -#include <common.h> +#include <config.h> #include <command.h> #include <asm/io.h> #include "cpld.h" diff --git a/board/freescale/ls1046ardb/ddr.c b/board/freescale/ls1046ardb/ddr.c index befb556bd30..68353022e7d 100644 --- a/board/freescale/ls1046ardb/ddr.c +++ b/board/freescale/ls1046ardb/ddr.c @@ -3,7 +3,6 @@ * Copyright 2016 Freescale Semiconductor, Inc. */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <asm/global_data.h> diff --git a/board/freescale/ls1046ardb/eth.c b/board/freescale/ls1046ardb/eth.c index bbc22a3cdf4..fee8e0e21d4 100644 --- a/board/freescale/ls1046ardb/eth.c +++ b/board/freescale/ls1046ardb/eth.c @@ -2,7 +2,7 @@ /* * Copyright 2016 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <fdt_support.h> #include <net.h> #include <asm/io.h> diff --git a/board/freescale/ls1046ardb/ls1046ardb.c b/board/freescale/ls1046ardb/ls1046ardb.c index 26e69db55f7..0492f0a8c0a 100644 --- a/board/freescale/ls1046ardb/ls1046ardb.c +++ b/board/freescale/ls1046ardb/ls1046ardb.c @@ -4,7 +4,7 @@ * Copyright 2021 NXP */ -#include <common.h> +#include <config.h> #include <i2c.h> #include <fdt_support.h> #include <init.h> diff --git a/board/freescale/ls1088a/ddr.c b/board/freescale/ls1088a/ddr.c index 9e0941cc9d6..d2e239c4d61 100644 --- a/board/freescale/ls1088a/ddr.c +++ b/board/freescale/ls1088a/ddr.c @@ -3,7 +3,6 @@ * Copyright 2017 NXP */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <log.h> diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c index 98a91c48adb..58951f2bb2a 100644 --- a/board/freescale/ls1088a/ls1088a.c +++ b/board/freescale/ls1088a/ls1088a.c @@ -2,7 +2,7 @@ /* * Copyright 2017-2022 NXP */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <display_options.h> #include <env.h> diff --git a/board/freescale/ls2080aqds/ddr.c b/board/freescale/ls2080aqds/ddr.c index 2767d058cc9..2986ffb7a82 100644 --- a/board/freescale/ls2080aqds/ddr.c +++ b/board/freescale/ls2080aqds/ddr.c @@ -3,7 +3,6 @@ * Copyright 2015 Freescale Semiconductor, Inc. */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <log.h> diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c index 5c94c83121b..4c8d0706688 100644 --- a/board/freescale/ls2080aqds/ls2080aqds.c +++ b/board/freescale/ls2080aqds/ls2080aqds.c @@ -3,7 +3,7 @@ * Copyright 2015 Freescale Semiconductor * Copyright 2021 NXP */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <display_options.h> #include <env.h> diff --git a/board/freescale/ls2080ardb/ddr.c b/board/freescale/ls2080ardb/ddr.c index 07fa8473332..ec34b42e619 100644 --- a/board/freescale/ls2080ardb/ddr.c +++ b/board/freescale/ls2080ardb/ddr.c @@ -3,7 +3,6 @@ * Copyright 2015 Freescale Semiconductor, Inc. */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <log.h> diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index 5c30de83d84..6f824f57c47 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -3,7 +3,7 @@ * Copyright 2015 Freescale Semiconductor * Copyright 2017, 2021 NXP */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <display_options.h> #include <env.h> diff --git a/board/freescale/lx2160a/ddr.c b/board/freescale/lx2160a/ddr.c index 7ab7a9e6ca8..637e43a22be 100644 --- a/board/freescale/lx2160a/ddr.c +++ b/board/freescale/lx2160a/ddr.c @@ -3,7 +3,6 @@ * Copyright 2018 NXP */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <asm/global_data.h> diff --git a/board/freescale/lx2160a/eth_lx2160ardb.c b/board/freescale/lx2160a/eth_lx2160ardb.c index c5dfefe1f34..90e7c9100e1 100644 --- a/board/freescale/lx2160a/eth_lx2160ardb.c +++ b/board/freescale/lx2160a/eth_lx2160ardb.c @@ -4,7 +4,6 @@ * */ -#include <common.h> #include <netdev.h> #include <exports.h> #include <fsl-mc/fsl_mc.h> diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index b3187a14214..3aa984dab8e 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -3,7 +3,7 @@ * Copyright 2018-2021 NXP */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <display_options.h> #include <dm.h> diff --git a/board/freescale/m5208evbe/m5208evbe.c b/board/freescale/m5208evbe/m5208evbe.c index 6125c9e13aa..b202b8094d9 100644 --- a/board/freescale/m5208evbe/m5208evbe.c +++ b/board/freescale/m5208evbe/m5208evbe.c @@ -8,7 +8,6 @@ */ #include <config.h> -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/immap.h> diff --git a/board/freescale/m5235evb/m5235evb.c b/board/freescale/m5235evb/m5235evb.c index 44161a0b0a1..65cde56fb2d 100644 --- a/board/freescale/m5235evb/m5235evb.c +++ b/board/freescale/m5235evb/m5235evb.c @@ -8,7 +8,6 @@ */ #include <config.h> -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/immap.h> diff --git a/board/freescale/m5249evb/m5249evb.c b/board/freescale/m5249evb/m5249evb.c index d67db24d588..717dc087e02 100644 --- a/board/freescale/m5249evb/m5249evb.c +++ b/board/freescale/m5249evb/m5249evb.c @@ -4,7 +4,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <command.h> #include <init.h> #include <malloc.h> diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c index eeb9cfd3125..334518a4bc9 100644 --- a/board/freescale/m5253demo/flash.c +++ b/board/freescale/m5253demo/flash.c @@ -7,10 +7,11 @@ * TsiChung Liew (Tsi-Chung.Liew@freescale.com) */ -#include <common.h> +#include <config.h> #include <flash.h> #include <init.h> #include <irq_func.h> +#include <time.h> #include <asm/immap.h> diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c index c1cff52fb3d..d0b01f81745 100644 --- a/board/freescale/m5253demo/m5253demo.c +++ b/board/freescale/m5253demo/m5253demo.c @@ -7,7 +7,7 @@ * Hayden Fraser (Hayden.Fraser@freescale.com) */ -#include <common.h> +#include <config.h> #include <init.h> #include <net.h> #include <asm/global_data.h> diff --git a/board/freescale/m5272c3/m5272c3.c b/board/freescale/m5272c3/m5272c3.c index 3c20a23385c..d1286badc61 100644 --- a/board/freescale/m5272c3/m5272c3.c +++ b/board/freescale/m5272c3/m5272c3.c @@ -6,7 +6,7 @@ * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved. */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/immap.h> diff --git a/board/freescale/m5275evb/m5275evb.c b/board/freescale/m5275evb/m5275evb.c index 00fa35ca5f7..e1d94fc9a3e 100644 --- a/board/freescale/m5275evb/m5275evb.c +++ b/board/freescale/m5275evb/m5275evb.c @@ -8,7 +8,7 @@ * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved. */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/immap.h> diff --git a/board/freescale/m5282evb/m5282evb.c b/board/freescale/m5282evb/m5282evb.c index 53e0f202101..81da6e2abd4 100644 --- a/board/freescale/m5282evb/m5282evb.c +++ b/board/freescale/m5282evb/m5282evb.c @@ -4,7 +4,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/immap.h> diff --git a/board/freescale/m53017evb/m53017evb.c b/board/freescale/m53017evb/m53017evb.c index 76ebc0ab8dc..196d56dc17d 100644 --- a/board/freescale/m53017evb/m53017evb.c +++ b/board/freescale/m53017evb/m53017evb.c @@ -8,7 +8,6 @@ */ #include <config.h> -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/immap.h> diff --git a/board/freescale/m5329evb/m5329evb.c b/board/freescale/m5329evb/m5329evb.c index b278dbfb485..26d5f3bf58c 100644 --- a/board/freescale/m5329evb/m5329evb.c +++ b/board/freescale/m5329evb/m5329evb.c @@ -8,7 +8,6 @@ */ #include <config.h> -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/immap.h> diff --git a/board/freescale/m5329evb/nand.c b/board/freescale/m5329evb/nand.c index d921eef8b67..a250d61ef36 100644 --- a/board/freescale/m5329evb/nand.c +++ b/board/freescale/m5329evb/nand.c @@ -8,7 +8,6 @@ */ #include <config.h> -#include <common.h> #include <asm/io.h> #include <asm/immap.h> diff --git a/board/freescale/m5373evb/m5373evb.c b/board/freescale/m5373evb/m5373evb.c index 0e9eec316c2..d6fdf41bab4 100644 --- a/board/freescale/m5373evb/m5373evb.c +++ b/board/freescale/m5373evb/m5373evb.c @@ -8,7 +8,6 @@ */ #include <config.h> -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/immap.h> diff --git a/board/freescale/m5373evb/nand.c b/board/freescale/m5373evb/nand.c index 6d825a66e33..e7c08d22e6b 100644 --- a/board/freescale/m5373evb/nand.c +++ b/board/freescale/m5373evb/nand.c @@ -8,7 +8,6 @@ */ #include <config.h> -#include <common.h> #include <asm/io.h> #include <asm/immap.h> diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c index 97884a39796..55299745a3c 100644 --- a/board/freescale/mpc837xerdb/mpc837xerdb.c +++ b/board/freescale/mpc837xerdb/mpc837xerdb.c @@ -5,7 +5,7 @@ * Joe D'Abbraccio <joe.d'abbraccio@freescale.com> */ -#include <common.h> +#include <config.h> #include <env.h> #include <hwconfig.h> #include <i2c.h> diff --git a/board/freescale/mpc8548cds/ddr.c b/board/freescale/mpc8548cds/ddr.c index b6c1847b141..14202cd5a78 100644 --- a/board/freescale/mpc8548cds/ddr.c +++ b/board/freescale/mpc8548cds/ddr.c @@ -3,7 +3,6 @@ * Copyright 2008 Freescale Semiconductor, Inc. */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> diff --git a/board/freescale/mpc8548cds/law.c b/board/freescale/mpc8548cds/law.c index 7b6ef5b11c9..2334870fda0 100644 --- a/board/freescale/mpc8548cds/law.c +++ b/board/freescale/mpc8548cds/law.c @@ -6,7 +6,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <asm/fsl_law.h> #include <asm/mmu.h> diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c index ec6e3a2d0ab..7810010fd04 100644 --- a/board/freescale/mpc8548cds/mpc8548cds.c +++ b/board/freescale/mpc8548cds/mpc8548cds.c @@ -5,7 +5,7 @@ * (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.com> */ -#include <common.h> +#include <config.h> #include <display_options.h> #include <init.h> #include <net.h> diff --git a/board/freescale/mpc8548cds/tlb.c b/board/freescale/mpc8548cds/tlb.c index 994a32dd92a..0b2afa8054d 100644 --- a/board/freescale/mpc8548cds/tlb.c +++ b/board/freescale/mpc8548cds/tlb.c @@ -6,8 +6,9 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <asm/mmu.h> +#include <asm/ppc.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ diff --git a/board/freescale/mx23evk/mx23evk.c b/board/freescale/mx23evk/mx23evk.c index df4fb391255..fbc8fbdbf59 100644 --- a/board/freescale/mx23evk/mx23evk.c +++ b/board/freescale/mx23evk/mx23evk.c @@ -11,7 +11,6 @@ * on behalf of DENX Software Engineering GmbH */ -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/gpio.h> diff --git a/board/freescale/mx23evk/spl_boot.c b/board/freescale/mx23evk/spl_boot.c index 14e9b4a8634..a4c39a35221 100644 --- a/board/freescale/mx23evk/spl_boot.c +++ b/board/freescale/mx23evk/spl_boot.c @@ -6,7 +6,6 @@ * on behalf of DENX Software Engineering GmbH */ -#include <common.h> #include <config.h> #include <asm/io.h> #include <asm/arch/iomux-mx23.h> diff --git a/board/freescale/mx28evk/iomux.c b/board/freescale/mx28evk/iomux.c index cc0c8588544..b84b045bd1f 100644 --- a/board/freescale/mx28evk/iomux.c +++ b/board/freescale/mx28evk/iomux.c @@ -6,7 +6,6 @@ * on behalf of DENX Software Engineering GmbH */ -#include <common.h> #include <config.h> #include <asm/io.h> #include <asm/arch/iomux-mx28.h> diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c index 88c3bf36089..ada572912da 100644 --- a/board/freescale/mx28evk/mx28evk.c +++ b/board/freescale/mx28evk/mx28evk.c @@ -11,7 +11,6 @@ * on behalf of DENX Software Engineering GmbH */ -#include <common.h> #include <init.h> #include <net.h> #include <asm/global_data.h> diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index 95edb359944..69456842302 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -3,7 +3,7 @@ * (C) Copyright 2009 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index d418cd8f4c0..2d8f5da9906 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -4,7 +4,7 @@ * Jason Liu <r64343@freescale.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <log.h> #include <asm/global_data.h> diff --git a/board/freescale/mx6memcal/mx6memcal.c b/board/freescale/mx6memcal/mx6memcal.c index 0dfd7dec9ef..17095c34e92 100644 --- a/board/freescale/mx6memcal/mx6memcal.c +++ b/board/freescale/mx6memcal/mx6memcal.c @@ -7,7 +7,6 @@ * Author: Eric Nelson <eric@nelint.com> */ -#include <common.h> #include <init.h> #include <asm/arch/sys_proto.h> #include <asm/global_data.h> diff --git a/board/freescale/mx6memcal/spl.c b/board/freescale/mx6memcal/spl.c index 61d0ca3408f..bc9c4259f07 100644 --- a/board/freescale/mx6memcal/spl.c +++ b/board/freescale/mx6memcal/spl.c @@ -4,7 +4,6 @@ * Author: Eric Nelson <eric@nelint.com> */ -#include <common.h> #include <cpu_func.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c index 77e92006131..e782543c0fa 100644 --- a/board/freescale/mx6sabreauto/mx6sabreauto.c +++ b/board/freescale/mx6sabreauto/mx6sabreauto.c @@ -5,7 +5,6 @@ * Author: Fabio Estevam <fabio.estevam@freescale.com> */ -#include <common.h> #include <image.h> #include <init.h> #include <net.h> diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c index e9ac57118b0..d37d8a4136f 100644 --- a/board/freescale/mx6slevk/mx6slevk.c +++ b/board/freescale/mx6slevk/mx6slevk.c @@ -21,7 +21,6 @@ #include <asm/io.h> #include <asm/sections.h> #include <linux/sizes.h> -#include <common.h> #include <fsl_esdhc_imx.h> #include <i2c.h> #include <mmc.h> diff --git a/board/freescale/mx6sllevk/mx6sllevk.c b/board/freescale/mx6sllevk/mx6sllevk.c index 10a00095aff..7114444fc3e 100644 --- a/board/freescale/mx6sllevk/mx6sllevk.c +++ b/board/freescale/mx6sllevk/mx6sllevk.c @@ -15,7 +15,6 @@ #include <asm/mach-imx/iomux-v3.h> #include <asm/mach-imx/boot_mode.h> #include <asm/io.h> -#include <common.h> #include <linux/sizes.h> #include <mmc.h> #include <power/pmic.h> diff --git a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c index 84cc51e9cac..6176f738238 100644 --- a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c +++ b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c @@ -20,7 +20,7 @@ #include <asm/io.h> #include <linux/delay.h> #include <linux/sizes.h> -#include <common.h> +#include <config.h> #include <fsl_esdhc_imx.h> #include <miiphy.h> #include <netdev.h> diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index e7958df4024..e3353feec68 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -21,7 +21,6 @@ #include <env.h> #include <linux/delay.h> #include <linux/sizes.h> -#include <common.h> #include <fsl_esdhc_imx.h> #include <mmc.h> #include <i2c.h> diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index 534b16cec7a..6b0665a1067 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -19,7 +19,7 @@ #include <asm/mach-imx/mxc_i2c.h> #include <asm/io.h> #include <asm/sections.h> -#include <common.h> +#include <config.h> #include <env.h> #include <fsl_esdhc_imx.h> #include <i2c.h> diff --git a/board/freescale/mx6ullevk/mx6ullevk.c b/board/freescale/mx6ullevk/mx6ullevk.c index de45f8b1d24..189eddefea3 100644 --- a/board/freescale/mx6ullevk/mx6ullevk.c +++ b/board/freescale/mx6ullevk/mx6ullevk.c @@ -15,7 +15,7 @@ #include <asm/mach-imx/iomux-v3.h> #include <asm/mach-imx/boot_mode.h> #include <asm/io.h> -#include <common.h> +#include <config.h> #include <env.h> #include <fsl_esdhc_imx.h> #include <linux/sizes.h> diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index 4fe23b51cd1..3db167c0dad 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -15,7 +15,6 @@ #include <asm/io.h> #include <linux/delay.h> #include <linux/sizes.h> -#include <common.h> #include <fsl_esdhc_imx.h> #include <mmc.h> #include <miiphy.h> diff --git a/board/freescale/mx7ulp_evk/mx7ulp_evk.c b/board/freescale/mx7ulp_evk/mx7ulp_evk.c index 01e32136532..af68e57854e 100644 --- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c +++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c @@ -3,7 +3,6 @@ * Copyright (C) 2016 Freescale Semiconductor, Inc. */ -#include <common.h> #include <fdt_support.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/freescale/p1010rdb/ddr.c b/board/freescale/p1010rdb/ddr.c index b423ec8e218..43a0936bc9a 100644 --- a/board/freescale/p1010rdb/ddr.c +++ b/board/freescale/p1010rdb/ddr.c @@ -3,7 +3,6 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. */ -#include <common.h> #include <vsprintf.h> #include <asm/global_data.h> #include <asm/mmu.h> diff --git a/board/freescale/p1010rdb/law.c b/board/freescale/p1010rdb/law.c index 13fc2fa2e38..a7d80f28521 100644 --- a/board/freescale/p1010rdb/law.c +++ b/board/freescale/p1010rdb/law.c @@ -3,7 +3,7 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <asm/fsl_law.h> #include <asm/mmu.h> diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c index d32274b2481..ab0031440ae 100644 --- a/board/freescale/p1010rdb/p1010rdb.c +++ b/board/freescale/p1010rdb/p1010rdb.c @@ -4,7 +4,7 @@ * Copyright 2020 NXP */ -#include <common.h> +#include <config.h> #include <command.h> #include <image.h> #include <init.h> diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c index e450f626e0a..fc26cef2cc8 100644 --- a/board/freescale/p1010rdb/spl.c +++ b/board/freescale/p1010rdb/spl.c @@ -2,7 +2,7 @@ /* Copyright 2013 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <console.h> #include <env.h> diff --git a/board/freescale/p1010rdb/spl_minimal.c b/board/freescale/p1010rdb/spl_minimal.c index 8f0dec4c0ab..8cd79c6fb5f 100644 --- a/board/freescale/p1010rdb/spl_minimal.c +++ b/board/freescale/p1010rdb/spl_minimal.c @@ -2,7 +2,7 @@ /* * Copyright 2011 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <init.h> #include <mpc85xx.h> diff --git a/board/freescale/p1010rdb/tlb.c b/board/freescale/p1010rdb/tlb.c index 265cde81a3c..44acebaa2bb 100644 --- a/board/freescale/p1010rdb/tlb.c +++ b/board/freescale/p1010rdb/tlb.c @@ -3,8 +3,9 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <asm/mmu.h> +#include <asm/ppc.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ diff --git a/board/freescale/p1_p2_rdb_pc/ddr.c b/board/freescale/p1_p2_rdb_pc/ddr.c index 5f16779abaa..8622a5a610a 100644 --- a/board/freescale/p1_p2_rdb_pc/ddr.c +++ b/board/freescale/p1_p2_rdb_pc/ddr.c @@ -3,11 +3,12 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <vsprintf.h> +#include <linux/string.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> -#include <asm/processor.h> +#include <asm/ppc.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <asm/io.h> diff --git a/board/freescale/p1_p2_rdb_pc/law.c b/board/freescale/p1_p2_rdb_pc/law.c index 6085984eab4..49594070b83 100644 --- a/board/freescale/p1_p2_rdb_pc/law.c +++ b/board/freescale/p1_p2_rdb_pc/law.c @@ -3,7 +3,7 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <asm/fsl_law.h> #include <asm/mmu.h> diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c index 602b7f0156b..399ff720722 100644 --- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c @@ -4,7 +4,7 @@ * Copyright 2020 NXP */ -#include <common.h> +#include <config.h> #include <command.h> #include <env.h> #include <hang.h> diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c index 6c3f82849e3..b07f481fbf9 100644 --- a/board/freescale/p1_p2_rdb_pc/spl.c +++ b/board/freescale/p1_p2_rdb_pc/spl.c @@ -3,7 +3,7 @@ * Copyright 2013 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <console.h> #include <env.h> diff --git a/board/freescale/p1_p2_rdb_pc/spl_minimal.c b/board/freescale/p1_p2_rdb_pc/spl_minimal.c index f9e0b5b25ab..511bcf5506b 100644 --- a/board/freescale/p1_p2_rdb_pc/spl_minimal.c +++ b/board/freescale/p1_p2_rdb_pc/spl_minimal.c @@ -3,7 +3,7 @@ * Copyright 2011 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <init.h> #include <ns16550.h> diff --git a/board/freescale/p1_p2_rdb_pc/tlb.c b/board/freescale/p1_p2_rdb_pc/tlb.c index 94773969e9d..ae0b7adbe54 100644 --- a/board/freescale/p1_p2_rdb_pc/tlb.c +++ b/board/freescale/p1_p2_rdb_pc/tlb.c @@ -3,8 +3,9 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <asm/mmu.h> +#include <asm/ppc.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ diff --git a/board/freescale/p2041rdb/cpld.c b/board/freescale/p2041rdb/cpld.c index a1908b8a571..915a8b994d5 100644 --- a/board/freescale/p2041rdb/cpld.c +++ b/board/freescale/p2041rdb/cpld.c @@ -11,7 +11,6 @@ * CPLD_BASE - The virtual address of the base of the CPLD register map */ -#include <common.h> #include <command.h> #include <asm/io.h> diff --git a/board/freescale/p2041rdb/ddr.c b/board/freescale/p2041rdb/ddr.c index 910058cefe1..b8b765a85ef 100644 --- a/board/freescale/p2041rdb/ddr.c +++ b/board/freescale/p2041rdb/ddr.c @@ -3,7 +3,6 @@ * Copyright 2011 Freescale Semiconductor, Inc. */ -#include <common.h> #include <i2c.h> #include <hwconfig.h> #include <init.h> diff --git a/board/freescale/p2041rdb/eth.c b/board/freescale/p2041rdb/eth.c index c0d05539c5c..65850866777 100644 --- a/board/freescale/p2041rdb/eth.c +++ b/board/freescale/p2041rdb/eth.c @@ -12,7 +12,7 @@ * and serdes protocol selection. */ -#include <common.h> +#include <config.h> #include <net.h> #include <netdev.h> #include <asm/fsl_serdes.h> diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c index 575259b19c0..d5b71f78430 100644 --- a/board/freescale/p2041rdb/p2041rdb.c +++ b/board/freescale/p2041rdb/p2041rdb.c @@ -3,7 +3,7 @@ * Copyright 2011,2012 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <command.h> #include <env.h> diff --git a/board/freescale/t102xrdb/cpld.c b/board/freescale/t102xrdb/cpld.c index 17a6226cafc..cc933ccd544 100644 --- a/board/freescale/t102xrdb/cpld.c +++ b/board/freescale/t102xrdb/cpld.c @@ -7,7 +7,7 @@ * The following macros need to be defined: */ -#include <common.h> +#include <config.h> #include <command.h> #include <asm/io.h> #include "cpld.h" diff --git a/board/freescale/t102xrdb/ddr.c b/board/freescale/t102xrdb/ddr.c index 1b417398992..f8d504fb3c7 100644 --- a/board/freescale/t102xrdb/ddr.c +++ b/board/freescale/t102xrdb/ddr.c @@ -3,7 +3,7 @@ * Copyright 2014 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <i2c.h> #include <hwconfig.h> #include <init.h> diff --git a/board/freescale/t102xrdb/eth_t102xrdb.c b/board/freescale/t102xrdb/eth_t102xrdb.c index ad78f72f98c..7185a0abd52 100644 --- a/board/freescale/t102xrdb/eth_t102xrdb.c +++ b/board/freescale/t102xrdb/eth_t102xrdb.c @@ -5,7 +5,7 @@ * Shengzhou Liu <Shengzhou.Liu@freescale.com> */ -#include <common.h> +#include <config.h> #include <command.h> #include <fdt_support.h> #include <net.h> diff --git a/board/freescale/t102xrdb/law.c b/board/freescale/t102xrdb/law.c index d636bef325f..81caa961897 100644 --- a/board/freescale/t102xrdb/law.c +++ b/board/freescale/t102xrdb/law.c @@ -3,7 +3,7 @@ * Copyright 2014 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <asm/fsl_law.h> #include <asm/mmu.h> diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c index 9faf259af74..de6cdda194e 100644 --- a/board/freescale/t102xrdb/spl.c +++ b/board/freescale/t102xrdb/spl.c @@ -2,7 +2,7 @@ /* Copyright 2014 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <console.h> #include <env_internal.h> diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c index 73f9d3ac72e..0a29e27b42c 100644 --- a/board/freescale/t102xrdb/t102xrdb.c +++ b/board/freescale/t102xrdb/t102xrdb.c @@ -4,7 +4,7 @@ * Copyright 2020-2023 NXP */ -#include <common.h> +#include <config.h> #include <command.h> #include <env.h> #include <fdt_support.h> diff --git a/board/freescale/t102xrdb/tlb.c b/board/freescale/t102xrdb/tlb.c index 2519a9e4dbe..008bd6e72b7 100644 --- a/board/freescale/t102xrdb/tlb.c +++ b/board/freescale/t102xrdb/tlb.c @@ -3,8 +3,9 @@ * Copyright 2014 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <asm/mmu.h> +#include <asm/ppc.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ diff --git a/board/freescale/t104xrdb/cpld.c b/board/freescale/t104xrdb/cpld.c index 9ac57bbd830..c2d526ae15a 100644 --- a/board/freescale/t104xrdb/cpld.c +++ b/board/freescale/t104xrdb/cpld.c @@ -10,7 +10,7 @@ * CFG_SYS_CPLD_BASE-The virtual address of the base of the CPLD register map */ -#include <common.h> +#include <config.h> #include <command.h> #include <asm/io.h> diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c index 02ddb661415..bab684860da 100644 --- a/board/freescale/t104xrdb/ddr.c +++ b/board/freescale/t104xrdb/ddr.c @@ -4,7 +4,7 @@ * Copyright 2021 NXP */ -#include <common.h> +#include <config.h> #include <i2c.h> #include <hwconfig.h> #include <init.h> diff --git a/board/freescale/t104xrdb/eth.c b/board/freescale/t104xrdb/eth.c index 5eca9386f6e..d5c084e319d 100644 --- a/board/freescale/t104xrdb/eth.c +++ b/board/freescale/t104xrdb/eth.c @@ -3,7 +3,7 @@ * Copyright 2014 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <net.h> #include <netdev.h> #include <asm/fsl_serdes.h> diff --git a/board/freescale/t104xrdb/law.c b/board/freescale/t104xrdb/law.c index a0d6eb5b270..d34641c2397 100644 --- a/board/freescale/t104xrdb/law.c +++ b/board/freescale/t104xrdb/law.c @@ -3,7 +3,7 @@ * Copyright 2013 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <asm/fsl_law.h> #include <asm/mmu.h> diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c index dd8283f3c60..e02a1f95d4c 100644 --- a/board/freescale/t104xrdb/spl.c +++ b/board/freescale/t104xrdb/spl.c @@ -2,7 +2,7 @@ /* Copyright 2013 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <console.h> #include <env_internal.h> diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c index b3080492716..ef4dfef4965 100644 --- a/board/freescale/t104xrdb/t104xrdb.c +++ b/board/freescale/t104xrdb/t104xrdb.c @@ -4,7 +4,7 @@ * Copyright 2023 NXP */ -#include <common.h> +#include <config.h> #include <command.h> #include <env.h> #include <fdt_support.h> diff --git a/board/freescale/t104xrdb/tlb.c b/board/freescale/t104xrdb/tlb.c index 10be580b813..24bc83f756b 100644 --- a/board/freescale/t104xrdb/tlb.c +++ b/board/freescale/t104xrdb/tlb.c @@ -3,8 +3,9 @@ * Copyright 2013 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <asm/mmu.h> +#include <asm/ppc.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ diff --git a/board/freescale/t208xqds/ddr.c b/board/freescale/t208xqds/ddr.c index 56471b3988b..9076fbba10a 100644 --- a/board/freescale/t208xqds/ddr.c +++ b/board/freescale/t208xqds/ddr.c @@ -3,7 +3,6 @@ * Copyright 2013 Freescale Semiconductor, Inc. */ -#include <common.h> #include <i2c.h> #include <hwconfig.h> #include <init.h> diff --git a/board/freescale/t208xqds/eth_t208xqds.c b/board/freescale/t208xqds/eth_t208xqds.c index 569b193eab7..9f299227e29 100644 --- a/board/freescale/t208xqds/eth_t208xqds.c +++ b/board/freescale/t208xqds/eth_t208xqds.c @@ -6,7 +6,7 @@ * Shengzhou Liu <Shengzhou.Liu@freescale.com> */ -#include <common.h> +#include <config.h> #include <command.h> #include <fdt_support.h> #include <log.h> diff --git a/board/freescale/t208xqds/law.c b/board/freescale/t208xqds/law.c index 3cdd4937684..287f4650e05 100644 --- a/board/freescale/t208xqds/law.c +++ b/board/freescale/t208xqds/law.c @@ -6,7 +6,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <asm/fsl_law.h> #include <asm/mmu.h> diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c index 8866be54a66..44ad4e68d9f 100644 --- a/board/freescale/t208xqds/spl.c +++ b/board/freescale/t208xqds/spl.c @@ -2,7 +2,7 @@ /* Copyright 2013 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <console.h> #include <env_internal.h> diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c index 8be55e52e5f..5e71da0e163 100644 --- a/board/freescale/t208xqds/t208xqds.c +++ b/board/freescale/t208xqds/t208xqds.c @@ -4,7 +4,7 @@ * Copyright 2020 NXP */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <command.h> #include <env.h> diff --git a/board/freescale/t208xqds/tlb.c b/board/freescale/t208xqds/tlb.c index 3d220afc16e..f99d51c8cd7 100644 --- a/board/freescale/t208xqds/tlb.c +++ b/board/freescale/t208xqds/tlb.c @@ -6,8 +6,9 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <asm/mmu.h> +#include <asm/ppc.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ diff --git a/board/freescale/t208xrdb/cpld.c b/board/freescale/t208xrdb/cpld.c index 933fa0decc3..d2226af6278 100644 --- a/board/freescale/t208xrdb/cpld.c +++ b/board/freescale/t208xrdb/cpld.c @@ -5,8 +5,9 @@ * Freescale T2080RDB board-specific CPLD controlling supports. */ -#include <common.h> +#include <config.h> #include <command.h> +#include <asm/io.h> #include "cpld.h" u8 cpld_read(unsigned int reg) diff --git a/board/freescale/t208xrdb/ddr.c b/board/freescale/t208xrdb/ddr.c index 1fbab36e1a2..fe98f62668a 100644 --- a/board/freescale/t208xrdb/ddr.c +++ b/board/freescale/t208xrdb/ddr.c @@ -3,7 +3,6 @@ * Copyright 2014 Freescale Semiconductor, Inc. */ -#include <common.h> #include <i2c.h> #include <hwconfig.h> #include <init.h> diff --git a/board/freescale/t208xrdb/eth_t208xrdb.c b/board/freescale/t208xrdb/eth_t208xrdb.c index e4592eac153..5223eccb280 100644 --- a/board/freescale/t208xrdb/eth_t208xrdb.c +++ b/board/freescale/t208xrdb/eth_t208xrdb.c @@ -6,7 +6,6 @@ * Shengzhou Liu <Shengzhou.Liu@freescale.com> */ -#include <common.h> #include <command.h> #include <fdt_support.h> #include <net.h> diff --git a/board/freescale/t208xrdb/law.c b/board/freescale/t208xrdb/law.c index 53a13694506..e1f570a8935 100644 --- a/board/freescale/t208xrdb/law.c +++ b/board/freescale/t208xrdb/law.c @@ -6,7 +6,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <asm/fsl_law.h> #include <asm/mmu.h> diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c index 130cb8847c0..df3b9c6fe40 100644 --- a/board/freescale/t208xrdb/spl.c +++ b/board/freescale/t208xrdb/spl.c @@ -2,7 +2,7 @@ /* Copyright 2013 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <console.h> #include <env_internal.h> diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c index e33e5d082d8..d93edf007ad 100644 --- a/board/freescale/t208xrdb/t208xrdb.c +++ b/board/freescale/t208xrdb/t208xrdb.c @@ -4,7 +4,7 @@ * Copyright 2021-2023 NXP */ -#include <common.h> +#include <config.h> #include <command.h> #include <env.h> #include <fdt_support.h> diff --git a/board/freescale/t208xrdb/tlb.c b/board/freescale/t208xrdb/tlb.c index 688a208c621..df5831541f3 100644 --- a/board/freescale/t208xrdb/tlb.c +++ b/board/freescale/t208xrdb/tlb.c @@ -6,8 +6,9 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <asm/mmu.h> +#include <asm/ppc.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ diff --git a/board/freescale/t4rdb/cpld.c b/board/freescale/t4rdb/cpld.c index 8b1012086ec..cd14d5895f5 100644 --- a/board/freescale/t4rdb/cpld.c +++ b/board/freescale/t4rdb/cpld.c @@ -14,7 +14,7 @@ * */ -#include <common.h> +#include <config.h> #include <command.h> #include <asm/io.h> diff --git a/board/freescale/t4rdb/ddr.c b/board/freescale/t4rdb/ddr.c index 57cbde154f0..5b60b50c672 100644 --- a/board/freescale/t4rdb/ddr.c +++ b/board/freescale/t4rdb/ddr.c @@ -3,7 +3,6 @@ * Copyright 2014 Freescale Semiconductor, Inc. */ -#include <common.h> #include <i2c.h> #include <hwconfig.h> #include <init.h> diff --git a/board/freescale/t4rdb/eth.c b/board/freescale/t4rdb/eth.c index 2e52543847b..e7646365d7d 100644 --- a/board/freescale/t4rdb/eth.c +++ b/board/freescale/t4rdb/eth.c @@ -5,7 +5,7 @@ * Chunhe Lan <Chunhe.Lan@freescale.com> */ -#include <common.h> +#include <config.h> #include <command.h> #include <fdt_support.h> #include <net.h> diff --git a/board/freescale/t4rdb/law.c b/board/freescale/t4rdb/law.c index 43eeb884e2f..c43ac0f30d7 100644 --- a/board/freescale/t4rdb/law.c +++ b/board/freescale/t4rdb/law.c @@ -3,7 +3,7 @@ * Copyright 2014 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <asm/fsl_law.h> #include <asm/mmu.h> diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c index 779457d2964..9d2472dec25 100644 --- a/board/freescale/t4rdb/spl.c +++ b/board/freescale/t4rdb/spl.c @@ -5,7 +5,7 @@ * Author: Chunhe Lan <Chunhe.Lan@freescale.com> */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <console.h> #include <env_internal.h> diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c index ab717769ed5..5cacfd27380 100644 --- a/board/freescale/t4rdb/t4240rdb.c +++ b/board/freescale/t4rdb/t4240rdb.c @@ -4,7 +4,7 @@ * Copyright 2023 NXP */ -#include <common.h> +#include <config.h> #include <command.h> #include <env.h> #include <fdt_support.h> diff --git a/board/freescale/t4rdb/tlb.c b/board/freescale/t4rdb/tlb.c index f5af893c2d9..1fb9d41d52b 100644 --- a/board/freescale/t4rdb/tlb.c +++ b/board/freescale/t4rdb/tlb.c @@ -3,8 +3,9 @@ * Copyright 2014 Freescale Semiconductor, Inc. */ -#include <common.h> +#include <config.h> #include <asm/mmu.h> +#include <asm/ppc.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ diff --git a/board/freescale/vf610twr/vf610twr.c b/board/freescale/vf610twr/vf610twr.c index 98cb0140ad0..80a798af9cb 100644 --- a/board/freescale/vf610twr/vf610twr.c +++ b/board/freescale/vf610twr/vf610twr.c @@ -3,7 +3,6 @@ * Copyright 2013 Freescale Semiconductor, Inc. */ -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/friendlyarm/nanopi2/board.c b/board/friendlyarm/nanopi2/board.c index 393c5a447d6..c8cbc5a15fa 100644 --- a/board/friendlyarm/nanopi2/board.c +++ b/board/friendlyarm/nanopi2/board.c @@ -5,7 +5,6 @@ */ #include <config.h> -#include <common.h> #include <command.h> #include <fdt_support.h> #include <log.h> diff --git a/board/friendlyarm/nanopi2/hwrev.c b/board/friendlyarm/nanopi2/hwrev.c index 585e08c944f..cd9c2414a32 100644 --- a/board/friendlyarm/nanopi2/hwrev.c +++ b/board/friendlyarm/nanopi2/hwrev.c @@ -5,7 +5,6 @@ */ #include <config.h> -#include <common.h> #include <i2c.h> #include <asm/io.h> diff --git a/board/friendlyarm/nanopi2/lcds.c b/board/friendlyarm/nanopi2/lcds.c index 7303e53af92..b37367300cf 100644 --- a/board/friendlyarm/nanopi2/lcds.c +++ b/board/friendlyarm/nanopi2/lcds.c @@ -4,7 +4,6 @@ */ #include <config.h> -#include <common.h> #include <errno.h> #include <fdtdec.h> #include <fdt_support.h> diff --git a/board/friendlyarm/nanopi2/onewire.c b/board/friendlyarm/nanopi2/onewire.c index 4f0b1e33c2d..31cc871330c 100644 --- a/board/friendlyarm/nanopi2/onewire.c +++ b/board/friendlyarm/nanopi2/onewire.c @@ -5,7 +5,6 @@ */ #include <config.h> -#include <common.h> #include <errno.h> #include <asm/io.h> #include <asm/arch/clk.h> diff --git a/board/gardena/smart-gateway-at91sam/board.c b/board/gardena/smart-gateway-at91sam/board.c index d9dfb256b32..2b5b2844fbd 100644 --- a/board/gardena/smart-gateway-at91sam/board.c +++ b/board/gardena/smart-gateway-at91sam/board.c @@ -4,7 +4,7 @@ * Copyright (C) 2019 Stefan Roese <sr@denx.de> */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <env.h> #include <init.h> diff --git a/board/gardena/smart-gateway-at91sam/spl.c b/board/gardena/smart-gateway-at91sam/spl.c index 2807c4e3114..fb3ec48f9c5 100644 --- a/board/gardena/smart-gateway-at91sam/spl.c +++ b/board/gardena/smart-gateway-at91sam/spl.c @@ -4,7 +4,7 @@ * Copyright (C) 2019 Stefan Roese <sr@denx.de> */ -#include <common.h> +#include <config.h> #include <nand.h> #include <spl.h> #include <asm/arch/at91sam9x5_matrix.h> diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c index 0cfde91c94c..c6b14bed41f 100644 --- a/board/gardena/smart-gateway-mt7688/board.c +++ b/board/gardena/smart-gateway-mt7688/board.c @@ -3,7 +3,6 @@ * Copyright (C) 2018 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <command.h> #include <env.h> #include <env_internal.h> diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c index 74328b2e1b3..891d1b5ddca 100644 --- a/board/gateworks/gw_ventana/common.c +++ b/board/gateworks/gw_ventana/common.c @@ -5,7 +5,6 @@ * Author: Tim Harvey <tharvey@gateworks.com> */ -#include <common.h> #include <env.h> #include <fsl_esdhc_imx.h> #include <hwconfig.h> diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c index e622a9ba9e4..b37f1972249 100644 --- a/board/gateworks/gw_ventana/eeprom.c +++ b/board/gateworks/gw_ventana/eeprom.c @@ -5,7 +5,6 @@ */ #include <command.h> -#include <common.h> #include <gsc.h> #include <hexdump.h> #include <i2c.h> diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 683def7e9f7..21a908c20dd 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -6,7 +6,6 @@ */ #include <command.h> -#include <common.h> #include <fdt_support.h> #include <gsc.h> #include <hwconfig.h> diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c index 2f046c9c0b3..3de4727b2ed 100644 --- a/board/gateworks/gw_ventana/gw_ventana_spl.c +++ b/board/gateworks/gw_ventana/gw_ventana_spl.c @@ -4,7 +4,7 @@ * Author: Tim Harvey <tharvey@gateworks.com> */ -#include <common.h> +#include <config.h> #include <env.h> #include <gsc.h> #include <hang.h> diff --git a/board/gateworks/venice/eeprom.c b/board/gateworks/venice/eeprom.c index 241be4ee630..afaabf34879 100644 --- a/board/gateworks/venice/eeprom.c +++ b/board/gateworks/venice/eeprom.c @@ -3,7 +3,6 @@ * Copyright 2021 Gateworks Corporation */ -#include <common.h> #include <gsc.h> #include <hexdump.h> #include <i2c.h> diff --git a/board/gateworks/venice/lpddr4_timing_imx8mm.c b/board/gateworks/venice/lpddr4_timing_imx8mm.c index 78b431dc284..3f2c090a94f 100644 --- a/board/gateworks/venice/lpddr4_timing_imx8mm.c +++ b/board/gateworks/venice/lpddr4_timing_imx8mm.c @@ -6,7 +6,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/gateworks/venice/spl.c b/board/gateworks/venice/spl.c index b0a315ba953..e9cdede6214 100644 --- a/board/gateworks/venice/spl.c +++ b/board/gateworks/venice/spl.c @@ -3,7 +3,6 @@ * Copyright 2021 Gateworks Corporation */ -#include <common.h> #include <cpu_func.h> #include <hang.h> #include <i2c.h> @@ -119,13 +118,29 @@ static int dm_i2c_clrsetbits(struct udevice *dev, uint reg, uint clr, uint set) return dm_i2c_write(dev, reg, &val, 1); } -static int power_init_board(void) +static int power_init_board(struct udevice *gsc) { const char *model = eeprom_get_model(); struct udevice *bus; struct udevice *dev; int ret; + /* Enable GSC voltage supervisor for new board models */ + if ((!strncmp(model, "GW7100", 6) && model[10] > 'D') || + (!strncmp(model, "GW7101", 6) && model[10] > 'D') || + (!strncmp(model, "GW7200", 6) && model[10] > 'E') || + (!strncmp(model, "GW7201", 6) && model[10] > 'E') || + (!strncmp(model, "GW7300", 6) && model[10] > 'E') || + (!strncmp(model, "GW7301", 6) && model[10] > 'E') || + (!strncmp(model, "GW740", 5) && model[7] > 'B')) { + u8 ver; + + if (!dm_i2c_read(gsc, 14, &ver, 1) && ver > 62) { + printf("GSC : enabling voltage supervisor\n"); + dm_i2c_clrsetbits(gsc, 25, 0, BIT(1)); + } + } + if ((!strncmp(model, "GW71", 4)) || (!strncmp(model, "GW72", 4)) || (!strncmp(model, "GW73", 4)) || @@ -287,6 +302,7 @@ void board_init_f(ulong dummy) mdelay(10); } pinctrl_select_state(bus, "default"); + mdelay(10); } } /* Wait indefiniately until the GSC probes */ @@ -298,7 +314,7 @@ void board_init_f(ulong dummy) dram_sz = venice_eeprom_init(0); /* PMIC */ - power_init_board(); + power_init_board(dev); /* DDR initialization */ spl_dram_init(dram_sz); diff --git a/board/gateworks/venice/venice.c b/board/gateworks/venice/venice.c index 5b105d7659e..d4c22121497 100644 --- a/board/gateworks/venice/venice.c +++ b/board/gateworks/venice/venice.c @@ -45,22 +45,6 @@ int board_fit_config_name_match(const char *path) return -1; } -static int __maybe_unused setup_fec(void) -{ - struct iomuxc_gpr_base_regs *gpr = - (struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR; - -#ifndef CONFIG_IMX8MP - /* Use 125M anatop REF_CLK1 for ENET1, not from external */ - clrsetbits_le32(&gpr->gpr[1], 0x2000, 0); -#else - /* Enable RGMII TX clk output */ - setbits_le32(&gpr->gpr[1], BIT(22)); -#endif - - return 0; -} - #if (IS_ENABLED(CONFIG_NET)) int board_phy_config(struct phy_device *phydev) { @@ -75,6 +59,9 @@ int board_phy_config(struct phy_device *phydev) val |= 0xb << 8; /* LED2(Green;Link/Act): blink for TX/RX act */ phy_write(phydev, MDIO_DEVAD_NONE, 24, val); break; + case 0xd565a401: /* MaxLinear GPY111 */ + puts("GPY111 "); + break; } if (phydev->drv->config) @@ -88,9 +75,6 @@ int board_init(void) { venice_eeprom_init(1); - if (IS_ENABLED(CONFIG_FEC_MXC)) - setup_fec(); - return 0; } diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c index 0f620c2d917..4abb3e45128 100644 --- a/board/gdsys/a38x/controlcenterdc.c +++ b/board/gdsys/a38x/controlcenterdc.c @@ -4,7 +4,7 @@ * Copyright (C) 2016 Mario Six <mario.six@gdsys.cc> */ -#include <common.h> +#include <config.h> #include <command.h> #include <dm.h> #include <event.h> diff --git a/board/gdsys/a38x/dt_helpers.c b/board/gdsys/a38x/dt_helpers.c index 61d30c2e637..a12e115c72c 100644 --- a/board/gdsys/a38x/dt_helpers.c +++ b/board/gdsys/a38x/dt_helpers.c @@ -4,7 +4,6 @@ * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc */ -#include <common.h> #include <i2c.h> #include <fdt_support.h> #include <asm-generic/gpio.h> diff --git a/board/gdsys/a38x/hre.c b/board/gdsys/a38x/hre.c index d16233ed78e..f303793b63b 100644 --- a/board/gdsys/a38x/hre.c +++ b/board/gdsys/a38x/hre.c @@ -4,7 +4,6 @@ * Reinhard Pfau, Guntermann & Drunck GmbH, reinhard.pfau@gdsys.cc */ -#include <common.h> #include <log.h> #include <malloc.h> #include <fs.h> diff --git a/board/gdsys/a38x/hydra.c b/board/gdsys/a38x/hydra.c index 495a9769188..970d508ff32 100644 --- a/board/gdsys/a38x/hydra.c +++ b/board/gdsys/a38x/hydra.c @@ -1,8 +1,8 @@ -#include <common.h> #include <command.h> #include <console.h> /* ctrlc */ #include <pci.h> #include <asm/io.h> +#include <mach/soc.h> #include "hydra.h" diff --git a/board/gdsys/a38x/ihs_phys.c b/board/gdsys/a38x/ihs_phys.c index 60a5c37aeff..690a29690b9 100644 --- a/board/gdsys/a38x/ihs_phys.c +++ b/board/gdsys/a38x/ihs_phys.c @@ -1,4 +1,3 @@ -#include <common.h> #include <dm.h> #include <miiphy.h> #include <asm-generic/gpio.h> diff --git a/board/gdsys/a38x/keyprogram.c b/board/gdsys/a38x/keyprogram.c index 7020fae1894..15c36e22684 100644 --- a/board/gdsys/a38x/keyprogram.c +++ b/board/gdsys/a38x/keyprogram.c @@ -4,7 +4,6 @@ * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc */ -#include <common.h> #include <command.h> #include <env.h> #include <tpm-v1.h> diff --git a/board/gdsys/common/cmd_ioloop.c b/board/gdsys/common/cmd_ioloop.c index 1412421a021..fb6313f0197 100644 --- a/board/gdsys/common/cmd_ioloop.c +++ b/board/gdsys/common/cmd_ioloop.c @@ -4,7 +4,6 @@ * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc */ -#include <common.h> #include <command.h> #include <console.h> #include <linux/bitops.h> diff --git a/board/gdsys/common/dp501.c b/board/gdsys/common/dp501.c index 9ca69ebcbbe..7698e76b524 100644 --- a/board/gdsys/common/dp501.c +++ b/board/gdsys/common/dp501.c @@ -8,7 +8,6 @@ #ifdef CONFIG_GDSYS_LEGACY_DRIVERS -#include <common.h> #include <asm/io.h> #include <errno.h> #include <i2c.h> diff --git a/board/gdsys/common/ihs_mdio.c b/board/gdsys/common/ihs_mdio.c index 5f1215e9e8a..a814566beaf 100644 --- a/board/gdsys/common/ihs_mdio.c +++ b/board/gdsys/common/ihs_mdio.c @@ -4,7 +4,6 @@ * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc */ -#include <common.h> #include <linux/delay.h> #include <miiphy.h> diff --git a/board/gdsys/common/ioep-fpga.c b/board/gdsys/common/ioep-fpga.c index 7292d7ab5a4..f01b48b5c8e 100644 --- a/board/gdsys/common/ioep-fpga.c +++ b/board/gdsys/common/ioep-fpga.c @@ -6,7 +6,6 @@ #ifdef CONFIG_GDSYS_LEGACY_DRIVERS -#include <common.h> #include <gdsys_fpga.h> #include <linux/bitops.h> diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c index dc548efbc7a..bd9c5ca9969 100644 --- a/board/gdsys/common/osd.c +++ b/board/gdsys/common/osd.c @@ -6,7 +6,6 @@ #ifdef CONFIG_GDSYS_LEGACY_DRIVERS -#include <common.h> #include <command.h> #include <i2c.h> #include <malloc.h> diff --git a/board/gdsys/common/osd_cmd.c b/board/gdsys/common/osd_cmd.c index 6a9c0b4c24f..39e64f5f2eb 100644 --- a/board/gdsys/common/osd_cmd.c +++ b/board/gdsys/common/osd_cmd.c @@ -9,7 +9,6 @@ * Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.de */ -#include <common.h> #include <command.h> #include <dm.h> #include <hexdump.h> diff --git a/board/gdsys/mpc8308/gazerbeam.c b/board/gdsys/mpc8308/gazerbeam.c index cc608c4ac43..05e4d84460a 100644 --- a/board/gdsys/mpc8308/gazerbeam.c +++ b/board/gdsys/mpc8308/gazerbeam.c @@ -5,7 +5,6 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include <common.h> #include <command.h> #include <dm.h> #include <env.h> diff --git a/board/gdsys/mpc8308/mpc8308.c b/board/gdsys/mpc8308/mpc8308.c index 0f90f8ad327..42c45ecedce 100644 --- a/board/gdsys/mpc8308/mpc8308.c +++ b/board/gdsys/mpc8308/mpc8308.c @@ -4,7 +4,6 @@ * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc */ -#include <common.h> #include <command.h> #include <init.h> #include <asm/processor.h> diff --git a/board/gdsys/mpc8308/sdram.c b/board/gdsys/mpc8308/sdram.c index 4fac146353d..2933de0f304 100644 --- a/board/gdsys/mpc8308/sdram.c +++ b/board/gdsys/mpc8308/sdram.c @@ -13,7 +13,7 @@ #ifndef CONFIG_MPC83XX_SDRAM -#include <common.h> +#include <config.h> #include <init.h> #include <mpc83xx.h> #include <spd_sdram.h> diff --git a/board/ge/b1x5v2/b1x5v2.c b/board/ge/b1x5v2/b1x5v2.c index a2cbd1512e9..031773bc5ef 100644 --- a/board/ge/b1x5v2/b1x5v2.c +++ b/board/ge/b1x5v2/b1x5v2.c @@ -17,7 +17,6 @@ #include <asm/io.h> #include <asm/mach-imx/video.h> #include <command.h> -#include <common.h> #include <i2c.h> #include <input.h> #include <ipu_pixfmt.h> diff --git a/board/ge/common/ge_rtc.c b/board/ge/common/ge_rtc.c index 6437afc7bd0..5c62ecca8c8 100644 --- a/board/ge/common/ge_rtc.c +++ b/board/ge/common/ge_rtc.c @@ -3,7 +3,6 @@ * Copyright 2017 General Electric Company */ -#include <common.h> #include <env.h> #include <dm/uclass.h> #include <rtc.h> diff --git a/board/ge/common/vpd_reader.h b/board/ge/common/vpd_reader.h index 0c51dc57e90..d32c18da351 100644 --- a/board/ge/common/vpd_reader.h +++ b/board/ge/common/vpd_reader.h @@ -3,7 +3,7 @@ * Copyright 2016 General Electric Company */ -#include "common.h" +#include <linux/types.h> struct vpd_cache; diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c index cc462d53da6..9396d43f8ad 100644 --- a/board/ge/mx53ppd/mx53ppd.c +++ b/board/ge/mx53ppd/mx53ppd.c @@ -8,7 +8,6 @@ * Jason Liu <r64343@freescale.com> */ -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/ge/mx53ppd/mx53ppd_video.c b/board/ge/mx53ppd/mx53ppd_video.c index 4e2c6ebde73..eb4dd758b3b 100644 --- a/board/ge/mx53ppd/mx53ppd_video.c +++ b/board/ge/mx53ppd/mx53ppd_video.c @@ -8,7 +8,6 @@ * Fabio Estevam <fabio.estevam@freescale.com> */ -#include <common.h> #include <dm.h> #include <linux/list.h> #include <asm/arch/iomux-mx53.h> diff --git a/board/google/chromebook_coral/coral.c b/board/google/chromebook_coral/coral.c index 9d9168d608a..7b2724c01d0 100644 --- a/board/google/chromebook_coral/coral.c +++ b/board/google/chromebook_coral/coral.c @@ -5,7 +5,6 @@ #define LOG_CATEGORY UCLASS_SYSINFO -#include <common.h> #include <bloblist.h> #include <command.h> #include <cros_ec.h> diff --git a/board/google/imx8mq_phanbell/imx8mq_phanbell.c b/board/google/imx8mq_phanbell/imx8mq_phanbell.c index d0a740dd3f4..9544d6dd19a 100644 --- a/board/google/imx8mq_phanbell/imx8mq_phanbell.c +++ b/board/google/imx8mq_phanbell/imx8mq_phanbell.c @@ -3,7 +3,6 @@ * Copyright 2020 NXP */ -#include <common.h> #include <env.h> #include <init.h> #include <malloc.h> diff --git a/board/google/imx8mq_phanbell/spl.c b/board/google/imx8mq_phanbell/spl.c index 83de5bfd75f..cfba9300dcb 100644 --- a/board/google/imx8mq_phanbell/spl.c +++ b/board/google/imx8mq_phanbell/spl.c @@ -4,7 +4,7 @@ * */ -#include <common.h> +#include <config.h> #include <hang.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c index 6d4c9debdee..bd8ce633772 100644 --- a/board/google/veyron/veyron.c +++ b/board/google/veyron/veyron.c @@ -4,7 +4,6 @@ */ #include <clk.h> -#include <common.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c index 64b32ca96df..8313b37655f 100644 --- a/board/grinn/chiliboard/board.c +++ b/board/grinn/chiliboard/board.c @@ -4,7 +4,7 @@ * Copyright (C) 2017, Grinn - http://grinn-global.com/ */ -#include <common.h> +#include <config.h> #include <init.h> #include <net.h> #include <asm/arch/chilisom.h> diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c index cf1d7cee925..07bb5b7d797 100644 --- a/board/grinn/liteboard/board.c +++ b/board/grinn/liteboard/board.c @@ -4,7 +4,6 @@ * Copyright (C) 2016 Grinn */ -#include <common.h> #include <command.h> #include <init.h> #include <asm/arch/clock.h> diff --git a/board/highbank/ahci.c b/board/highbank/ahci.c index 9c057278ace..899c502dfbc 100644 --- a/board/highbank/ahci.c +++ b/board/highbank/ahci.c @@ -3,7 +3,6 @@ * Copyright 2012 Calxeda, Inc. */ -#include <common.h> #include <ahci.h> #include <asm/io.h> #include <linux/delay.h> diff --git a/board/highbank/hb_sregs.c b/board/highbank/hb_sregs.c index d9dd2c2bf67..94052f7a3f9 100644 --- a/board/highbank/hb_sregs.c +++ b/board/highbank/hb_sregs.c @@ -10,7 +10,6 @@ * Copyright (C) 2019 Arm Ltd. */ -#include <common.h> #include <dm.h> #include <dm/lists.h> diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c index 7f67d1e4530..f3df83ed6c9 100644 --- a/board/highbank/highbank.c +++ b/board/highbank/highbank.c @@ -3,7 +3,6 @@ * Copyright 2010-2011 Calxeda, Inc. */ -#include <common.h> #include <ahci.h> #include <cpu_func.h> #include <env.h> diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c index c9a2d60ee56..95a831efcaf 100644 --- a/board/hisilicon/hikey/hikey.c +++ b/board/hisilicon/hikey/hikey.c @@ -3,7 +3,6 @@ * (C) Copyright 2015 Linaro * Peter Griffin <peter.griffin@linaro.org> */ -#include <common.h> #include <cpu_func.h> #include <dm.h> #include <fdt_support.h> diff --git a/board/hisilicon/hikey960/hikey960.c b/board/hisilicon/hikey960/hikey960.c index f41fabbad09..5029f4edb2a 100644 --- a/board/hisilicon/hikey960/hikey960.c +++ b/board/hisilicon/hikey960/hikey960.c @@ -4,7 +4,6 @@ * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> */ -#include <common.h> #include <cpu_func.h> #include <dm.h> #include <errno.h> diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c index b89e7e86976..c3ea080ff75 100644 --- a/board/hisilicon/poplar/poplar.c +++ b/board/hisilicon/poplar/poplar.c @@ -4,7 +4,6 @@ * Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> */ -#include <common.h> #include <cpu_func.h> #include <dm.h> #include <init.h> diff --git a/board/hoperun/hihope-rzg2/hihope-rzg2.c b/board/hoperun/hihope-rzg2/hihope-rzg2.c index 68d3d300dc4..0966e257464 100644 --- a/board/hoperun/hihope-rzg2/hihope-rzg2.c +++ b/board/hoperun/hihope-rzg2/hihope-rzg2.c @@ -6,7 +6,6 @@ * Copyright (C) 2021 Renesas Electronics Corporation */ -#include <common.h> #include <asm/global_data.h> #include <asm/io.h> #include <asm/processor.h> diff --git a/board/imgtec/boston/checkboard.c b/board/imgtec/boston/checkboard.c index c246a7b9d45..b0f7d3243c5 100644 --- a/board/imgtec/boston/checkboard.c +++ b/board/imgtec/boston/checkboard.c @@ -3,7 +3,6 @@ * Copyright (C) 2016 Imagination Technologies */ -#include <common.h> #include <init.h> #include <asm/io.h> diff --git a/board/imgtec/boston/ddr.c b/board/imgtec/boston/ddr.c index cecf454011c..55356d1175d 100644 --- a/board/imgtec/boston/ddr.c +++ b/board/imgtec/boston/ddr.c @@ -3,7 +3,7 @@ * Copyright (C) 2016 Imagination Technologies */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/imgtec/boston/dt.c b/board/imgtec/boston/dt.c index bf772ff5dec..874a21cec61 100644 --- a/board/imgtec/boston/dt.c +++ b/board/imgtec/boston/dt.c @@ -3,7 +3,6 @@ * Copyright (C) 2016 Imagination Technologies */ -#include <common.h> #include <fdt_support.h> #include <asm/global_data.h> diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c index 89f5e7ad792..4e268381d3c 100644 --- a/board/imgtec/ci20/ci20.c +++ b/board/imgtec/ci20/ci20.c @@ -6,7 +6,6 @@ * Author: Paul Burton <paul.burton@imgtec.com> */ -#include <common.h> #include <env.h> #include <init.h> #include <net.h> diff --git a/board/imgtec/malta/superio.c b/board/imgtec/malta/superio.c index aba11e25be3..edd5c203b16 100644 --- a/board/imgtec/malta/superio.c +++ b/board/imgtec/malta/superio.c @@ -6,7 +6,6 @@ * Setup code for the FDC37M817 super I/O controller */ -#include <common.h> #include <asm/io.h> #define SIO_CONF_PORT 0x3f0 diff --git a/board/imgtec/xilfpga/xilfpga.c b/board/imgtec/xilfpga/xilfpga.c index 71226927211..e50ee8efe55 100644 --- a/board/imgtec/xilfpga/xilfpga.c +++ b/board/imgtec/xilfpga/xilfpga.c @@ -8,7 +8,7 @@ * */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/intel/cherryhill/cherryhill.c b/board/intel/cherryhill/cherryhill.c index c037d5b14cd..b4378afee15 100644 --- a/board/intel/cherryhill/cherryhill.c +++ b/board/intel/cherryhill/cherryhill.c @@ -3,7 +3,6 @@ * Copyright (C) 2017, Bin Meng <bmeng.cn@gmail.com> */ -#include <common.h> #include <asm/arch/gpio.h> #include <asm/fsp1/fsp_support.h> diff --git a/board/intel/cougarcanyon2/cougarcanyon2.c b/board/intel/cougarcanyon2/cougarcanyon2.c index 7f61ef8b366..e5cda068e17 100644 --- a/board/intel/cougarcanyon2/cougarcanyon2.c +++ b/board/intel/cougarcanyon2/cougarcanyon2.c @@ -3,7 +3,6 @@ * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com> */ -#include <common.h> #include <dm.h> #include <errno.h> #include <init.h> diff --git a/board/intel/crownbay/crownbay.c b/board/intel/crownbay/crownbay.c index 55095deeadd..036beb1146d 100644 --- a/board/intel/crownbay/crownbay.c +++ b/board/intel/crownbay/crownbay.c @@ -3,7 +3,6 @@ * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com> */ -#include <common.h> #include <init.h> #include <asm/ibmpc.h> #include <asm/pnp_def.h> diff --git a/board/intel/edison/edison.c b/board/intel/edison/edison.c index 11e7f74e47c..911ffda2fc7 100644 --- a/board/intel/edison/edison.c +++ b/board/intel/edison/edison.c @@ -2,7 +2,6 @@ /* * Copyright (c) 2017 Intel Corporation */ -#include <common.h> #include <env.h> #include <init.h> #include <mmc.h> diff --git a/board/intel/galileo/galileo.c b/board/intel/galileo/galileo.c index 341b627a65f..19e5d0952fb 100644 --- a/board/intel/galileo/galileo.c +++ b/board/intel/galileo/galileo.c @@ -3,7 +3,6 @@ * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> */ -#include <common.h> #include <asm/io.h> #include <asm/arch/device.h> #include <asm/arch/quark.h> diff --git a/board/intel/minnowmax/minnowmax.c b/board/intel/minnowmax/minnowmax.c index b02e3f0d4e5..cdc2e0b75d8 100644 --- a/board/intel/minnowmax/minnowmax.c +++ b/board/intel/minnowmax/minnowmax.c @@ -3,7 +3,6 @@ * Copyright (C) 2015, Google, Inc */ -#include <common.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/intel/slimbootloader/slimbootloader.c b/board/intel/slimbootloader/slimbootloader.c index b20ddf0c682..f92c0b5112f 100644 --- a/board/intel/slimbootloader/slimbootloader.c +++ b/board/intel/slimbootloader/slimbootloader.c @@ -3,7 +3,6 @@ * Copyright (C) 2019 Intel Corporation <www.intel.com> */ -#include <common.h> #include <init.h> int board_early_init_r(void) diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c index f3a0de3967b..fbed8abcecf 100644 --- a/board/inversepath/usbarmory/usbarmory.c +++ b/board/inversepath/usbarmory/usbarmory.c @@ -7,7 +7,7 @@ * Andrej Rosano <andrej@inversepath.com> */ -#include <common.h> +#include <config.h> #include <command.h> #include <fs.h> #include <init.h> diff --git a/board/iomega/iconnect/iconnect.c b/board/iomega/iconnect/iconnect.c index 03871602001..00b08987e9e 100644 --- a/board/iomega/iconnect/iconnect.c +++ b/board/iomega/iconnect/iconnect.c @@ -6,7 +6,6 @@ * Luka Perkov <luka@openwrt.org> */ -#include <common.h> #include <init.h> #include <netdev.h> #include <asm/arch/cpu.h> diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c index 7dbb0800892..7cd26ce3c34 100644 --- a/board/isee/igep003x/board.c +++ b/board/isee/igep003x/board.c @@ -5,7 +5,7 @@ * Copyright (C) 2013-2017, ISEE 2007 SL - http://www.isee.biz/ */ -#include <common.h> +#include <config.h> #include <env.h> #include <errno.h> #include <init.h> diff --git a/board/isee/igep003x/mux.c b/board/isee/igep003x/mux.c index 550e3b3197d..1a40c007762 100644 --- a/board/isee/igep003x/mux.c +++ b/board/isee/igep003x/mux.c @@ -11,7 +11,6 @@ * GNU General Public License for more details. */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> #include <asm/arch/mux.h> diff --git a/board/isee/igep00x0/common.c b/board/isee/igep00x0/common.c index 3fdf83e845c..2584d2e5ddf 100644 --- a/board/isee/igep00x0/common.c +++ b/board/isee/igep00x0/common.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> #include <twl4030.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c index 8537b9686f2..a35a7cd3b1f 100644 --- a/board/isee/igep00x0/igep00x0.c +++ b/board/isee/igep00x0/igep00x0.c @@ -3,7 +3,7 @@ * (C) Copyright 2010 * ISEE 2007 SL, <www.iseebcn.com> */ -#include <common.h> +#include <config.h> #include <env.h> #include <init.h> #include <malloc.h> diff --git a/board/k+p/kp_imx53/kp_id_rev.c b/board/k+p/kp_imx53/kp_id_rev.c index 9f93cf008ce..cbfe94e25a2 100644 --- a/board/k+p/kp_imx53/kp_id_rev.c +++ b/board/k+p/kp_imx53/kp_id_rev.c @@ -9,11 +9,11 @@ * Daniel Gericke <daniel.gericke@tqs.de> */ -#include <common.h> #include <env.h> #include <i2c.h> #include "kp_id_rev.h" #include <net.h> +#include <vsprintf.h> static int eeprom_has_been_read; static struct id_eeprom eeprom; diff --git a/board/k+p/kp_imx53/kp_imx53.c b/board/k+p/kp_imx53/kp_imx53.c index 7c3a695cb25..efb7b49cbe0 100644 --- a/board/k+p/kp_imx53/kp_imx53.c +++ b/board/k+p/kp_imx53/kp_imx53.c @@ -4,7 +4,6 @@ * Lukasz Majewski, DENX Software Engineering, lukma@denx.de */ -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c index e6877e4c070..e0895194300 100644 --- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c @@ -5,7 +5,6 @@ * Copyright (C) 2018 Lukasz Majewski <lukma@denx.de> */ -#include <common.h> #include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c index 54902437940..6a5e252751d 100644 --- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c +++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c @@ -5,7 +5,6 @@ * Copyright (C) 2018 Lukasz Majewski <lukma@denx.de> */ -#include <common.h> #include <init.h> #include <log.h> #include <asm/arch/clock.h> diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c index 991022ac833..9358c25dcb0 100644 --- a/board/keymile/common/common.c +++ b/board/keymile/common/common.c @@ -7,7 +7,7 @@ * Holger Brunck, Keymile GmbH Hannover, holger.brunck@keymile.com */ -#include <common.h> +#include <config.h> #include <env.h> #include <ioports.h> #include <command.h> diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c index 67db0c50f47..f01fe44303c 100644 --- a/board/keymile/common/ivm.c +++ b/board/keymile/common/ivm.c @@ -4,10 +4,11 @@ * Holger Brunck, Keymile GmbH Hannover, holger.brunck@keymile.com */ -#include <common.h> #include <cli_hush.h> #include <env.h> #include <i2c.h> +#include <stdio.h> +#include <vsprintf.h> #include "common.h" #define MAC_STR_SZ 20 diff --git a/board/keymile/common/qrio.c b/board/keymile/common/qrio.c index b433f69675a..c8299483299 100644 --- a/board/keymile/common/qrio.c +++ b/board/keymile/common/qrio.c @@ -4,7 +4,7 @@ * Valentin Longchamp <valentin.longchamp@keymile.com> */ -#include <common.h> +#include <config.h> #include <asm/io.h> #include <linux/bitops.h> diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c index acd13105dd5..40718aa58a7 100644 --- a/board/keymile/km83xx/km83xx.c +++ b/board/keymile/km83xx/km83xx.c @@ -13,7 +13,7 @@ * Heiko Schocher, DENX Software Engineering, hs@denx.de. */ -#include <common.h> +#include <config.h> #include <env.h> #include <event.h> #include <fdt_support.h> diff --git a/board/keymile/kmcent2/tlb.c b/board/keymile/kmcent2/tlb.c index 41b24e39433..77e11e9bc1e 100644 --- a/board/keymile/kmcent2/tlb.c +++ b/board/keymile/kmcent2/tlb.c @@ -7,7 +7,7 @@ */ #include <asm/mmu.h> -#include <asm/u-boot.h> +#include <asm/ppc.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ diff --git a/board/keymile/pg-wcom-ls102xa/ddr.c b/board/keymile/pg-wcom-ls102xa/ddr.c index 556d39d4d4e..51938a1b4d8 100644 --- a/board/keymile/pg-wcom-ls102xa/ddr.c +++ b/board/keymile/pg-wcom-ls102xa/ddr.c @@ -4,7 +4,7 @@ * Copyright 2020 Hitachi Power Grids. All rights reserved. */ -#include <common.h> +#include <config.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <asm/io.h> diff --git a/board/keymile/secu1/socfpga.c b/board/keymile/secu1/socfpga.c index 6a4cb21786a..1a626c52068 100644 --- a/board/keymile/secu1/socfpga.c +++ b/board/keymile/secu1/socfpga.c @@ -2,7 +2,6 @@ /* * Copyright (C) 2017-2020 Hitachi Power Grids */ -#include <common.h> #include <i2c.h> #include <asm/gpio.h> diff --git a/board/kobol/helios4/helios4.c b/board/kobol/helios4/helios4.c index 9c5b687b3e8..4c8407bb676 100644 --- a/board/kobol/helios4/helios4.c +++ b/board/kobol/helios4/helios4.c @@ -4,7 +4,7 @@ * based on board/solidrun/clearfog/clearfog.c */ -#include <common.h> +#include <config.h> #include <i2c.h> #include <init.h> #include <miiphy.h> diff --git a/board/kontron/pitx_imx8m/pitx_imx8m.c b/board/kontron/pitx_imx8m/pitx_imx8m.c index 4548e7c1dff..a908aee9ecc 100644 --- a/board/kontron/pitx_imx8m/pitx_imx8m.c +++ b/board/kontron/pitx_imx8m/pitx_imx8m.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ #include "pitx_misc.h" -#include <common.h> #include <efi.h> #include <efi_loader.h> #include <init.h> diff --git a/board/kontron/pitx_imx8m/spl.c b/board/kontron/pitx_imx8m/spl.c index a247803a4b4..475e52f6231 100644 --- a/board/kontron/pitx_imx8m/spl.c +++ b/board/kontron/pitx_imx8m/spl.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> +#include <config.h> #include <errno.h> #include <fsl_esdhc_imx.h> #include <hang.h> diff --git a/board/kontron/sl-mx8mm/lpddr4_timing.c b/board/kontron/sl-mx8mm/lpddr4_timing.c index 74b79c7a009..851aeef8f8c 100644 --- a/board/kontron/sl-mx8mm/lpddr4_timing.c +++ b/board/kontron/sl-mx8mm/lpddr4_timing.c @@ -4,7 +4,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/kontron/sl28/cmds.c b/board/kontron/sl28/cmds.c index 08a22b5d01e..07514778753 100644 --- a/board/kontron/sl28/cmds.c +++ b/board/kontron/sl28/cmds.c @@ -5,10 +5,11 @@ * Copyright (c) 2020 Kontron Europe GmbH */ -#include <common.h> #include <command.h> #include <i2c.h> +#include <vsprintf.h> #include <linux/delay.h> +#include <linux/errno.h> #define CPLD_I2C_ADDR 0x4a #define REG_UFM_CTRL 0x02 @@ -171,8 +172,8 @@ out: return CMD_RET_FAILURE; } -static char sl28_help_text[] = - "nvm [<hex>] - display/set the 16 non-volatile bits\n"; +U_BOOT_LONGHELP(sl28, + "nvm [<hex>] - display/set the 16 non-volatile bits\n"); U_BOOT_CMD_WITH_SUBCMDS(sl28, "SMARC-sAL28 specific", sl28_help_text, U_BOOT_SUBCMD_MKENT(nvm, 2, 1, do_sl28_nvm)); diff --git a/board/kontron/sl28/common.c b/board/kontron/sl28/common.c index 331de29baee..d8d0172a21b 100644 --- a/board/kontron/sl28/common.c +++ b/board/kontron/sl28/common.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> +#include <config.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/kontron/sl28/ddr.c b/board/kontron/sl28/ddr.c index 315d9f99c71..9b881fdc265 100644 --- a/board/kontron/sl28/ddr.c +++ b/board/kontron/sl28/ddr.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> +#include <config.h> #include <asm/global_data.h> #include <asm/io.h> #include <fsl_ddr_sdram.h> diff --git a/board/kontron/sl28/sl28.c b/board/kontron/sl28/sl28.c index 4ab221c12bf..adfec8ba237 100644 --- a/board/kontron/sl28/sl28.c +++ b/board/kontron/sl28/sl28.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> #include <dm.h> #include <malloc.h> #include <efi.h> diff --git a/board/kontron/sl28/spl.c b/board/kontron/sl28/spl.c index 80acde74956..45a4fc65120 100644 --- a/board/kontron/sl28/spl.c +++ b/board/kontron/sl28/spl.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> +#include <config.h> #include <asm/io.h> #include <asm/spl.h> #include <asm/arch-fsl-layerscape/fsl_serdes.h> diff --git a/board/kontron/sl28/spl_atf.c b/board/kontron/sl28/spl_atf.c index a9cd6850e98..0710316a48b 100644 --- a/board/kontron/sl28/spl_atf.c +++ b/board/kontron/sl28/spl_atf.c @@ -5,7 +5,7 @@ * Copyright (c) 2020 Michael Walle <michael@walle.cc> */ -#include <common.h> +#include <config.h> #include <asm/global_data.h> #include <asm/io.h> #include <atf_common.h> diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c index f009a8afd48..3220727f236 100644 --- a/board/kosagi/novena/novena.c +++ b/board/kosagi/novena/novena.c @@ -5,7 +5,6 @@ * Copyright (C) 2014 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <display_options.h> #include <dm.h> #include <eeprom.h> diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c index 24c0fb22268..008418b0184 100644 --- a/board/kosagi/novena/novena_spl.c +++ b/board/kosagi/novena/novena_spl.c @@ -5,7 +5,7 @@ * Copyright (C) 2014 Marek Vasut <marex@denx.de> */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <init.h> #include <asm/io.h> diff --git a/board/kosagi/novena/video.c b/board/kosagi/novena/video.c index a96a877f5f2..be5a737a31d 100644 --- a/board/kosagi/novena/video.c +++ b/board/kosagi/novena/video.c @@ -9,7 +9,6 @@ * Copyright (C) 2014 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <log.h> #include <linux/delay.h> #include <linux/errno.h> diff --git a/board/l+g/vinco/vinco.c b/board/l+g/vinco/vinco.c index b3c176dd59a..066d315baa2 100644 --- a/board/l+g/vinco/vinco.c +++ b/board/l+g/vinco/vinco.c @@ -9,7 +9,7 @@ * Gregory CLEMENT <gregory.clement@free-electrons.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/lego/ev3/legoev3.c b/board/lego/ev3/legoev3.c index 43afe593c78..1a153668a43 100644 --- a/board/lego/ev3/legoev3.c +++ b/board/lego/ev3/legoev3.c @@ -12,7 +12,7 @@ * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> */ -#include <common.h> +#include <config.h> #include <env.h> #include <i2c.h> #include <init.h> diff --git a/board/lg/sniper/sniper.c b/board/lg/sniper/sniper.c index 86032d7fcdf..88d5d088143 100644 --- a/board/lg/sniper/sniper.c +++ b/board/lg/sniper/sniper.c @@ -6,7 +6,6 @@ */ #include <config.h> -#include <common.h> #include <dm.h> #include <env.h> #include <fastboot.h> diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c index e3a59dbec00..a0bbd03e8d1 100644 --- a/board/liebherr/display5/display5.c +++ b/board/liebherr/display5/display5.c @@ -4,7 +4,6 @@ * Lukasz Majewski, DENX Software Engineering, lukma@denx.de */ -#include <common.h> #include <dm.h> #include <fdt_support.h> #include <init.h> diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c index 97928e92215..819d3acbe56 100644 --- a/board/liebherr/display5/spl.c +++ b/board/liebherr/display5/spl.c @@ -4,7 +4,6 @@ * Lukasz Majewski, DENX Software Engineering, lukma@denx.de */ -#include <common.h> #include <cpu_func.h> #include <env.h> #include <image.h> diff --git a/board/liebherr/mccmon6/mccmon6.c b/board/liebherr/mccmon6/mccmon6.c index 1b49526fba4..fef915b2aca 100644 --- a/board/liebherr/mccmon6/mccmon6.c +++ b/board/liebherr/mccmon6/mccmon6.c @@ -4,7 +4,6 @@ * Lukasz Majewski, DENX Software Engineering, lukma@denx.de */ -#include <common.h> #include <env.h> #include <init.h> #include <serial.h> diff --git a/board/liebherr/xea/spl_xea.c b/board/liebherr/xea/spl_xea.c index 6cf8f8390e8..88c157eca45 100644 --- a/board/liebherr/xea/spl_xea.c +++ b/board/liebherr/xea/spl_xea.c @@ -12,7 +12,6 @@ * on behalf of DENX Software Engineering GmbH */ -#include <common.h> #include <config.h> #include <asm/io.h> #include <asm/arch/iomux-mx28.h> diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c index 0a6fd7f1437..9ade3563b25 100644 --- a/board/liebherr/xea/xea.c +++ b/board/liebherr/xea/xea.c @@ -13,7 +13,6 @@ * */ -#include <common.h> #include <fdt_support.h> #include <init.h> #include <log.h> diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c index e69a73f2af6..e6ca31016b7 100644 --- a/board/logicpd/am3517evm/am3517evm.c +++ b/board/logicpd/am3517evm/am3517evm.c @@ -10,7 +10,6 @@ * Texas Instruments Incorporated - https://www.ti.com/ */ -#include <common.h> #include <dm.h> #include <init.h> #include <net.h> diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c index 0d53548dcb4..589136fd64a 100644 --- a/board/logicpd/imx6/imx6logic.c +++ b/board/logicpd/imx6/imx6logic.c @@ -8,7 +8,6 @@ * and updates by Jagan Teki <jagan@amarulasolutions.com> */ -#include <common.h> #include <env.h> #include <init.h> #include <miiphy.h> diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c index 86992829caf..a9fe61918b6 100644 --- a/board/logicpd/omap3som/omap3logic.c +++ b/board/logicpd/omap3som/omap3logic.c @@ -10,7 +10,7 @@ * Richard Woodruff <r-woodruff2@ti.com> * Syed Mohammed Khasim <khasim@ti.com> */ -#include <common.h> +#include <config.h> #include <dm.h> #include <init.h> #include <net.h> diff --git a/board/maxbcm/maxbcm.c b/board/maxbcm/maxbcm.c index aad3dc86429..e011520f2ec 100644 --- a/board/maxbcm/maxbcm.c +++ b/board/maxbcm/maxbcm.c @@ -3,7 +3,6 @@ * Copyright (C) 2014 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <init.h> #include <miiphy.h> #include <asm/global_data.h> diff --git a/board/mediatek/mt7622/mt7622_rfb.c b/board/mediatek/mt7622/mt7622_rfb.c index 2cc73bc35dc..e7f492a13bc 100644 --- a/board/mediatek/mt7622/mt7622_rfb.c +++ b/board/mediatek/mt7622/mt7622_rfb.c @@ -4,7 +4,6 @@ * Author: Sam Shih <sam.shih@mediatek.com> */ -#include <common.h> #include <config.h> #include <env.h> #include <init.h> diff --git a/board/mediatek/mt7623/mt7623_rfb.c b/board/mediatek/mt7623/mt7623_rfb.c index ec10f77c51e..c78eaa07243 100644 --- a/board/mediatek/mt7623/mt7623_rfb.c +++ b/board/mediatek/mt7623/mt7623_rfb.c @@ -3,7 +3,7 @@ * Copyright (C) 2018 MediaTek Inc. */ -#include <common.h> +#include <config.h> #include <mmc.h> #include <asm/global_data.h> diff --git a/board/mediatek/mt7629/mt7629_rfb.c b/board/mediatek/mt7629/mt7629_rfb.c index 55f7696c510..02719181624 100644 --- a/board/mediatek/mt7629/mt7629_rfb.c +++ b/board/mediatek/mt7629/mt7629_rfb.c @@ -3,7 +3,7 @@ * Copyright (C) 2018 MediaTek Inc. */ -#include <common.h> +#include <config.h> #include <asm/global_data.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/board/mediatek/mt8183/mt8183_pumpkin.c b/board/mediatek/mt8183/mt8183_pumpkin.c index db613ebdc4f..1b8736966f6 100644 --- a/board/mediatek/mt8183/mt8183_pumpkin.c +++ b/board/mediatek/mt8183/mt8183_pumpkin.c @@ -4,7 +4,6 @@ * Author: Fabien Parent <fparent@baylibre.com> */ -#include <common.h> #include <dm.h> #include <net.h> diff --git a/board/mediatek/mt8512/mt8512.c b/board/mediatek/mt8512/mt8512.c index ac3adb80122..d2f557ffee5 100644 --- a/board/mediatek/mt8512/mt8512.c +++ b/board/mediatek/mt8512/mt8512.c @@ -3,7 +3,6 @@ * Copyright (C) 2019 MediaTek Inc. */ -#include <common.h> #include <dm.h> #include <log.h> #include <wdt.h> diff --git a/board/mediatek/mt8516/mt8516_pumpkin.c b/board/mediatek/mt8516/mt8516_pumpkin.c index 42f3863b92c..930bfec3483 100644 --- a/board/mediatek/mt8516/mt8516_pumpkin.c +++ b/board/mediatek/mt8516/mt8516_pumpkin.c @@ -3,7 +3,6 @@ * Copyright (C) 2019 BayLibre SAS */ -#include <common.h> #include <dm.h> #include <net.h> diff --git a/board/mediatek/mt8518/mt8518_ap1.c b/board/mediatek/mt8518/mt8518_ap1.c index e03da63b1d9..745cfda2ddf 100644 --- a/board/mediatek/mt8518/mt8518_ap1.c +++ b/board/mediatek/mt8518/mt8518_ap1.c @@ -3,7 +3,7 @@ * Copyright (C) 2019 MediaTek Inc. */ -#include <common.h> +#include <config.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c index b8dffb0e485..79351f47273 100644 --- a/board/menlo/m53menlo/m53menlo.c +++ b/board/menlo/m53menlo/m53menlo.c @@ -6,7 +6,6 @@ * Copyright (C) 2014-2017 Olaf Mandel <o.mandel@menlosystems.com> */ -#include <common.h> #include <dm.h> #include <init.h> #include <malloc.h> diff --git a/board/menlo/mx8menlo/mx8menlo.c b/board/menlo/mx8menlo/mx8menlo.c index 18f5fd5c5ee..f47b45c1d56 100644 --- a/board/menlo/mx8menlo/mx8menlo.c +++ b/board/menlo/mx8menlo/mx8menlo.c @@ -3,7 +3,6 @@ * Copyright 2021-2022 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <asm/arch/clock.h> #include <asm/arch/imx8mm_pins.h> #include <asm/arch/sys_proto.h> diff --git a/board/microchip/mpfs_icicle/mpfs_icicle.c b/board/microchip/mpfs_icicle/mpfs_icicle.c index 31523c081ee..4d7d843dfa3 100644 --- a/board/microchip/mpfs_icicle/mpfs_icicle.c +++ b/board/microchip/mpfs_icicle/mpfs_icicle.c @@ -4,7 +4,6 @@ * Padmarao Begari <padmarao.begari@microchip.com> */ -#include <common.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/microchip/pic32mzda/pic32mzda.c b/board/microchip/pic32mzda/pic32mzda.c index 3c2203d2202..848a1aee400 100644 --- a/board/microchip/pic32mzda/pic32mzda.c +++ b/board/microchip/pic32mzda/pic32mzda.c @@ -7,7 +7,6 @@ * */ -#include <common.h> #include <dm.h> #include <clk.h> #include <init.h> diff --git a/board/mikrotik/crs3xx-98dx3236/crs3xx-98dx3236.c b/board/mikrotik/crs3xx-98dx3236/crs3xx-98dx3236.c index 315169ba661..ae1c586277f 100644 --- a/board/mikrotik/crs3xx-98dx3236/crs3xx-98dx3236.c +++ b/board/mikrotik/crs3xx-98dx3236/crs3xx-98dx3236.c @@ -3,7 +3,6 @@ * Copyright (C) 2015 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <i2c.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/mntre/imx8mq_reform2/imx8mq_reform2.c b/board/mntre/imx8mq_reform2/imx8mq_reform2.c index be5c5060a2a..ebc490e24b1 100644 --- a/board/mntre/imx8mq_reform2/imx8mq_reform2.c +++ b/board/mntre/imx8mq_reform2/imx8mq_reform2.c @@ -4,7 +4,6 @@ * Copyright (C) 2018, Boundary Devices <info@boundarydevices.com> */ -#include <common.h> #include <env.h> #include <init.h> #include <malloc.h> diff --git a/board/mntre/imx8mq_reform2/spl.c b/board/mntre/imx8mq_reform2/spl.c index 5120c628b91..48a783593b6 100644 --- a/board/mntre/imx8mq_reform2/spl.c +++ b/board/mntre/imx8mq_reform2/spl.c @@ -5,7 +5,7 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#include <common.h> +#include <config.h> #include <hang.h> #include <image.h> #include <init.h> diff --git a/board/msc/sm2s_imx8mp/sm2s_imx8mp.c b/board/msc/sm2s_imx8mp/sm2s_imx8mp.c index 6ccbf02db06..b1ce014bd55 100644 --- a/board/msc/sm2s_imx8mp/sm2s_imx8mp.c +++ b/board/msc/sm2s_imx8mp/sm2s_imx8mp.c @@ -7,7 +7,6 @@ * Copyright 2021 Collabora Ltd. */ -#include <common.h> #include <errno.h> #include <miiphy.h> #include <netdev.h> diff --git a/board/msc/sm2s_imx8mp/spl.c b/board/msc/sm2s_imx8mp/spl.c index ed7a1b7d3d0..b1b5561838d 100644 --- a/board/msc/sm2s_imx8mp/spl.c +++ b/board/msc/sm2s_imx8mp/spl.c @@ -7,7 +7,7 @@ * Copyright 2021 Collabora Ltd. */ -#include <common.h> +#include <config.h> #include <cpu_func.h> #include <fsl_esdhc_imx.h> #include <hang.h> diff --git a/board/mscc/common/spi.c b/board/mscc/common/spi.c index 45b9649336d..cb43ad6811e 100644 --- a/board/mscc/common/spi.c +++ b/board/mscc/common/spi.c @@ -3,7 +3,6 @@ * Copyright (c) 2018 Microsemi Coprporation */ -#include <common.h> #include <asm/io.h> #include <spi.h> #include <linux/bitops.h> diff --git a/board/mscc/jr2/jr2.c b/board/mscc/jr2/jr2.c index 84b95be648d..acaeb468022 100644 --- a/board/mscc/jr2/jr2.c +++ b/board/mscc/jr2/jr2.c @@ -3,7 +3,7 @@ * Copyright (c) 2018 Microsemi Corporation */ -#include <common.h> +#include <config.h> #include <image.h> #include <init.h> #include <asm/io.h> diff --git a/board/mscc/luton/luton.c b/board/mscc/luton/luton.c index 48170b3aa12..f9ea26ebc5c 100644 --- a/board/mscc/luton/luton.c +++ b/board/mscc/luton/luton.c @@ -3,7 +3,7 @@ * Copyright (c) 2018 Microsemi Corporation */ -#include <common.h> +#include <config.h> #include <image.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c index d69db04de66..4cec25b3976 100644 --- a/board/mscc/ocelot/ocelot.c +++ b/board/mscc/ocelot/ocelot.c @@ -3,7 +3,7 @@ * Copyright (c) 2018 Microsemi Corporation */ -#include <common.h> +#include <config.h> #include <image.h> #include <init.h> #include <log.h> diff --git a/board/mscc/serval/serval.c b/board/mscc/serval/serval.c index 99d5f5be657..951c24dd286 100644 --- a/board/mscc/serval/serval.c +++ b/board/mscc/serval/serval.c @@ -3,7 +3,7 @@ * Copyright (c) 2018 Microsemi Corporation */ -#include <common.h> +#include <config.h> #include <image.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/mscc/servalt/servalt.c b/board/mscc/servalt/servalt.c index 49993168c23..9055b73ada2 100644 --- a/board/mscc/servalt/servalt.c +++ b/board/mscc/servalt/servalt.c @@ -3,7 +3,7 @@ * Copyright (c) 2018 Microsemi Corporation */ -#include <common.h> +#include <config.h> #include <image.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/myir/mys_6ulx/spl.c b/board/myir/mys_6ulx/spl.c index 3cf14e2bc66..4414487eff2 100644 --- a/board/myir/mys_6ulx/spl.c +++ b/board/myir/mys_6ulx/spl.c @@ -4,7 +4,7 @@ * Author: Parthiban Nallathambi <parthiban@linumiz.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <spl.h> #include <asm/arch/clock.h> diff --git a/board/netgear/dgnd3700v2/dgnd3700v2.c b/board/netgear/dgnd3700v2/dgnd3700v2.c index cfc3529c348..9cf3a2fe60a 100644 --- a/board/netgear/dgnd3700v2/dgnd3700v2.c +++ b/board/netgear/dgnd3700v2/dgnd3700v2.c @@ -3,7 +3,6 @@ * Copyright (C) 2018 Álvaro Fernández Rojas <noltari@gmail.com> */ -#include <common.h> #include <init.h> #include <asm/io.h> #include <linux/bitops.h> diff --git a/board/novtech/meerkat96/meerkat96.c b/board/novtech/meerkat96/meerkat96.c index 1edebe5db9b..ca3b0698f5a 100644 --- a/board/novtech/meerkat96/meerkat96.c +++ b/board/novtech/meerkat96/meerkat96.c @@ -12,7 +12,6 @@ #include <asm/global_data.h> #include <asm/mach-imx/iomux-v3.h> #include <asm/io.h> -#include <common.h> #include <linux/sizes.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/board/nuvoton/arbel_evb/arbel_evb.c b/board/nuvoton/arbel_evb/arbel_evb.c index 53c931c3c24..1f519219e7e 100644 --- a/board/nuvoton/arbel_evb/arbel_evb.c +++ b/board/nuvoton/arbel_evb/arbel_evb.c @@ -3,7 +3,6 @@ * Copyright (c) 2022 Nuvoton Technology Corp. */ -#include <common.h> #include <dm.h> #include <asm/io.h> #include <asm/arch/gcr.h> diff --git a/board/nuvoton/poleg_evb/poleg_evb.c b/board/nuvoton/poleg_evb/poleg_evb.c index e69bca95031..3c4e5aaf294 100644 --- a/board/nuvoton/poleg_evb/poleg_evb.c +++ b/board/nuvoton/poleg_evb/poleg_evb.c @@ -4,7 +4,6 @@ * Copyright (c) 2021 Nuvoton Technology Corp. */ -#include <common.h> #include <dm.h> #include <env.h> #include <asm/io.h> diff --git a/board/nvidia/beaver/beaver-spl.c b/board/nvidia/beaver/beaver-spl.c index b5d0c14854d..c6956ff9f58 100644 --- a/board/nvidia/beaver/beaver-spl.c +++ b/board/nvidia/beaver/beaver-spl.c @@ -7,7 +7,6 @@ * Svyatoslav Ryhel <clamor95@gmail.com> */ -#include <common.h> #include <asm/arch-tegra/tegra_i2c.h> #include <linux/delay.h> diff --git a/board/nvidia/cardhu/cardhu-spl.c b/board/nvidia/cardhu/cardhu-spl.c index de2fa300f1c..80912a65a19 100644 --- a/board/nvidia/cardhu/cardhu-spl.c +++ b/board/nvidia/cardhu/cardhu-spl.c @@ -7,7 +7,6 @@ * Svyatoslav Ryhel <clamor95@gmail.com> */ -#include <common.h> #include <asm/arch-tegra/tegra_i2c.h> #include <linux/delay.h> diff --git a/board/nvidia/cardhu/cardhu.c b/board/nvidia/cardhu/cardhu.c index 6848e340046..ab0dc61ebe5 100644 --- a/board/nvidia/cardhu/cardhu.c +++ b/board/nvidia/cardhu/cardhu.c @@ -4,7 +4,6 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> #include <dm.h> #include <log.h> #include <asm/arch/pinmux.h> diff --git a/board/nvidia/dalmore/dalmore.c b/board/nvidia/dalmore/dalmore.c index 72511e401e3..c00c6343eaa 100644 --- a/board/nvidia/dalmore/dalmore.c +++ b/board/nvidia/dalmore/dalmore.c @@ -3,7 +3,6 @@ * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. */ -#include <common.h> #include <dm.h> #include <log.h> #include <asm/arch/pinmux.h> diff --git a/board/nvidia/harmony/harmony.c b/board/nvidia/harmony/harmony.c index 52236792e24..da14e09c40c 100644 --- a/board/nvidia/harmony/harmony.c +++ b/board/nvidia/harmony/harmony.c @@ -4,7 +4,6 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/funcmux.h> diff --git a/board/nvidia/jetson-tk1/jetson-tk1.c b/board/nvidia/jetson-tk1/jetson-tk1.c index 7f3cdd70fe7..da6edb42c1e 100644 --- a/board/nvidia/jetson-tk1/jetson-tk1.c +++ b/board/nvidia/jetson-tk1/jetson-tk1.c @@ -4,7 +4,6 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> #include <dm.h> #include <log.h> #include <linux/printk.h> diff --git a/board/nvidia/nyan-big/nyan-big.c b/board/nvidia/nyan-big/nyan-big.c index 06a36f8ed38..e15f31dcfd7 100644 --- a/board/nvidia/nyan-big/nyan-big.c +++ b/board/nvidia/nyan-big/nyan-big.c @@ -4,7 +4,6 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> #include <dm.h> #include <errno.h> #include <log.h> diff --git a/board/nvidia/p2371-0000/p2371-0000.c b/board/nvidia/p2371-0000/p2371-0000.c index b819b049f4b..edf2b1adb7c 100644 --- a/board/nvidia/p2371-0000/p2371-0000.c +++ b/board/nvidia/p2371-0000/p2371-0000.c @@ -4,7 +4,6 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> #include <i2c.h> #include <log.h> #include <asm/arch/gpio.h> diff --git a/board/nvidia/p2371-2180/p2371-2180.c b/board/nvidia/p2371-2180/p2371-2180.c index 816c7bec6ae..5f203d8ffaa 100644 --- a/board/nvidia/p2371-2180/p2371-2180.c +++ b/board/nvidia/p2371-2180/p2371-2180.c @@ -4,7 +4,6 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> #include <env.h> #include <fdtdec.h> #include <i2c.h> diff --git a/board/nvidia/p2571/p2571.c b/board/nvidia/p2571/p2571.c index a4c4259eeae..4056f986483 100644 --- a/board/nvidia/p2571/p2571.c +++ b/board/nvidia/p2571/p2571.c @@ -4,7 +4,6 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> #include <i2c.h> #include <log.h> #include <asm/arch/gpio.h> diff --git a/board/nvidia/p2771-0000/p2771-0000.c b/board/nvidia/p2771-0000/p2771-0000.c index 5ff89c45423..12eaa7a1e53 100644 --- a/board/nvidia/p2771-0000/p2771-0000.c +++ b/board/nvidia/p2771-0000/p2771-0000.c @@ -3,7 +3,6 @@ * Copyright (c) 2016, NVIDIA CORPORATION */ -#include <common.h> #include <env.h> #include <fdtdec.h> #include <i2c.h> diff --git a/board/nvidia/p3450-0000/p3450-0000.c b/board/nvidia/p3450-0000/p3450-0000.c index fb1a224daa7..530c438a2e3 100644 --- a/board/nvidia/p3450-0000/p3450-0000.c +++ b/board/nvidia/p3450-0000/p3450-0000.c @@ -5,7 +5,6 @@ * */ -#include <common.h> #include <fdtdec.h> #include <i2c.h> #include <linux/bitops.h> diff --git a/board/nvidia/seaboard/seaboard.c b/board/nvidia/seaboard/seaboard.c index 829751112f1..a646dcc96b5 100644 --- a/board/nvidia/seaboard/seaboard.c +++ b/board/nvidia/seaboard/seaboard.c @@ -4,7 +4,6 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> #include <asm/io.h> #include <asm/mach-types.h> #include <asm/arch/tegra.h> diff --git a/board/nvidia/venice2/as3722_init.c b/board/nvidia/venice2/as3722_init.c index 395bdd99c78..b89e03703b2 100644 --- a/board/nvidia/venice2/as3722_init.c +++ b/board/nvidia/venice2/as3722_init.c @@ -4,7 +4,6 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> #include <log.h> #include <asm/io.h> #include <asm/arch-tegra/tegra_i2c.h> diff --git a/board/nvidia/venice2/venice2.c b/board/nvidia/venice2/venice2.c index d89bbe5ecce..fa10cda4870 100644 --- a/board/nvidia/venice2/venice2.c +++ b/board/nvidia/venice2/venice2.c @@ -4,7 +4,7 @@ * NVIDIA Corporation <www.nvidia.com> */ -#include <common.h> +#include <linux/kernel.h> #include <asm/arch/gpio.h> #include <asm/arch/pinmux.h> #include "pinmux-config-venice2.h" diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c index bdd5fcd76ae..b2bb6678c23 100644 --- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c +++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c @@ -5,7 +5,6 @@ * Copyright (C) 2013 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/gpio.h> diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c index 248176c23cd..eb85ce9643d 100644 --- a/board/olimex/mx23_olinuxino/spl_boot.c +++ b/board/olimex/mx23_olinuxino/spl_boot.c @@ -5,7 +5,6 @@ * Copyright (C) 2013 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <config.h> #include <asm/io.h> #include <asm/arch/iomux-mx23.h> diff --git a/board/openpiton/riscv64/openpiton-riscv64.c b/board/openpiton/riscv64/openpiton-riscv64.c index f2282d15488..4c957e88992 100644 --- a/board/openpiton/riscv64/openpiton-riscv64.c +++ b/board/openpiton/riscv64/openpiton-riscv64.c @@ -8,7 +8,6 @@ * Pragnesh Patel <pragnesh.patel@sifive.com> * Tianrui Wei <tianrui-wei@outlook.com> */ -#include <common.h> #include <init.h> #include <configs/openpiton-riscv64.h> #include <dm.h> diff --git a/board/out4/o4-imx6ull-nano/o4-imx6ull-nano.c b/board/out4/o4-imx6ull-nano/o4-imx6ull-nano.c index edb200e9e55..10469aecd0b 100644 --- a/board/out4/o4-imx6ull-nano/o4-imx6ull-nano.c +++ b/board/out4/o4-imx6ull-nano/o4-imx6ull-nano.c @@ -5,7 +5,6 @@ #include <asm/arch/sys_proto.h> #include <asm/global_data.h> #include <asm/mach-imx/boot_mode.h> -#include <common.h> #include <env.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/board/phytec/common/Kconfig b/board/phytec/common/Kconfig index 1077f0f4b61..f394ace786a 100644 --- a/board/phytec/common/Kconfig +++ b/board/phytec/common/Kconfig @@ -4,6 +4,13 @@ config PHYTEC_SOM_DETECTION help Support of I2C EEPROM based SoM detection. +config PHYTEC_SOM_DETECTION_BLOCKS + bool "Extend SoM detection with block support" + depends on PHYTEC_SOM_DETECTION + help + Extend the I2C EEPROM based SoM detection with API v3. This API + introduces blocks with different payloads. + config PHYTEC_IMX8M_SOM_DETECTION bool "Support SoM detection for i.MX8M PHYTEC platforms" depends on ARCH_IMX8M && PHYTEC_SOM_DETECTION @@ -16,6 +23,8 @@ config PHYTEC_AM62_SOM_DETECTION bool "Support SoM detection for AM62x PHYTEC platforms" depends on (TARGET_PHYCORE_AM62X_A53 || TARGET_PHYCORE_AM62X_R5) && \ PHYTEC_SOM_DETECTION + select PHYTEC_SOM_DETECTION_BLOCKS + depends on SPL_I2C && DM_I2C default y help Support of I2C EEPROM based SoM detection. Supported @@ -25,6 +34,8 @@ config PHYTEC_AM64_SOM_DETECTION bool "Support SoM detection for AM64x PHYTEC platforms" depends on (TARGET_PHYCORE_AM64X_A53 || TARGET_PHYCORE_AM64X_R5) && \ PHYTEC_SOM_DETECTION + select PHYTEC_SOM_DETECTION_BLOCKS + depends on SPL_I2C && DM_I2C default y help Support of I2C EEPROM based SoM detection. Supported diff --git a/board/phytec/common/Makefile b/board/phytec/common/Makefile index 3feb00fd1ec..04469d0a924 100644 --- a/board/phytec/common/Makefile +++ b/board/phytec/common/Makefile @@ -7,6 +7,6 @@ ifdef CONFIG_SPL_BUILD obj- := __dummy__.o endif -obj-y += phytec_som_detection.o -obj-$(CONFIG_ARCH_K3) += am6_som_detection.o +obj-y += phytec_som_detection.o phytec_som_detection_blocks.o +obj-$(CONFIG_ARCH_K3) += am6_som_detection.o k3/ obj-$(CONFIG_ARCH_IMX8M) += imx8m_som_detection.o diff --git a/board/phytec/common/am6_som_detection.c b/board/phytec/common/am6_som_detection.c index 2e9884dab44..7930ab42d1c 100644 --- a/board/phytec/common/am6_som_detection.c +++ b/board/phytec/common/am6_som_detection.c @@ -73,7 +73,7 @@ static u8 phytec_check_opt(struct phytec_eeprom_data *data, u8 option) * - The size * - PHYTEC_EEPROM_INVAL when the data is invalid. */ -u8 __maybe_unused phytec_get_am62_ddr_size(struct phytec_eeprom_data *data) +u8 __maybe_unused phytec_get_am6_ddr_size(struct phytec_eeprom_data *data) { u8 ddr_id = phytec_check_opt(data, 3); @@ -89,7 +89,7 @@ u8 __maybe_unused phytec_get_am62_ddr_size(struct phytec_eeprom_data *data) * - Otherwise a board depended code for the size. * - PHYTEC_EEPROM_INVAL when the data is invalid. */ -u8 __maybe_unused phytec_get_am62_spi(struct phytec_eeprom_data *data) +u8 __maybe_unused phytec_get_am6_spi(struct phytec_eeprom_data *data) { u8 spi = phytec_check_opt(data, 5); @@ -105,7 +105,7 @@ u8 __maybe_unused phytec_get_am62_spi(struct phytec_eeprom_data *data) * - 0x1 if 10/100/1000 MBit Phy is populated. * - PHYTEC_EEPROM_INVAL when the data is invalid. */ -u8 __maybe_unused phytec_get_am62_eth(struct phytec_eeprom_data *data) +u8 __maybe_unused phytec_get_am6_eth(struct phytec_eeprom_data *data) { u8 eth = phytec_check_opt(data, 6); @@ -121,7 +121,7 @@ u8 __maybe_unused phytec_get_am62_eth(struct phytec_eeprom_data *data) * - 1 if it is populated. * - PHYTEC_EEPROM_INVAL when the data is invalid. */ -u8 __maybe_unused phytec_get_am62_rtc(struct phytec_eeprom_data *data) +u8 __maybe_unused phytec_get_am6_rtc(struct phytec_eeprom_data *data) { u8 rtc = phytec_check_opt(data, 7); @@ -131,28 +131,28 @@ u8 __maybe_unused phytec_get_am62_rtc(struct phytec_eeprom_data *data) #else -inline int __maybe_unused phytec_am62_detect(struct phytec_eeprom_data *data) +inline int __maybe_unused phytec_am6_detect(struct phytec_eeprom_data *data) { return -1; } inline u8 __maybe_unused -phytec_get_am62_ddr_size(struct phytec_eeprom_data *data) +phytec_get_am6_ddr_size(struct phytec_eeprom_data *data) { return PHYTEC_EEPROM_INVAL; } -inline u8 __maybe_unused phytec_get_am62_spi(struct phytec_eeprom_data *data) +inline u8 __maybe_unused phytec_get_am6_spi(struct phytec_eeprom_data *data) { return PHYTEC_EEPROM_INVAL; } -inline u8 __maybe_unused phytec_get_am62_eth(struct phytec_eeprom_data *data) +inline u8 __maybe_unused phytec_get_am6_eth(struct phytec_eeprom_data *data) { return PHYTEC_EEPROM_INVAL; } -inline u8 __maybe_unused phytec_get_am62_rtc(struct phytec_eeprom_data *data) +inline u8 __maybe_unused phytec_get_am6_rtc(struct phytec_eeprom_data *data) { return PHYTEC_EEPROM_INVAL; } diff --git a/board/phytec/common/am6_som_detection.h b/board/phytec/common/am6_som_detection.h index 032f9da3aab..c5c6e179da6 100644 --- a/board/phytec/common/am6_som_detection.h +++ b/board/phytec/common/am6_som_detection.h @@ -9,11 +9,19 @@ #include "phytec_som_detection.h" +#define EEPROM_ADDR 0x50 #define PHYTEC_AM62X_SOM 71 #define PHYTEC_AM64X_SOM 72 #define PHYTEC_EEPROM_VALUE_X 0x21 #define PHYTEC_EEPROM_NOR_FLASH_64MB_QSPI 0xC +enum { + EEPROM_RAM_SIZE_512MB = 0, + EEPROM_RAM_SIZE_1GB = 1, + EEPROM_RAM_SIZE_2GB = 2, + EEPROM_RAM_SIZE_4GB = 4 +}; + int __maybe_unused phytec_am6_detect(struct phytec_eeprom_data *data); u8 __maybe_unused phytec_get_am6_ddr_size(struct phytec_eeprom_data *data); u8 __maybe_unused phytec_get_am6_spi(struct phytec_eeprom_data *data); diff --git a/board/phytec/common/imx8m_som_detection.c b/board/phytec/common/imx8m_som_detection.c index ee34a5b9579..bfd60ffb777 100644 --- a/board/phytec/common/imx8m_som_detection.c +++ b/board/phytec/common/imx8m_som_detection.c @@ -4,7 +4,6 @@ * Author: Teresa Remmet <t.remmet@phytec.de> */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <dm/device.h> #include <dm/uclass.h> diff --git a/board/phytec/common/k3/Makefile b/board/phytec/common/k3/Makefile new file mode 100644 index 00000000000..40e91a43e99 --- /dev/null +++ b/board/phytec/common/k3/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0+ +obj-y += board.o +obj-$(CONFIG_K3_DDRSS) += k3_ddrss_patch.o diff --git a/board/phytec/common/k3/board.c b/board/phytec/common/k3/board.c new file mode 100644 index 00000000000..3d7e090ccaa --- /dev/null +++ b/board/phytec/common/k3/board.c @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2024 PHYTEC Messtechnik GmbH + * Author: Wadim Egorov <w.egorov@phytec.de> + */ + +#include <env_internal.h> +#include <fdt_support.h> +#include <spl.h> +#include <asm/arch/hardware.h> + +#include "../am6_som_detection.h" + +#if IS_ENABLED(CONFIG_ENV_IS_IN_FAT) || IS_ENABLED(CONFIG_ENV_IS_IN_MMC) +int mmc_get_env_dev(void) +{ + u32 boot_device = get_boot_device(); + + switch (boot_device) { + case BOOT_DEVICE_MMC1: + return 0; + case BOOT_DEVICE_MMC2: + return 1; + }; + + return CONFIG_SYS_MMC_ENV_DEV; +} +#endif + +enum env_location env_get_location(enum env_operation op, int prio) +{ + u32 boot_device = get_boot_device(); + + if (prio) + return ENVL_UNKNOWN; + + switch (boot_device) { + case BOOT_DEVICE_MMC1: + case BOOT_DEVICE_MMC2: + if (CONFIG_IS_ENABLED(ENV_IS_IN_FAT)) + return ENVL_FAT; + if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC)) + return ENVL_MMC; + case BOOT_DEVICE_SPI: + if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH)) + return ENVL_SPI_FLASH; + default: + return ENVL_NOWHERE; + }; +} + +#if IS_ENABLED(CONFIG_BOARD_LATE_INIT) +int board_late_init(void) +{ + u32 boot_device = get_boot_device(); + + switch (boot_device) { + case BOOT_DEVICE_MMC1: + env_set_ulong("mmcdev", 0); + env_set("boot", "mmc"); + break; + case BOOT_DEVICE_MMC2: + env_set_ulong("mmcdev", 1); + env_set("boot", "mmc"); + break; + case BOOT_DEVICE_SPI: + env_set("boot", "spi"); + break; + case BOOT_DEVICE_ETHERNET: + env_set("boot", "net"); + break; + }; + + if (IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS)) { + struct phytec_api3_element *block_element; + struct phytec_eeprom_data data; + int ret; + + ret = phytec_eeprom_data_setup(&data, 0, EEPROM_ADDR); + if (ret || !data.valid) + return 0; + + PHYTEC_API3_FOREACH_BLOCK(block_element, &data) { + switch (block_element->block_type) { + case PHYTEC_API3_BLOCK_MAC: + phytec_blocks_add_mac_to_env(block_element); + break; + default: + debug("%s: Unknown block type %i\n", __func__, + block_element->block_type); + } + } + } + + return 0; +} +#endif + +#if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP) +int ft_board_setup(void *blob, struct bd_info *bd) +{ + fdt_copy_fixed_partitions(blob); + + return 0; +} +#endif diff --git a/board/phytec/common/k3/k3_ddrss_patch.c b/board/phytec/common/k3/k3_ddrss_patch.c new file mode 100644 index 00000000000..39f7be8dc92 --- /dev/null +++ b/board/phytec/common/k3/k3_ddrss_patch.c @@ -0,0 +1,68 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2024 PHYTEC Messtechnik GmbH + * Author: Wadim Egorov <w.egorov@phytec.de> + */ + +#include "k3_ddrss_patch.h" + +#include <fdt_support.h> +#include <linux/errno.h> + +#ifdef CONFIG_K3_AM64_DDRSS +#define LPDDR4_INTR_CTL_REG_COUNT (423U) +#define LPDDR4_INTR_PHY_INDEP_REG_COUNT (345U) +#endif + +static int fdt_setprop_inplace_idx_u32(void *fdt, int nodeoffset, + const char *name, uint32_t idx, u32 val) +{ + val = cpu_to_be32(val); + return fdt_setprop_inplace_namelen_partial(fdt, nodeoffset, name, + strlen(name), + idx * sizeof(val), &val, + sizeof(val)); +} + +int fdt_apply_ddrss_timings_patch(void *fdt, struct ddrss *ddrss) +{ + int i, j; + int ret; + int mem_offset; + + mem_offset = fdt_path_offset(fdt, "/memorycontroller@f300000"); + if (mem_offset < 0) + return -ENODEV; + + for (i = 0; i < LPDDR4_INTR_CTL_REG_COUNT; i++) + for (j = 0; j < ddrss->ctl_regs_num; j++) + if (i == ddrss->ctl_regs[j].off) { + ret = fdt_setprop_inplace_idx_u32(fdt, + mem_offset, "ti,ctl-data", i, + ddrss->ctl_regs[j].val); + if (ret) + return ret; + } + + for (i = 0; i < LPDDR4_INTR_PHY_INDEP_REG_COUNT; i++) + for (j = 0; j < ddrss->pi_regs_num; j++) + if (i == ddrss->pi_regs[j].off) { + ret = fdt_setprop_inplace_idx_u32(fdt, + mem_offset, "ti,pi-data", i, + ddrss->pi_regs[j].val); + if (ret) + return ret; + } + + for (i = 0; i < LPDDR4_INTR_PHY_INDEP_REG_COUNT; i++) + for (j = 0; j < ddrss->phy_regs_num; j++) + if (i == ddrss->phy_regs[j].off) { + ret = fdt_setprop_inplace_idx_u32(fdt, + mem_offset, "ti,phy-data", i, + ddrss->phy_regs[j].val); + if (ret) + return ret; + } + + return 0; +} diff --git a/board/phytec/common/k3/k3_ddrss_patch.h b/board/phytec/common/k3/k3_ddrss_patch.h new file mode 100644 index 00000000000..0a47c85116a --- /dev/null +++ b/board/phytec/common/k3/k3_ddrss_patch.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2024 PHYTEC Messtechnik GmbH + * Author: Wadim Egorov <w.egorov@phytec.de> + */ + +#ifndef K3_DDRSS_PATCH +#define K3_DDRSS_PATCH + +#include <linux/types.h> + +struct ddr_reg { + u32 off; + u32 val; +}; + +struct ddrss { + struct ddr_reg *ctl_regs; + u32 ctl_regs_num; + struct ddr_reg *pi_regs; + u32 pi_regs_num; + struct ddr_reg *phy_regs; + u32 phy_regs_num; +}; + +int fdt_apply_ddrss_timings_patch(void *fdt, struct ddrss *ddrss); + +#endif /* K3_DDRSS_PATCH */ diff --git a/board/phytec/common/phytec_som_detection.c b/board/phytec/common/phytec_som_detection.c index 78c173df20d..166c3eae565 100644 --- a/board/phytec/common/phytec_som_detection.c +++ b/board/phytec/common/phytec_som_detection.c @@ -4,7 +4,6 @@ * Author: Teresa Remmet <t.remmet@phytec.de> */ -#include <common.h> #include <dm/device.h> #include <dm/uclass.h> #include <i2c.h> @@ -48,16 +47,9 @@ int phytec_eeprom_data_setup(struct phytec_eeprom_data *data, return ret; } -int phytec_eeprom_data_init(struct phytec_eeprom_data *data, - int bus_num, int addr) +int phytec_eeprom_read(u8 *data, int bus_num, int addr, int size, int offset) { - int ret, i; - unsigned int crc; - u8 *ptr; - const unsigned int payload_size = sizeof(struct phytec_eeprom_payload); - - if (!data) - data = &eeprom_data; + int ret; #if CONFIG_IS_ENABLED(DM_I2C) struct udevice *dev; @@ -65,19 +57,182 @@ int phytec_eeprom_data_init(struct phytec_eeprom_data *data, ret = i2c_get_chip_for_busnum(bus_num, addr, 2, &dev); if (ret) { pr_err("%s: i2c EEPROM not found: %i.\n", __func__, ret); - goto err; + return ret; } - ret = dm_i2c_read(dev, 0, (uint8_t *)data, payload_size); + ret = dm_i2c_read(dev, offset, (uint8_t *)data, size); if (ret) { pr_err("%s: Unable to read EEPROM data: %i\n", __func__, ret); - goto err; + return ret; } #else i2c_set_bus_num(bus_num); - ret = i2c_read(addr, 0, 2, (uint8_t *)data, - sizeof(struct phytec_eeprom_data)); + ret = i2c_read(addr, offset, 2, (uint8_t *)data, size); #endif + return ret; +} + +int phytec_eeprom_data_init_v2(struct phytec_eeprom_data *data) +{ + unsigned int crc; + + if (!data) + return -1; + + crc = crc8(0, (const unsigned char *)&data->payload, PHYTEC_API2_DATA_LEN); + debug("%s: crc: %x\n", __func__, crc); + + if (crc) { + pr_err("%s: CRC mismatch. EEPROM data is not usable.\n", + __func__); + return -EINVAL; + } + + return 0; +} + +#if IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS) + +int phytec_eeprom_data_init_v3_block(struct phytec_eeprom_data *data, + struct phytec_api3_block_header *header, + u8 *payload) +{ + struct phytec_api3_element *element = NULL; + struct phytec_api3_element *list_iterator; + + if (!header) + return -1; + if (!payload) + return -1; + + debug("%s: block type: %i\n", __func__, header->block_type); + switch (header->block_type) { + case PHYTEC_API3_BLOCK_MAC: + element = phytec_blocks_init_mac(header, payload); + break; + default: + debug("%s: Unknown block type %i\n", __func__, + header->block_type); + } + if (!element) + return -1; + + if (!data->payload.block_head) { + data->payload.block_head = element; + return 0; + } + + list_iterator = data->payload.block_head; + while (list_iterator && list_iterator->next) + list_iterator = list_iterator->next; + list_iterator->next = element; + + return 0; +} + +int phytec_eeprom_data_init_v3(struct phytec_eeprom_data *data, + int bus_num, int addr) +{ + int ret, i; + struct phytec_api3_header header; + unsigned int crc; + u8 *payload; + int block_addr; + struct phytec_api3_block_header *block_header; + + if (!data) + return -1; + + ret = phytec_eeprom_read((uint8_t *)&header, bus_num, addr, + PHYTEC_API3_DATA_HEADER_LEN, + PHYTEC_API2_DATA_LEN); + if (ret) { + pr_err("%s: Failed to read API v3 data header.\n", __func__); + goto err; + } + + crc = crc8(0, (const unsigned char *)&header, + PHYTEC_API3_DATA_HEADER_LEN); + debug("%s: crc: %x\n", __func__, crc); + if (crc) { + pr_err("%s: CRC mismatch. API3 header is unusable.\n", + __func__); + goto err; + } + + debug("%s: data length: %i\n", __func__, header.data_length); + payload = malloc(header.data_length); + if (!payload) { + pr_err("%s: Unable to allocate memory\n", __func__); + goto err_payload; + } + + ret = phytec_eeprom_read(payload, bus_num, addr, header.data_length, + PHYTEC_API3_DATA_HEADER_LEN + + PHYTEC_API2_DATA_LEN); + if (ret) { + pr_err("%s: Failed to read API v3 data payload.\n", __func__); + goto err_payload; + } + + block_addr = 0; + debug("%s: block count: %i\n", __func__, header.block_count); + for (i = 0; i < header.block_count; i++) { + debug("%s: block_addr: %i\n", __func__, block_addr); + block_header = (struct phytec_api3_block_header *) + &payload[block_addr]; + crc = crc8(0, (const unsigned char *)block_header, + PHYTEC_API3_BLOCK_HEADER_LEN); + + debug("%s: crc: %x\n", __func__, crc); + if (crc) { + pr_err("%s: CRC mismatch. API3 block header is unusable\n", + __func__); + goto err_payload; + } + + ret = phytec_eeprom_data_init_v3_block(data, block_header, + &payload[block_addr + PHYTEC_API3_BLOCK_HEADER_LEN]); + /* Ignore failed block initialization and continue. */ + if (ret) + debug("%s: Unable to create block with index %i.\n", + __func__, i); + + block_addr = block_header->next_block; + } + + free(payload); + return 0; +err_payload: + free(payload); +err: + return -1; +} + +#else + +inline int phytec_eeprom_data_init_v3(struct phytec_eeprom_data *data, + int bus_num, int addr) +{ + return 0; +} + +#endif + +int phytec_eeprom_data_init(struct phytec_eeprom_data *data, + int bus_num, int addr) +{ + int ret, i; + u8 *ptr; + + if (!data) + data = &eeprom_data; + + ret = phytec_eeprom_read((u8 *)data, bus_num, addr, + PHYTEC_API2_DATA_LEN, 0); + if (ret) + goto err; + data->payload.block_head = NULL; if (data->payload.api_rev == 0xff) { pr_err("%s: EEPROM is not flashed. Prototype?\n", __func__); @@ -86,31 +241,28 @@ int phytec_eeprom_data_init(struct phytec_eeprom_data *data, } ptr = (u8 *)data; - for (i = 0; i < payload_size; ++i) + for (i = 0; i < PHYTEC_API2_DATA_LEN; ++i) if (ptr[i] != 0x0) break; - if (i == payload_size) { + if (i == PHYTEC_API2_DATA_LEN) { pr_err("%s: EEPROM data is all zero. Erased?\n", __func__); ret = -EINVAL; goto err; } - /* We are done here for early revisions */ - if (data->payload.api_rev <= PHYTEC_API_REV1) { - data->valid = true; - return 0; + if (data->payload.api_rev >= PHYTEC_API_REV2) { + ret = phytec_eeprom_data_init_v2(data); + if (ret) + goto err; } - crc = crc8(0, (const unsigned char *)&data->payload, payload_size); - debug("%s: crc: %x\n", __func__, crc); - - if (crc) { - pr_err("%s: CRC mismatch. EEPROM data is not usable.\n", - __func__); - ret = -EINVAL; - goto err; - } + if (IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS)) + if (data->payload.api_rev >= PHYTEC_API_REV3) { + ret = phytec_eeprom_data_init_v3(data, bus_num, addr); + if (ret) + goto err; + } data->valid = true; return 0; @@ -249,6 +401,17 @@ struct extension *phytec_add_extension(const char *name, const char *overlay, } #endif /* IS_ENABLED(CONFIG_CMD_EXTENSION) */ +struct phytec_api3_element * + __maybe_unused phytec_get_block_head(struct phytec_eeprom_data *data) +{ + if (!data) + data = &eeprom_data; + if (!data->valid) + return NULL; + + return data->payload.block_head; +} + #else inline int phytec_eeprom_data_setup(struct phytec_eeprom_data *data, @@ -289,6 +452,12 @@ u8 __maybe_unused phytec_get_som_type(struct phytec_eeprom_data *data) return PHYTEC_EEPROM_INVAL; } +inline struct phytec_api3_element * __maybe_unused + phytec_get_block_head(struct phytec_eeprom_data *data) +{ + return NULL; +} + #if IS_ENABLED(CONFIG_CMD_EXTENSION) inline struct extension *phytec_add_extension(const char *name, const char *overlay, diff --git a/board/phytec/common/phytec_som_detection.h b/board/phytec/common/phytec_som_detection.h index 0ad5c14ef4e..5e35a13cb21 100644 --- a/board/phytec/common/phytec_som_detection.h +++ b/board/phytec/common/phytec_som_detection.h @@ -7,9 +7,13 @@ #ifndef _PHYTEC_SOM_DETECTION_H #define _PHYTEC_SOM_DETECTION_H +#include "phytec_som_detection_blocks.h" + #define PHYTEC_MAX_OPTIONS 17 #define PHYTEC_EEPROM_INVAL 0xff +#define PHYTEC_API2_DATA_LEN 32 + #define PHYTEC_GET_OPTION(option) \ (((option) > '9') ? (option) - 'A' + 10 : (option) - '0') @@ -17,6 +21,7 @@ enum { PHYTEC_API_REV0 = 0, PHYTEC_API_REV1, PHYTEC_API_REV2, + PHYTEC_API_REV3, }; enum phytec_som_type_str { @@ -61,6 +66,7 @@ struct phytec_eeprom_payload { struct phytec_api0_data data_api0; struct phytec_api2_data data_api2; } data; + struct phytec_api3_element *block_head; } __packed; struct phytec_eeprom_data { @@ -86,4 +92,7 @@ struct extension *phytec_add_extension(const char *name, const char *overlay, const char *other); #endif /* IS_ENABLED(CONFIG_CMD_EXTENSION) */ +struct phytec_api3_element * + __maybe_unused phytec_get_block_head(struct phytec_eeprom_data *data); + #endif /* _PHYTEC_SOM_DETECTION_H */ diff --git a/board/phytec/common/phytec_som_detection_blocks.c b/board/phytec/common/phytec_som_detection_blocks.c new file mode 100644 index 00000000000..5f3c27ef0c2 --- /dev/null +++ b/board/phytec/common/phytec_som_detection_blocks.c @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2024 PHYTEC Messtechnik GmbH + * Author: Daniel Schultz <d.schultz@phytec.de> + */ + +#include <malloc.h> +#include <u-boot/crc.h> +#include <net.h> +#include <vsprintf.h> + +#include "phytec_som_detection_blocks.h" + +#if IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION_BLOCKS) + +struct phytec_api3_element * + phytec_blocks_init_mac(struct phytec_api3_block_header *header, + uint8_t *payload) +{ + struct phytec_api3_element *element; + struct phytec_api3_block_mac *mac; + unsigned int crc; + unsigned int len = sizeof(struct phytec_api3_block_mac); + + if (!header) + return NULL; + if (!payload) + return NULL; + + element = (struct phytec_api3_element *) + calloc(8, PHYTEC_API3_ELEMENT_HEADER_SIZE + len); + if (!element) { + pr_err("%s: Unable to allocate memory\n", __func__); + return NULL; + } + element->block_type = header->block_type; + memcpy(&element->block.mac, payload, len); + mac = &element->block.mac; + + debug("%s: interface: %i\n", __func__, mac->interface); + debug("%s: MAC %pM\n", __func__, mac->address); + + crc = crc8(0, (const unsigned char *)mac, len); + debug("%s: crc: %x\n", __func__, crc); + if (crc) { + pr_err("%s: CRC mismatch. API3 block payload is unusable\n", + __func__); + return NULL; + } + + return element; +} + +int __maybe_unused + phytec_blocks_add_mac_to_env(struct phytec_api3_element *element) +{ + char enetenv[9] = "ethaddr"; + char buf[ARP_HLEN_ASCII + 1]; + struct phytec_api3_block_mac *block = &element->block.mac; + int ret; + + if (!is_valid_ethaddr(block->address)) { + pr_err("%s: Invalid MAC address in block.\n", __func__); + return -1; + } + + if (block->interface > 0) { + ret = sprintf(enetenv, "eth%iaddr", block->interface); + if (ret != 8) { + pr_err("%s: Unable to create env string\n", __func__); + return -1; + } + } + + ret = sprintf(buf, "%pM", block->address); + if (ret != ARP_HLEN_ASCII) { + pr_err("%s: Unable to convert MAC address\n", __func__); + return -1; + } + ret = env_set(enetenv, buf); + if (ret) { + pr_err("%s: Failed to set MAC address to env.\n", __func__); + return -1; + } + + debug("%s: Added %s to %s\n", __func__, buf, enetenv); + return 0; +} + +#else + +inline struct phytec_api3_element * + phytec_api3_init_mac_block(struct phytec_api3_block_header *header, + uint8_t *payload) +{ + return NULL; +} + +inline int __maybe_unused + phytec_blocks_add_mac_to_env(struct phytec_api3_element *element) +{ + return -1; +} + +#endif diff --git a/board/phytec/common/phytec_som_detection_blocks.h b/board/phytec/common/phytec_som_detection_blocks.h new file mode 100644 index 00000000000..2a5a83c9039 --- /dev/null +++ b/board/phytec/common/phytec_som_detection_blocks.h @@ -0,0 +1,61 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2024 PHYTEC Messtechnik GmbH + * Author: Daniel Schultz <d.schultz@phytec.de> + */ + +#ifndef _PHYTEC_SOM_DETECTION_BLOCKS_H +#define _PHYTEC_SOM_DETECTION_BLOCKS_H + +#define PHYTEC_API3_DATA_HEADER_LEN 8 +#define PHYTEC_API3_BLOCK_HEADER_LEN 4 +#define PHYTEC_API3_PAYLOAD_START \ + (PHYTEC_API2_DATA_LEN + PHYTEC_API3_DATA_HEADER_LEN) + +#define PHYTEC_API3_ELEMENT_HEADER_SIZE \ + (sizeof(struct phytec_api3_element *) + \ + sizeof(enum phytec_api3_block_types)) + +#define PHYTEC_API3_FOREACH_BLOCK(elem, data) \ + for (elem = phytec_get_block_head(data); elem; elem = elem->next) + +struct phytec_api3_header { + u16 data_length; /* Total length in Bytes of all blocks */ + u8 block_count; /* Number of blocks */ + u8 sub_version; /* Block specification version */ + u8 reserved[3]; /* Reserved */ + u8 crc8; /* checksum */ +} __packed; + +struct phytec_api3_block_header { + u8 block_type; /* Block payload identifier */ + u16 next_block; /* Address of the next block */ + u8 crc8; /* checksum */ +} __packed; + +enum phytec_api3_block_types { + PHYTEC_API3_BLOCK_MAC = 0, +}; + +struct phytec_api3_block_mac { + u8 interface; /* Ethernet interface number */ + u8 address[6]; /* MAC-Address */ + u8 crc8; /* checksum */ +} __packed; + +struct phytec_api3_element { + struct phytec_api3_element *next; + enum phytec_api3_block_types block_type; + union { + struct phytec_api3_block_mac mac; + } block; +} __packed; + +struct phytec_api3_element * + phytec_blocks_init_mac(struct phytec_api3_block_header *header, + uint8_t *payload); + +int __maybe_unused +phytec_blocks_add_mac_to_env(struct phytec_api3_element *element); + +#endif /* _PHYTEC_SOM_DETECTION_BLOCKS_H */ diff --git a/board/phytec/pcl063/spl.c b/board/phytec/pcl063/spl.c index b6d459fdfce..b98c46dbcbd 100644 --- a/board/phytec/pcl063/spl.c +++ b/board/phytec/pcl063/spl.c @@ -6,7 +6,7 @@ * Copyright (C) 2015-2016 Stefan Roese <sr@denx.de> */ -#include <common.h> +#include <config.h> #include <init.h> #include <spl.h> #include <asm/arch/clock.h> diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c index 0f7235979b0..20f2aac332d 100644 --- a/board/phytec/pcm052/pcm052.c +++ b/board/phytec/pcm052/pcm052.c @@ -6,7 +6,6 @@ * Copyright 2013 Freescale Semiconductor, Inc. */ -#include <common.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/phytec/pcm058/pcm058.c b/board/phytec/pcm058/pcm058.c index b37c6fe218d..ecc5b75d8d4 100644 --- a/board/phytec/pcm058/pcm058.c +++ b/board/phytec/pcm058/pcm058.c @@ -9,7 +9,6 @@ * Both NAND and eMMC cannot be set because they share the * same pins (SD4) */ -#include <common.h> #include <init.h> #include <net.h> #include <asm/arch/crm_regs.h> diff --git a/board/phytec/phycore_am335x_r2/board.c b/board/phytec/phycore_am335x_r2/board.c index 5700effbd3f..2022525651d 100644 --- a/board/phytec/phycore_am335x_r2/board.c +++ b/board/phytec/phycore_am335x_r2/board.c @@ -10,7 +10,7 @@ * Copyright (C) 2019 DENX Software Engineering GmbH */ -#include <common.h> +#include <config.h> #include <init.h> #include <spl.h> #include <asm/arch/cpu.h> diff --git a/board/phytec/phycore_am335x_r2/mux.c b/board/phytec/phycore_am335x_r2/mux.c index 7091c985ba1..bb1c48da0fe 100644 --- a/board/phytec/phycore_am335x_r2/mux.c +++ b/board/phytec/phycore_am335x_r2/mux.c @@ -6,7 +6,6 @@ * Copyright (C) 2019 DENX Software Engineering GmbH */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> #include <asm/arch/mux.h> diff --git a/board/phytec/phycore_am62x/Kconfig b/board/phytec/phycore_am62x/Kconfig index 1de8850c6c4..7c179ef0078 100644 --- a/board/phytec/phycore_am62x/Kconfig +++ b/board/phytec/phycore_am62x/Kconfig @@ -35,3 +35,33 @@ config SPL_LDSCRIPT source "board/phytec/common/Kconfig" endif + +config PHYCORE_AM62X_RAM_SIZE_FIX + bool "Set phyCORE-AM62x RAM size fix instead of detecting" + default false + help + RAM size is automatic being detected with the help of + the EEPROM introspection data. Set RAM size to a fix value + instead. + +choice + prompt "phyCORE-AM62x RAM size" + depends on PHYCORE_AM62X_RAM_SIZE_FIX + default PHYCORE_AM62X_RAM_SIZE_2GB + +config PHYCORE_AM62X_RAM_SIZE_1GB + bool "1GB RAM" + help + Set RAM size fix to 1GB for phyCORE-AM62x. + +config PHYCORE_AM62X_RAM_SIZE_2GB + bool "2GB RAM" + help + Set RAM size fix to 2GB for phyCORE-AM62x. + +config PHYCORE_AM62X_RAM_SIZE_4GB + bool "4GB RAM" + help + Set RAM size fix to 4GB for phyCORE-AM62x. + +endchoice diff --git a/board/phytec/phycore_am62x/MAINTAINERS b/board/phytec/phycore_am62x/MAINTAINERS index 02ac88e58a4..42463ad054e 100644 --- a/board/phytec/phycore_am62x/MAINTAINERS +++ b/board/phytec/phycore_am62x/MAINTAINERS @@ -11,3 +11,4 @@ F: configs/phycore_am62x_a53_defconfig F: configs/phycore_am62x_r5_defconfig F: include/configs/phycore_am62x.h F: doc/board/phytec/phycore-am62x.rst +F: board/phytec/common/k3 diff --git a/board/phytec/phycore_am62x/phycore-am62x.c b/board/phytec/phycore_am62x/phycore-am62x.c index 618b4c370d1..9f6bc736cbb 100644 --- a/board/phytec/phycore_am62x/phycore-am62x.c +++ b/board/phytec/phycore_am62x/phycore-am62x.c @@ -4,12 +4,17 @@ * Author: Wadim Egorov <w.egorov@phytec.de> */ +#include <asm/arch/hardware.h> #include <asm/io.h> -#include <env.h> -#include <env_internal.h> #include <spl.h> #include <fdt_support.h> -#include <asm/arch/hardware.h> + +#include "phycore-ddr-data.h" +#include "../common/k3/k3_ddrss_patch.h" +#include "../common/am6_som_detection.h" + +#define AM64_DDRSS_SS_BASE 0x0F300000 +#define DDRSS_V2A_CTL_REG 0x0020 DECLARE_GLOBAL_DATA_PTR; @@ -18,15 +23,184 @@ int board_init(void) return 0; } +static u8 phytec_get_am62_ddr_size_default(void) +{ + int ret; + struct phytec_eeprom_data data; + + if (IS_ENABLED(CONFIG_PHYCORE_AM62X_RAM_SIZE_FIX)) { + if (IS_ENABLED(CONFIG_PHYCORE_AM62X_RAM_SIZE_1GB)) + return EEPROM_RAM_SIZE_1GB; + else if (IS_ENABLED(CONFIG_PHYCORE_AM62X_RAM_SIZE_2GB)) + return EEPROM_RAM_SIZE_2GB; + else if (IS_ENABLED(CONFIG_PHYCORE_AM62X_RAM_SIZE_4GB)) + return EEPROM_RAM_SIZE_4GB; + } + + ret = phytec_eeprom_data_setup(&data, 0, EEPROM_ADDR); + if (!ret && data.valid) + return phytec_get_am6_ddr_size(&data); + + /* Default DDR size is 2GB */ + return EEPROM_RAM_SIZE_2GB; +} + int dram_init(void) { - return fdtdec_setup_mem_size_base(); + u8 ram_size; + + if (!IS_ENABLED(CONFIG_CPU_V7R)) + return fdtdec_setup_mem_size_base(); + + ram_size = phytec_get_am62_ddr_size_default(); + + /* + * HACK: ddrss driver support 2GB RAM by default + * V2A_CTL_REG should be updated to support other RAM size + */ + if (IS_ENABLED(CONFIG_K3_AM64_DDRSS)) + if (ram_size == EEPROM_RAM_SIZE_4GB) + writel(0x00000210, AM64_DDRSS_SS_BASE + DDRSS_V2A_CTL_REG); + + switch (ram_size) { + case EEPROM_RAM_SIZE_1GB: + gd->ram_size = 0x40000000; + break; + case EEPROM_RAM_SIZE_2GB: + gd->ram_size = 0x80000000; + break; + case EEPROM_RAM_SIZE_4GB: +#ifdef CONFIG_PHYS_64BIT + gd->ram_size = 0x100000000; +#else + gd->ram_size = 0x80000000; +#endif + break; + default: + gd->ram_size = 0x80000000; + } + + return 0; +} + +phys_size_t board_get_usable_ram_top(phys_size_t total_size) +{ +#ifdef CONFIG_PHYS_64BIT + /* Limit RAM used by U-Boot to the DDR low region */ + if (gd->ram_top > 0x100000000) + return 0x100000000; +#endif + return gd->ram_top; } int dram_init_banksize(void) { - return fdtdec_setup_memory_banksize(); + u8 ram_size; + + if (!IS_ENABLED(CONFIG_CPU_V7R)) + return fdtdec_setup_memory_banksize(); + + ram_size = phytec_get_am62_ddr_size_default(); + switch (ram_size) { + case EEPROM_RAM_SIZE_1GB: + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].size = 0x40000000; + gd->ram_size = 0x40000000; + break; + + case EEPROM_RAM_SIZE_2GB: + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].size = 0x80000000; + gd->ram_size = 0x80000000; + break; + + case EEPROM_RAM_SIZE_4GB: + /* Bank 0 declares the memory available in the DDR low region */ + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].size = 0x80000000; + gd->ram_size = 0x80000000; + +#ifdef CONFIG_PHYS_64BIT + /* Bank 1 declares the memory available in the DDR upper region */ + gd->bd->bi_dram[1].start = 0x880000000; + gd->bd->bi_dram[1].size = 0x80000000; + gd->ram_size = 0x100000000; +#endif + break; + default: + /* Continue with default 2GB setup */ + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].size = 0x80000000; + gd->ram_size = 0x80000000; + printf("DDR size %d is not supported\n", ram_size); + } + + return 0; +} + +#if defined(CONFIG_K3_DDRSS) +int update_ddrss_timings(void) +{ + int ret; + u8 ram_size; + struct ddrss *ddr_patch = NULL; + void *fdt = (void *)gd->fdt_blob; + + ram_size = phytec_get_am62_ddr_size_default(); + switch (ram_size) { + case EEPROM_RAM_SIZE_1GB: + ddr_patch = &phycore_ddrss_data[PHYCORE_1GB]; + break; + case EEPROM_RAM_SIZE_2GB: + ddr_patch = NULL; + break; + case EEPROM_RAM_SIZE_4GB: + ddr_patch = &phycore_ddrss_data[PHYCORE_4GB]; + break; + default: + break; + } + + /* Nothing to patch */ + if (!ddr_patch) + return 0; + + debug("Applying DDRSS timings patch for ram_size %d\n", ram_size); + + ret = fdt_apply_ddrss_timings_patch(fdt, ddr_patch); + if (ret < 0) { + printf("Failed to apply ddrs timings patch %d\n", ret); + return ret; + } + + return 0; +} + +int do_board_detect(void) +{ + return update_ddrss_timings(); } +#endif + +#if IS_ENABLED(CONFIG_SPL_BUILD) +void spl_perform_fixups(struct spl_image_info *spl_image) +{ + u64 start[CONFIG_NR_DRAM_BANKS]; + u64 size[CONFIG_NR_DRAM_BANKS]; + int bank; + int ret; + + dram_init(); + dram_init_banksize(); + + for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) { + start[bank] = gd->bd->bi_dram[bank].start; + size[bank] = gd->bd->bi_dram[bank].size; + } + + ret = fdt_fixup_memory_banks(spl_image->fdt_addr, start, size, CONFIG_NR_DRAM_BANKS); +} +#endif #define CTRLMMR_USB0_PHY_CTRL 0x43004008 #define CTRLMMR_USB1_PHY_CTRL 0x43004018 @@ -57,67 +231,3 @@ void spl_board_init(void) MCU_CTRL_DEVICE_CLKOUT_32K_CTRL); } #endif - -#if IS_ENABLED(CONFIG_ENV_IS_IN_FAT) || IS_ENABLED(CONFIG_ENV_IS_IN_MMC) -int mmc_get_env_dev(void) -{ - u32 boot_device = get_boot_device(); - - switch (boot_device) { - case BOOT_DEVICE_MMC1: - return 0; - case BOOT_DEVICE_MMC2: - return 1; - }; - - return CONFIG_SYS_MMC_ENV_DEV; -} -#endif - -enum env_location env_get_location(enum env_operation op, int prio) -{ - u32 boot_device = get_boot_device(); - - if (prio) - return ENVL_UNKNOWN; - - switch (boot_device) { - case BOOT_DEVICE_MMC1: - case BOOT_DEVICE_MMC2: - if (CONFIG_IS_ENABLED(ENV_IS_IN_FAT)) - return ENVL_FAT; - if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC)) - return ENVL_MMC; - case BOOT_DEVICE_SPI: - if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH)) - return ENVL_SPI_FLASH; - default: - return ENVL_NOWHERE; - }; -} - -#if IS_ENABLED(CONFIG_BOARD_LATE_INIT) -int board_late_init(void) -{ - u32 boot_device = get_boot_device(); - - switch (boot_device) { - case BOOT_DEVICE_MMC1: - env_set_ulong("mmcdev", 0); - env_set("boot", "mmc"); - break; - case BOOT_DEVICE_MMC2: - env_set_ulong("mmcdev", 1); - env_set("boot", "mmc"); - break; - case BOOT_DEVICE_SPI: - env_set("boot", "spi"); - break; - case BOOT_DEVICE_ETHERNET: - env_set("boot", "net"); - break; - }; - - return 0; -} -#endif diff --git a/board/phytec/phycore_am62x/phycore-ddr-data.h b/board/phytec/phycore_am62x/phycore-ddr-data.h new file mode 100644 index 00000000000..fe6eccd959e --- /dev/null +++ b/board/phytec/phycore_am62x/phycore-ddr-data.h @@ -0,0 +1,206 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2024 PHYTEC Messtechnik GmbH + * Author: Wadim Egorov <w.egorov@phytec.de> + */ + +#ifndef PHYCORE_DDR_DATA +#define PHYCORE_DDR_DATA + +#include "../common/k3/k3_ddrss_patch.h" + +/* 1 GB variant delta */ +struct ddr_reg ddr_1gb_ctl_regs[] = { + { 55, 0x0400DB60 }, + { 58, 0x0400DB60 }, + { 61, 0x0400DB60 }, + { 73, 0x00001860 }, + { 75, 0x00001860 }, + { 77, 0x00001860 }, + { 119, 0x00061800 }, + { 120, 0x00061800 }, + { 121, 0x00061800 }, + { 122, 0x00061800 }, + { 123, 0x00061800 }, + { 125, 0x0000AAA0 }, + { 126, 0x00061800 }, + { 127, 0x00061800 }, + { 128, 0x00061800 }, + { 129, 0x00061800 }, + { 130, 0x00061800 }, + { 132, 0x0000AAA0 }, + { 133, 0x00061800 }, + { 134, 0x00061800 }, + { 135, 0x00061800 }, + { 136, 0x00061800 }, + { 137, 0x00061800 }, + { 139, 0x0000AAA0 }, + { 206, 0x00000000 }, + { 209, 0x00000000 }, + { 212, 0x00000000 }, + { 215, 0x00000000 }, + { 218, 0x00000000 }, + { 221, 0x00000000 }, + { 230, 0x00000000 }, + { 231, 0x00000000 }, + { 232, 0x00000000 }, + { 233, 0x00000000 }, + { 234, 0x00000000 }, + { 235, 0x00000000 }, + { 316, 0x01010000 }, + { 318, 0x3FFF0000 }, + { 327, 0x00000C01 }, + { 328, 0x00000000 }, + { 385, 0x000030C0 }, + { 390, 0x0000DB60 }, + { 391, 0x0001E780 }, + { 394, 0x000030C0 }, + { 399, 0x0000DB60 }, + { 400, 0x0001E780 }, + { 403, 0x000030C0 }, + { 408, 0x0000DB60 }, + { 409, 0x0001E780 } +}; + +struct ddr_reg ddr_1gb_pi_regs[] = { + { 77, 0x04000100 }, + { 176, 0x00001860 }, + { 178, 0x00001860 }, + { 180, 0x04001860 }, + { 233, 0x0000C570 }, + { 238, 0x0000C570 }, + { 243, 0x0000C570 }, + { 247, 0x000030C0 }, + { 248, 0x0001E780 }, + { 249, 0x000030C0 }, + { 250, 0x0001E780 }, + { 251, 0x000030C0 }, + { 252, 0x0001E780 }, + { 299, 0x00000000 }, + { 301, 0x00000000 }, + { 307, 0x00000000 }, + { 309, 0x00000000 }, + { 315, 0x00000000 }, + { 317, 0x00000000 }, + { 323, 0x00000000 }, + { 325, 0x00000000 }, + { 331, 0x00000000 }, + { 333, 0x00000000 }, + { 339, 0x00000000 }, + { 341, 0x00000000 } +}; + +struct ddr_reg ddr_1gb_phy_regs[] = { + { 1371, 0x0001F7C2 }, +}; + +/* 4 GB variant delta */ +struct ddr_reg ddr_4gb_ctl_regs[] = { + { 55, 0x0400DB60 }, + { 58, 0x0400DB60 }, + { 61, 0x0400DB60 }, + { 73, 0x00001860 }, + { 75, 0x00001860 }, + { 77, 0x00001860 }, + { 119, 0x00061800 }, + { 120, 0x00061800 }, + { 121, 0x00061800 }, + { 122, 0x00061800 }, + { 123, 0x00061800 }, + { 125, 0x0000AAA0 }, + { 126, 0x00061800 }, + { 127, 0x00061800 }, + { 128, 0x00061800 }, + { 129, 0x00061800 }, + { 130, 0x00061800 }, + { 132, 0x0000AAA0 }, + { 133, 0x00061800 }, + { 134, 0x00061800 }, + { 135, 0x00061800 }, + { 136, 0x00061800 }, + { 137, 0x00061800 }, + { 139, 0x0000AAA0 }, + { 206, 0x00000000 }, + { 209, 0x00000000 }, + { 212, 0x00000000 }, + { 215, 0x00000000 }, + { 218, 0x00000000 }, + { 221, 0x00000000 }, + { 230, 0x00000000 }, + { 231, 0x00000000 }, + { 232, 0x00000000 }, + { 233, 0x00000000 }, + { 234, 0x00000000 }, + { 235, 0x00000000 }, + { 316, 0x00000000 }, + { 318, 0x7FFF0000 }, + { 327, 0x01000C01 }, + { 328, 0x00000001 }, + { 385, 0x000030C0 }, + { 390, 0x0000DB60 }, + { 391, 0x0001E780 }, + { 394, 0x000030C0 }, + { 399, 0x0000DB60 }, + { 400, 0x0001E780 }, + { 403, 0x000030C0 }, + { 408, 0x0000DB60 }, + { 409, 0x0001E780 } +}; + +struct ddr_reg ddr_4gb_pi_regs[] = { + { 77, 0x04000000 }, + { 176, 0x00001860 }, + { 178, 0x00001860 }, + { 180, 0x04001860 }, + { 233, 0x0000C570 }, + { 238, 0x0000C570 }, + { 243, 0x0000C570 }, + { 247, 0x000030C0 }, + { 248, 0x0001E780 }, + { 249, 0x000030C0 }, + { 250, 0x0001E780 }, + { 251, 0x000030C0 }, + { 252, 0x0001E780 }, + { 299, 0x00000000 }, + { 301, 0x00000000 }, + { 307, 0x00000000 }, + { 309, 0x00000000 }, + { 315, 0x00000000 }, + { 317, 0x00000000 }, + { 323, 0x00000000 }, + { 325, 0x00000000 }, + { 331, 0x00000000 }, + { 333, 0x00000000 }, + { 339, 0x00000000 }, + { 341, 0x00000000 } +}; + +struct ddr_reg ddr_4gb_phy_regs[] = { + { 1371, 0x0001F7C2 }, +}; + +enum { + PHYCORE_1GB, + PHYCORE_4GB, +}; + +struct ddrss phycore_ddrss_data[] = { + [PHYCORE_1GB] = { + .ctl_regs = &ddr_1gb_ctl_regs[0], + .ctl_regs_num = ARRAY_SIZE(ddr_1gb_ctl_regs), + .pi_regs = &ddr_1gb_pi_regs[0], + .pi_regs_num = ARRAY_SIZE(ddr_1gb_pi_regs), + .phy_regs = &ddr_1gb_phy_regs[0], + .phy_regs_num = ARRAY_SIZE(ddr_1gb_phy_regs), + }, + [PHYCORE_4GB] = { + .ctl_regs = &ddr_4gb_ctl_regs[0], + .ctl_regs_num = ARRAY_SIZE(ddr_4gb_ctl_regs), + .pi_regs = &ddr_4gb_pi_regs[0], + .pi_regs_num = ARRAY_SIZE(ddr_4gb_pi_regs), + .phy_regs = &ddr_4gb_phy_regs[0], + .phy_regs_num = ARRAY_SIZE(ddr_4gb_phy_regs), + }, +}; + +#endif /* PHYCORE_DDR_DATA */ diff --git a/board/phytec/phycore_am62x/phycore_am62x.env b/board/phytec/phycore_am62x/phycore_am62x.env index ada3a9233be..42db26a5990 100644 --- a/board/phytec/phycore_am62x/phycore_am62x.env +++ b/board/phytec/phycore_am62x/phycore_am62x.env @@ -1,3 +1,5 @@ +#include <env/ti/k3_dfu.env> + fdtaddr=0x88000000 loadaddr=0x82000000 scriptaddr=0x80000000 diff --git a/board/phytec/phycore_imx8mm/MAINTAINERS b/board/phytec/phycore_imx8mm/MAINTAINERS index e46e3691bac..58c5e2d0af9 100644 --- a/board/phytec/phycore_imx8mm/MAINTAINERS +++ b/board/phytec/phycore_imx8mm/MAINTAINERS @@ -2,10 +2,7 @@ phyCORE-i.MX8M Mini M: Teresa Remmet <t.remmet@phytec.de> W: https://www.phytec.eu/product-eu/system-on-modules/phycore-imx-8m-mini-nano/ S: Maintained -F: arch/arm/dts/imx8mm-phyboard-polis-rdk.dts -F: arch/arm/dts/imx8mm-phycore-som.dtsi F: arch/arm/dts/imx8mm-phyboard-polis-rdk-u-boot.dtsi -F: arch/arm/dts/imx8mm-phygate-tauri-l.dts F: arch/arm/dts/imx8mm-phygate-tauri-l-u-boot.dtsi F: board/phytec/phycore_imx8mm/ F: configs/imx8mm-phygate-tauri-l_defconfig diff --git a/board/phytec/phycore_imx8mm/phycore-imx8mm.c b/board/phytec/phycore_imx8mm/phycore-imx8mm.c index ef647291690..06cffbca3a6 100644 --- a/board/phytec/phycore_imx8mm/phycore-imx8mm.c +++ b/board/phytec/phycore_imx8mm/phycore-imx8mm.c @@ -4,7 +4,6 @@ * Author: Teresa Remmet <t.remmet@phytec.de> */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/phytec/phycore_imx8mm/spl.c b/board/phytec/phycore_imx8mm/spl.c index 690a51f7a72..8d858590a39 100644 --- a/board/phytec/phycore_imx8mm/spl.c +++ b/board/phytec/phycore_imx8mm/spl.c @@ -4,7 +4,6 @@ * Author: Teresa Remmet <t.remmet@phytec.de> */ -#include <common.h> #include <asm/arch/clock.h> #include <asm/arch/ddr.h> #include <asm/arch/imx8mm_pins.h> diff --git a/board/phytec/phycore_imx8mp/Kconfig b/board/phytec/phycore_imx8mp/Kconfig index f846d10bad9..bdf9e97beaa 100644 --- a/board/phytec/phycore_imx8mp/Kconfig +++ b/board/phytec/phycore_imx8mp/Kconfig @@ -12,5 +12,72 @@ config SYS_CONFIG_NAME config IMX_CONFIG default "board/phytec/phycore_imx8mp/imximage-8mp-sd.cfg" +config PHYCORE_IMX8MP_RAM_SIZE_FIX + bool "Set phyCORE-i.MX8MP RAM size fix instead of detecting" + default false + help + RAM size is automatic being detected with the help of + the EEPROM introspection data. Set RAM size to a fix value + instead. + +choice + prompt "phyCORE-i.MX8MP RAM size" + depends on PHYCORE_IMX8MP_RAM_SIZE_FIX + default PHYCORE_IMX8MP_RAM_SIZE_2GB + +config PHYCORE_IMX8MP_RAM_SIZE_1GB + bool "1GB RAM" + help + Set RAM size fix to 1GB for phyCORE-i.MX8MP. + RAM frequency is configured independent. + +config PHYCORE_IMX8MP_RAM_SIZE_2GB + bool "2GB RAM" + help + Set RAM size fix to 2GB for phyCORE-i.MX8MP. + RAM frequency is configured independent. + +config PHYCORE_IMX8MP_RAM_SIZE_4GB + bool "4GB RAM" + help + Set RAM size fix to 4GB for phyCORE-i.MX8MP. + RAM frequency is configured independent. + +config PHYCORE_IMX8MP_RAM_SIZE_8GB + bool "8GB RAM" + select PHYCORE_IMX8MP_USE_2GHZ_RAM_TIMINGS + help + Set RAM size fix to 8GB for phyCORE-i.MX8MP. + Only 2GHz RAMs are supported. + +endchoice + +config PHYCORE_IMX8MP_RAM_FREQ_FIX + bool "Set phyCORE-i.MX8MP RAM frequency fix instead of detecting" + default false + help + RAM frequency is automatic being detected with the help of + the EEPROM introspection data. Set RAM frequency to a fix value + instead. + +choice + prompt "phyCORE-i.MX8MP RAM frequency" + depends on PHYCORE_IMX8MP_RAM_FREQ_FIX + default PHYCORE_IMX8MP_USE_1_5GHZ_RAM_TIMINGS + +config PHYCORE_IMX8MP_USE_2GHZ_RAM_TIMINGS + bool "Use 2GHz RAM timings" + help + Use fix 2GHz RAM timings for phyCORE-i.MX8MP instead of + 1.5GHz timings. + +config PHYCORE_IMX8MP_USE_1_5GHZ_RAM_TIMINGS + depends on !PHYCORE_IMX8MP_RAM_SIZE_8GB + bool "Use 1.5GHz RAM timings" + help + Use fix 1.5GHz RAM timings for phyCORE-i.MX8MP instead of + 2GHz timings. +endchoice + source "board/phytec/common/Kconfig" endif diff --git a/board/phytec/phycore_imx8mp/MAINTAINERS b/board/phytec/phycore_imx8mp/MAINTAINERS index d3beb978d3a..645476ae30a 100644 --- a/board/phytec/phycore_imx8mp/MAINTAINERS +++ b/board/phytec/phycore_imx8mp/MAINTAINERS @@ -2,7 +2,6 @@ phyCORE-i.MX8M Plus M: Teresa Remmet <t.remmet@phytec.de> W: https://www.phytec.eu/product-eu/system-on-modules/phycore-imx-8m-plus/ S: Maintained -F: arch/arm/dts/imx8mp-phyboard-pollux-rdk.dts F: arch/arm/dts/imx8mp-phyboard-pollux-rdk-u-boot.dtsi F: board/phytec/phycore_imx8mp/ F: configs/phycore-imx8mp_defconfig diff --git a/board/phytec/phycore_imx8mp/lpddr4_timing.c b/board/phytec/phycore_imx8mp/lpddr4_timing.c index f2707b85960..9984b6c2601 100644 --- a/board/phytec/phycore_imx8mp/lpddr4_timing.c +++ b/board/phytec/phycore_imx8mp/lpddr4_timing.c @@ -1839,3 +1839,156 @@ struct dram_timing_info dram_timing = { .ddrphy_pie_num = ARRAY_SIZE(ddr_phy_pie), .fsp_table = { 3000, 400, 100, }, }; + +void set_dram_timings_2ghz_2gb(void) +{ + dram_timing.ddrc_cfg[3].val = 0x1323; + dram_timing.ddrc_cfg[4].val = 0x1e84800; + dram_timing.ddrc_cfg[5].val = 0x7a0118; + dram_timing.ddrc_cfg[8].val = 0xc00307a3; + dram_timing.ddrc_cfg[9].val = 0xc50000; + dram_timing.ddrc_cfg[10].val = 0xf4003f; + dram_timing.ddrc_cfg[11].val = 0xf30000; + dram_timing.ddrc_cfg[14].val = 0x2028222a; + dram_timing.ddrc_cfg[15].val = 0x8083f; + dram_timing.ddrc_cfg[16].val = 0xe0e000; + dram_timing.ddrc_cfg[17].val = 0x12040a12; + dram_timing.ddrc_cfg[18].val = 0x2050f0f; + dram_timing.ddrc_cfg[19].val = 0x1010009; + dram_timing.ddrc_cfg[20].val = 0x502; + dram_timing.ddrc_cfg[21].val = 0x20800; + dram_timing.ddrc_cfg[22].val = 0xe100002; + dram_timing.ddrc_cfg[23].val = 0x120; + dram_timing.ddrc_cfg[24].val = 0xc80064; + dram_timing.ddrc_cfg[25].val = 0x3e8001e; + dram_timing.ddrc_cfg[26].val = 0x3207a12; + dram_timing.ddrc_cfg[28].val = 0x4a3820e; + dram_timing.ddrc_cfg[30].val = 0x230e; + dram_timing.ddrc_cfg[37].val = 0x799; + dram_timing.ddrc_cfg[38].val = 0x9141d1c; + dram_timing.ddrc_cfg[74].val = 0x302; + dram_timing.ddrc_cfg[83].val = 0x599; + dram_timing.ddrc_cfg[99].val = 0x302; + dram_timing.ddrc_cfg[108].val = 0x599; + dram_timing.ddrphy_cfg[66].val = 0x18; + dram_timing.ddrphy_cfg[75].val = 0x1e3; + dram_timing.ddrphy_cfg[77].val = 0x1e3; + dram_timing.ddrphy_cfg[79].val = 0x1e3; + dram_timing.ddrphy_cfg[145].val = 0x3e8; + dram_timing.fsp_msg[0].drate = 4000; + dram_timing.fsp_msg[0].fsp_cfg[1].val = 0xfa0; + dram_timing.fsp_msg[0].fsp_cfg[10].val = 0x3ff4; + dram_timing.fsp_msg[0].fsp_cfg[11].val = 0xf3; + dram_timing.fsp_msg[0].fsp_cfg[15].val = 0x3ff4; + dram_timing.fsp_msg[0].fsp_cfg[16].val = 0xf3; + dram_timing.fsp_msg[0].fsp_cfg[22].val = 0xf400; + dram_timing.fsp_msg[0].fsp_cfg[23].val = 0xf33f; + dram_timing.fsp_msg[0].fsp_cfg[28].val = 0xf400; + dram_timing.fsp_msg[0].fsp_cfg[29].val = 0xf33f; + dram_timing.fsp_msg[3].drate = 4000; + dram_timing.fsp_msg[3].fsp_cfg[1].val = 0xfa0; + dram_timing.fsp_msg[3].fsp_cfg[11].val = 0x3ff4; + dram_timing.fsp_msg[3].fsp_cfg[12].val = 0xf3; + dram_timing.fsp_msg[3].fsp_cfg[16].val = 0x3ff4; + dram_timing.fsp_msg[3].fsp_cfg[17].val = 0xf3; + dram_timing.fsp_msg[3].fsp_cfg[23].val = 0xf400; + dram_timing.fsp_msg[3].fsp_cfg[24].val = 0xf33f; + dram_timing.fsp_msg[3].fsp_cfg[29].val = 0xf400; + dram_timing.fsp_msg[3].fsp_cfg[30].val = 0xf33f; + dram_timing.ddrphy_pie[480].val = 0x465; + dram_timing.ddrphy_pie[481].val = 0xfa; + dram_timing.ddrphy_pie[482].val = 0x9c4; + dram_timing.fsp_table[0] = 4000; +} + +void set_dram_timings_1_5ghz_1gb(void) +{ + dram_timing.ddrc_cfg[3].val = 0x1233; + dram_timing.ddrc_cfg[5].val = 0x5b0087; + dram_timing.ddrc_cfg[6].val = 0x61027f10; + dram_timing.ddrc_cfg[7].val = 0x7b0; + dram_timing.ddrc_cfg[11].val = 0xf30000; + dram_timing.ddrc_cfg[23].val = 0x8d; + dram_timing.ddrc_cfg[45].val = 0xf070707; + dram_timing.ddrc_cfg[59].val = 0x1031; + dram_timing.ddrc_cfg[62].val = 0xc0012; + dram_timing.ddrc_cfg[77].val = 0x13; + dram_timing.ddrc_cfg[84].val = 0x1031; + dram_timing.ddrc_cfg[87].val = 0x30005; + dram_timing.ddrc_cfg[102].val = 0x5; + dram_timing.ddrphy_cfg[75].val = 0x1e3; + dram_timing.ddrphy_cfg[77].val = 0x1e3; + dram_timing.ddrphy_cfg[79].val = 0x1e3; + dram_timing.fsp_msg[0].fsp_cfg[11].val = 0xf3; + dram_timing.fsp_msg[0].fsp_cfg[16].val = 0xf3; + dram_timing.fsp_msg[0].fsp_cfg[23].val = 0xf32d; + dram_timing.fsp_msg[0].fsp_cfg[29].val = 0xf32d; + dram_timing.fsp_msg[3].fsp_cfg[12].val = 0xf3; + dram_timing.fsp_msg[3].fsp_cfg[17].val = 0xf3; + dram_timing.fsp_msg[3].fsp_cfg[24].val = 0xf32d; + dram_timing.fsp_msg[3].fsp_cfg[30].val = 0xf32d; +} + +void set_dram_timings_2ghz_1gb(void) +{ + set_dram_timings_2ghz_2gb(); + dram_timing.ddrc_cfg[5].val = 0x7a00b4; + dram_timing.ddrc_cfg[23].val = 0xbc; + dram_timing.ddrc_cfg[45].val = 0xf070707; + dram_timing.ddrc_cfg[62].val = 0xc0012; + dram_timing.ddrc_cfg[77].val = 0x13; + dram_timing.ddrc_cfg[87].val = 0x30005; + dram_timing.ddrc_cfg[102].val = 0x5; +} + +void set_dram_timings_1_5ghz_4gb(void) +{ + dram_timing.ddrc_cfg[2].val = 0xa3080020; + dram_timing.ddrc_cfg[39].val = 0x17; + dram_timing.fsp_msg[0].fsp_cfg[9].val = 0x310; + dram_timing.fsp_msg[0].fsp_cfg[21].val = 0x3; + dram_timing.fsp_msg[1].fsp_cfg[10].val = 0x310; + dram_timing.fsp_msg[1].fsp_cfg[22].val = 0x3; + dram_timing.fsp_msg[2].fsp_cfg[10].val = 0x310; + dram_timing.fsp_msg[2].fsp_cfg[22].val = 0x3; + dram_timing.fsp_msg[3].fsp_cfg[10].val = 0x310; + dram_timing.fsp_msg[3].fsp_cfg[22].val = 0x3; +} + +void set_dram_timings_2ghz_4gb(void) +{ + set_dram_timings_2ghz_2gb(); + dram_timing.ddrc_cfg[2].val = 0xa3080020; + dram_timing.ddrc_cfg[39].val = 0x17; + dram_timing.fsp_msg[0].fsp_cfg[9].val = 0x310; + dram_timing.fsp_msg[0].fsp_cfg[21].val = 0x3; + dram_timing.fsp_msg[1].fsp_cfg[10].val = 0x310; + dram_timing.fsp_msg[1].fsp_cfg[22].val = 0x3; + dram_timing.fsp_msg[2].fsp_cfg[10].val = 0x310; + dram_timing.fsp_msg[2].fsp_cfg[22].val = 0x3; + dram_timing.fsp_msg[3].fsp_cfg[10].val = 0x310; + dram_timing.fsp_msg[3].fsp_cfg[22].val = 0x3; +} + +void set_dram_timings_2ghz_8gb(void) +{ + set_dram_timings_2ghz_2gb(); + dram_timing.ddrc_cfg[2].val = 0xa3080020; + dram_timing.ddrc_cfg[5].val = 0x7a017c; + dram_timing.ddrc_cfg[23].val = 0x184; + dram_timing.ddrc_cfg[39].val = 0x18; + dram_timing.ddrc_cfg[46].val = 0xf07; + dram_timing.ddrc_cfg[62].val = 0xc0026; + dram_timing.ddrc_cfg[77].val = 0x27; + dram_timing.ddrc_cfg[87].val = 0x3000a; + dram_timing.ddrc_cfg[102].val = 0xa; + + dram_timing.fsp_msg[0].fsp_cfg[9].val = 0x310; + dram_timing.fsp_msg[0].fsp_cfg[21].val = 0x3; + dram_timing.fsp_msg[1].fsp_cfg[10].val = 0x310; + dram_timing.fsp_msg[1].fsp_cfg[22].val = 0x3; + dram_timing.fsp_msg[2].fsp_cfg[10].val = 0x310; + dram_timing.fsp_msg[2].fsp_cfg[22].val = 0x3; + dram_timing.fsp_msg[3].fsp_cfg[10].val = 0x310; + dram_timing.fsp_msg[3].fsp_cfg[22].val = 0x3; +} diff --git a/board/phytec/phycore_imx8mp/lpddr4_timing.h b/board/phytec/phycore_imx8mp/lpddr4_timing.h new file mode 100644 index 00000000000..1c10e085a92 --- /dev/null +++ b/board/phytec/phycore_imx8mp/lpddr4_timing.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2024 PHYTEC Messtechnik GmbH + */ + +#ifndef __LPDDR4_TIMING_H__ +#define __LPDDR4_TIMING_H__ + +void set_dram_timings_2ghz_2gb(void); +void set_dram_timings_2ghz_1gb(void); +void set_dram_timings_2ghz_4gb(void); +void set_dram_timings_1_5ghz_1gb(void); +void set_dram_timings_1_5ghz_4gb(void); +void set_dram_timings_2ghz_8gb(void); + +#endif /* __LPDDR4_TIMING_H__ */ diff --git a/board/phytec/phycore_imx8mp/phycore-imx8mp.c b/board/phytec/phycore_imx8mp/phycore-imx8mp.c index dbdd6bb7937..ef951361844 100644 --- a/board/phytec/phycore_imx8mp/phycore-imx8mp.c +++ b/board/phytec/phycore_imx8mp/phycore-imx8mp.c @@ -4,12 +4,12 @@ * Author: Teresa Remmet <t.remmet@phytec.de> */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/global_data.h> #include <asm/io.h> #include <asm/mach-imx/boot_mode.h> #include <env.h> +#include <init.h> #include <miiphy.h> DECLARE_GLOBAL_DATA_PTR; @@ -56,3 +56,13 @@ int board_late_init(void) return 0; } + +int board_phys_sdram_size(phys_size_t *size) +{ + if (!size) + return -EINVAL; + + *size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE + PHYS_SDRAM_2_SIZE); + + return 0; +} diff --git a/board/phytec/phycore_imx8mp/spl.c b/board/phytec/phycore_imx8mp/spl.c index df158024654..0610d8bbd0b 100644 --- a/board/phytec/phycore_imx8mp/spl.c +++ b/board/phytec/phycore_imx8mp/spl.c @@ -4,7 +4,6 @@ * Author: Teresa Remmet <t.remmet@phytec.de> */ -#include <common.h> #include <asm/arch/clock.h> #include <asm/arch/ddr.h> #include <asm/arch/imx8mp_pins.h> @@ -21,95 +20,103 @@ #include <power/pca9450.h> #include <spl.h> +#include "lpddr4_timing.h" #include "../common/imx8m_som_detection.h" DECLARE_GLOBAL_DATA_PTR; -#define EEPROM_ADDR 0x51 -#define EEPROM_ADDR_FALLBACK 0x59 +#define EEPROM_ADDR 0x51 +#define EEPROM_ADDR_FALLBACK 0x59 int spl_board_boot_device(enum boot_device boot_dev_spl) { return BOOT_DEVICE_BOOTROM; } +enum phytec_imx8mp_ddr_eeprom_code { + PHYTEC_IMX8MP_DDR_1GB = 2, + PHYTEC_IMX8MP_DDR_2GB = 3, + PHYTEC_IMX8MP_DDR_4GB = 5, + PHYTEC_IMX8MP_DDR_8GB = 7, + PHYTEC_IMX8MP_DDR_4GB_2GHZ = 8, +}; + void spl_dram_init(void) { int ret; + bool use_2ghz_timings = false; + enum phytec_imx8mp_ddr_eeprom_code size = PHYTEC_EEPROM_INVAL; ret = phytec_eeprom_data_setup_fallback(NULL, 0, EEPROM_ADDR, EEPROM_ADDR_FALLBACK); - if (ret) + if (ret && !IS_ENABLED(CONFIG_PHYCORE_IMX8MP_RAM_SIZE_FIX)) goto out; ret = phytec_imx8m_detect(NULL); if (!ret) phytec_print_som_info(NULL); - u8 rev = phytec_get_rev(NULL); - u8 somtype = phytec_get_som_type(NULL); - - if (rev != PHYTEC_EEPROM_INVAL && (rev >= 3 || (somtype == SOM_TYPE_PCL && rev >= 1))) { - dram_timing.ddrc_cfg[3].val = 0x1323; - dram_timing.ddrc_cfg[4].val = 0x1e84800; - dram_timing.ddrc_cfg[5].val = 0x7a0118; - dram_timing.ddrc_cfg[8].val = 0xc00307a3; - dram_timing.ddrc_cfg[9].val = 0xc50000; - dram_timing.ddrc_cfg[10].val = 0xf4003f; - dram_timing.ddrc_cfg[11].val = 0xf30000; - dram_timing.ddrc_cfg[14].val = 0x2028222a; - dram_timing.ddrc_cfg[15].val = 0x8083f; - dram_timing.ddrc_cfg[16].val = 0xe0e000; - dram_timing.ddrc_cfg[17].val = 0x12040a12; - dram_timing.ddrc_cfg[18].val = 0x2050f0f; - dram_timing.ddrc_cfg[19].val = 0x1010009; - dram_timing.ddrc_cfg[20].val = 0x502; - dram_timing.ddrc_cfg[21].val = 0x20800; - dram_timing.ddrc_cfg[22].val = 0xe100002; - dram_timing.ddrc_cfg[23].val = 0x120; - dram_timing.ddrc_cfg[24].val = 0xc80064; - dram_timing.ddrc_cfg[25].val = 0x3e8001e; - dram_timing.ddrc_cfg[26].val = 0x3207a12; - dram_timing.ddrc_cfg[28].val = 0x4a3820e; - dram_timing.ddrc_cfg[30].val = 0x230e; - dram_timing.ddrc_cfg[37].val = 0x799; - dram_timing.ddrc_cfg[38].val = 0x9141d1c; - dram_timing.ddrc_cfg[74].val = 0x302; - dram_timing.ddrc_cfg[83].val = 0x599; - dram_timing.ddrc_cfg[99].val = 0x302; - dram_timing.ddrc_cfg[108].val = 0x599; - dram_timing.ddrphy_cfg[66].val = 0x18; - dram_timing.ddrphy_cfg[75].val = 0x1e3; - dram_timing.ddrphy_cfg[77].val = 0x1e3; - dram_timing.ddrphy_cfg[79].val = 0x1e3; - dram_timing.ddrphy_cfg[145].val = 0x3e8; - dram_timing.fsp_msg[0].drate = 4000; - dram_timing.fsp_msg[0].fsp_cfg[1].val = 0xfa0; - dram_timing.fsp_msg[0].fsp_cfg[10].val = 0x3ff4; - dram_timing.fsp_msg[0].fsp_cfg[11].val = 0xf3; - dram_timing.fsp_msg[0].fsp_cfg[15].val = 0x3ff4; - dram_timing.fsp_msg[0].fsp_cfg[16].val = 0xf3; - dram_timing.fsp_msg[0].fsp_cfg[22].val = 0xf400; - dram_timing.fsp_msg[0].fsp_cfg[23].val = 0xf33f; - dram_timing.fsp_msg[0].fsp_cfg[28].val = 0xf400; - dram_timing.fsp_msg[0].fsp_cfg[29].val = 0xf33f; - dram_timing.fsp_msg[3].drate = 4000; - dram_timing.fsp_msg[3].fsp_cfg[1].val = 0xfa0; - dram_timing.fsp_msg[3].fsp_cfg[11].val = 0x3ff4; - dram_timing.fsp_msg[3].fsp_cfg[12].val = 0xf3; - dram_timing.fsp_msg[3].fsp_cfg[16].val = 0x3ff4; - dram_timing.fsp_msg[3].fsp_cfg[17].val = 0xf3; - dram_timing.fsp_msg[3].fsp_cfg[23].val = 0xf400; - dram_timing.fsp_msg[3].fsp_cfg[24].val = 0xf33f; - dram_timing.fsp_msg[3].fsp_cfg[29].val = 0xf400; - dram_timing.fsp_msg[3].fsp_cfg[30].val = 0xf33f; - dram_timing.ddrphy_pie[480].val = 0x465; - dram_timing.ddrphy_pie[481].val = 0xfa; - dram_timing.ddrphy_pie[482].val = 0x9c4; - dram_timing.fsp_table[0] = 4000; + if (IS_ENABLED(CONFIG_PHYCORE_IMX8MP_RAM_SIZE_FIX)) { + if (IS_ENABLED(CONFIG_PHYCORE_IMX8MP_RAM_SIZE_1GB)) + size = PHYTEC_IMX8MP_DDR_1GB; + else if (IS_ENABLED(CONFIG_PHYCORE_IMX8MP_RAM_SIZE_2GB)) + size = PHYTEC_IMX8MP_DDR_2GB; + else if (IS_ENABLED(CONFIG_PHYCORE_IMX8MP_RAM_SIZE_4GB)) + size = PHYTEC_IMX8MP_DDR_4GB; + else if (IS_ENABLED(CONFIG_PHYCORE_IMX8MP_RAM_SIZE_8GB)) + size = PHYTEC_IMX8MP_DDR_8GB; + } else { + size = phytec_get_imx8m_ddr_size(NULL); + } + + if (IS_ENABLED(CONFIG_PHYCORE_IMX8MP_RAM_FREQ_FIX)) { + if (IS_ENABLED(CONFIG_PHYCORE_IMX8MP_USE_2GHZ_RAM_TIMINGS)) { + if (size == PHYTEC_IMX8MP_DDR_4GB) + size = PHYTEC_IMX8MP_DDR_4GB_2GHZ; + else + use_2ghz_timings = true; + } else if (IS_ENABLED(CONFIG_PHYCORE_IMX8MP_USE_1_5GHZ_RAM_TIMINGS)) { + if (size == PHYTEC_IMX8MP_DDR_4GB_2GHZ) + size = PHYTEC_IMX8MP_DDR_4GB; + else + use_2ghz_timings = false; + } + } else { + u8 rev = phytec_get_rev(NULL); + u8 somtype = phytec_get_som_type(NULL); + + if (rev != PHYTEC_EEPROM_INVAL && + (rev >= 3 || (somtype == SOM_TYPE_PCL && rev >= 1))) + use_2ghz_timings = true; } + switch (size) { + case PHYTEC_IMX8MP_DDR_1GB: + if (use_2ghz_timings) + set_dram_timings_2ghz_1gb(); + else + set_dram_timings_1_5ghz_1gb(); + break; + case PHYTEC_IMX8MP_DDR_2GB: + if (use_2ghz_timings) + set_dram_timings_2ghz_2gb(); + break; + case PHYTEC_IMX8MP_DDR_4GB: + set_dram_timings_1_5ghz_4gb(); + break; + case PHYTEC_IMX8MP_DDR_4GB_2GHZ: + set_dram_timings_2ghz_4gb(); + break; + case PHYTEC_IMX8MP_DDR_8GB: + set_dram_timings_2ghz_8gb(); + break; + default: + goto out; + } + ddr_init(&dram_timing); + return; out: + printf("Could not detect correct RAM size. Fallback to default.\n"); ddr_init(&dram_timing); } diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c index 3f49f39e3d5..a970634b4c3 100644 --- a/board/phytec/phycore_rk3288/phycore-rk3288.c +++ b/board/phytec/phycore_rk3288/phycore-rk3288.c @@ -4,13 +4,11 @@ * Author: Wadim Egorov <w.egorov@phytec.de> */ -#include <eeprom.h> #include <init.h> #include <log.h> #include <net.h> #include <asm/global_data.h> #include <asm/io.h> -#include <common.h> #include <dm.h> #include <env.h> #include <env_internal.h> diff --git a/board/phytium/durian/durian.c b/board/phytium/durian/durian.c index 0a4048d4982..01e210fcdd1 100644 --- a/board/phytium/durian/durian.c +++ b/board/phytium/durian/durian.c @@ -5,7 +5,6 @@ * liuhao <liuhao@phytium.com.cn> */ -#include <common.h> #include <command.h> #include <cpu_func.h> #include <event.h> diff --git a/board/phytium/pe2201/pe2201.c b/board/phytium/pe2201/pe2201.c index 0e837b0f50f..fbbf6789b50 100644 --- a/board/phytium/pe2201/pe2201.c +++ b/board/phytium/pe2201/pe2201.c @@ -12,7 +12,6 @@ #include <asm/io.h> #include <linux/arm-smccc.h> #include <scsi.h> -#include <asm/u-boot.h> #include "cpu.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/board/phytium/pomelo/pomelo.c b/board/phytium/pomelo/pomelo.c index 960e491c768..0ea335e7486 100644 --- a/board/phytium/pomelo/pomelo.c +++ b/board/phytium/pomelo/pomelo.c @@ -14,7 +14,6 @@ #include <linux/arm-smccc.h> #include <scsi.h> #include <init.h> -#include <asm/u-boot.h> #include "cpu.h" DECLARE_GLOBAL_DATA_PTR; diff --git a/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c b/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c index 14b94c9e33c..112770ba493 100644 --- a/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c +++ b/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c @@ -11,7 +11,6 @@ #include <asm/global_data.h> #include <asm/mach-imx/gpio.h> #include <asm/mach-imx/iomux-v3.h> -#include <common.h> #include <env.h> #include <errno.h> #include <init.h> diff --git a/board/polyhex/imx8mp_debix_model_a/spl.c b/board/polyhex/imx8mp_debix_model_a/spl.c index eb904e116b1..6cbd1815cad 100644 --- a/board/polyhex/imx8mp_debix_model_a/spl.c +++ b/board/polyhex/imx8mp_debix_model_a/spl.c @@ -11,7 +11,6 @@ #include <asm/global_data.h> #include <asm/mach-imx/boot_mode.h> #include <asm/sections.h> -#include <common.h> #include <dm/device.h> #include <dm/uclass.h> #include <hang.h> diff --git a/board/purism/librem5/librem5.c b/board/purism/librem5/librem5.c index d0249e71f09..a3c421572af 100644 --- a/board/purism/librem5/librem5.c +++ b/board/purism/librem5/librem5.c @@ -4,7 +4,6 @@ * Copyright 2021 Purism */ -#include <common.h> #include <malloc.h> #include <errno.h> #include <asm/io.h> diff --git a/board/purism/librem5/lpddr4_timing.c b/board/purism/librem5/lpddr4_timing.c index 46bc7f8591c..e9559e3d843 100644 --- a/board/purism/librem5/lpddr4_timing.c +++ b/board/purism/librem5/lpddr4_timing.c @@ -4,7 +4,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/purism/librem5/lpddr4_timing_b0.c b/board/purism/librem5/lpddr4_timing_b0.c index ec68edaf690..5d8f2803be6 100644 --- a/board/purism/librem5/lpddr4_timing_b0.c +++ b/board/purism/librem5/lpddr4_timing_b0.c @@ -4,7 +4,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/purism/librem5/spl.c b/board/purism/librem5/spl.c index 9aadc553302..ed57554a2bc 100644 --- a/board/purism/librem5/spl.c +++ b/board/purism/librem5/spl.c @@ -4,7 +4,7 @@ * Copyright 2021 Purism */ -#include <common.h> +#include <config.h> #include <asm/io.h> #include <errno.h> #include <asm/io.h> diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c index 60a2e19143d..6bb12602193 100644 --- a/board/qca/ap121/ap121.c +++ b/board/qca/ap121/ap121.c @@ -3,7 +3,6 @@ * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com> */ -#include <common.h> #include <init.h> #include <asm/io.h> #include <asm/addrspace.h> diff --git a/board/qca/ap143/ap143.c b/board/qca/ap143/ap143.c index ac65054136c..b88de9c4ec8 100644 --- a/board/qca/ap143/ap143.c +++ b/board/qca/ap143/ap143.c @@ -3,7 +3,6 @@ * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com> */ -#include <common.h> #include <init.h> #include <asm/io.h> #include <asm/addrspace.h> diff --git a/board/qca/ap152/ap152.c b/board/qca/ap152/ap152.c index 82458c3af42..53587288c93 100644 --- a/board/qca/ap152/ap152.c +++ b/board/qca/ap152/ap152.c @@ -3,7 +3,6 @@ * Copyright (C) 2018 Rosy Song <rosysong@rosinson.com> */ -#include <common.h> #include <init.h> #include <asm/io.h> #include <asm/addrspace.h> diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c index fbbfc0e65e2..bd2e213b3bc 100644 --- a/board/qualcomm/dragonboard410c/dragonboard410c.c +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c @@ -6,7 +6,6 @@ */ #include <button.h> -#include <common.h> #include <cpu_func.h> #include <dm.h> #include <dm/pinctrl.h> diff --git a/board/qualcomm/dragonboard820c/dragonboard820c.c b/board/qualcomm/dragonboard820c/dragonboard820c.c index ac7de711c58..d3333a59db0 100644 --- a/board/qualcomm/dragonboard820c/dragonboard820c.c +++ b/board/qualcomm/dragonboard820c/dragonboard820c.c @@ -13,7 +13,6 @@ #include <asm/global_data.h> #include <linux/arm-smccc.h> #include <linux/psci.h> -#include <common.h> #include <dm.h> #include <asm/io.h> #include <linux/bitops.h> diff --git a/board/raidsonic/ib62x0/ib62x0.c b/board/raidsonic/ib62x0/ib62x0.c index f9bc07649e0..8d1d549a217 100644 --- a/board/raidsonic/ib62x0/ib62x0.c +++ b/board/raidsonic/ib62x0/ib62x0.c @@ -6,7 +6,6 @@ * Simon Baatz <gmbnomis@gmail.com> */ -#include <common.h> #include <init.h> #include <miiphy.h> #include <asm/global_data.h> diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 2851ebc9853..d996eb0cf69 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -3,7 +3,6 @@ * (C) Copyright 2012-2016 Stephen Warren */ -#include <common.h> #include <config.h> #include <dm.h> #include <env.h> diff --git a/board/renesas/falcon/falcon.c b/board/renesas/falcon/falcon.c index 27fccacf6f8..c88257d9677 100644 --- a/board/renesas/falcon/falcon.c +++ b/board/renesas/falcon/falcon.c @@ -14,7 +14,6 @@ #include <asm/processor.h> #include <linux/errno.h> #include <asm/system.h> -#include <asm/u-boot.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/board/renesas/grpeach/grpeach.c b/board/renesas/grpeach/grpeach.c index c475c3f50ab..88f65c3b6a0 100644 --- a/board/renesas/grpeach/grpeach.c +++ b/board/renesas/grpeach/grpeach.c @@ -10,7 +10,6 @@ #include <asm/global_data.h> #include <asm/io.h> #include <asm/arch/sys_proto.h> -#include <asm/u-boot.h> #define RZA1_WDT_BASE 0xfcfe0000 #define WTCSR 0x00 diff --git a/board/rockchip/evb_rk3036/evb_rk3036.c b/board/rockchip/evb_rk3036/evb_rk3036.c index 8c606463e45..a0805030ea4 100644 --- a/board/rockchip/evb_rk3036/evb_rk3036.c +++ b/board/rockchip/evb_rk3036/evb_rk3036.c @@ -3,7 +3,6 @@ * (C) Copyright 2015 Rockchip Electronics Co., Ltd */ -#include <common.h> #include <dm.h> #include <asm/io.h> #include <asm/arch-rockchip/uart.h> diff --git a/board/rockchip/evb_rk3308/evb_rk3308.c b/board/rockchip/evb_rk3308/evb_rk3308.c index e0c96fd70a2..c895da934a9 100644 --- a/board/rockchip/evb_rk3308/evb_rk3308.c +++ b/board/rockchip/evb_rk3308/evb_rk3308.c @@ -3,7 +3,6 @@ * (C) Copyright 2018 Rockchip Electronics Co., Ltd */ -#include <common.h> #include <adc.h> #include <asm/global_data.h> diff --git a/board/rockchip/evb_rv1108/evb_rv1108.c b/board/rockchip/evb_rv1108/evb_rv1108.c index 0d7a486bed7..48b9d8f80c4 100644 --- a/board/rockchip/evb_rv1108/evb_rv1108.c +++ b/board/rockchip/evb_rv1108/evb_rv1108.c @@ -4,7 +4,6 @@ * Authors: Andy Yan <andy.yan@rock-chips.com> */ -#include <common.h> #include <init.h> #include <syscon.h> #include <asm/global_data.h> diff --git a/board/rockchip/kylin_rk3036/kylin_rk3036.c b/board/rockchip/kylin_rk3036/kylin_rk3036.c index 0ca91cdeb01..c452b131208 100644 --- a/board/rockchip/kylin_rk3036/kylin_rk3036.c +++ b/board/rockchip/kylin_rk3036/kylin_rk3036.c @@ -3,7 +3,6 @@ * (C) Copyright 2015 Rockchip Electronics Co., Ltd */ -#include <common.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c index eff3a00c30a..e966e9f201a 100644 --- a/board/rockchip/tinker_rk3288/tinker-rk3288.c +++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c @@ -3,9 +3,7 @@ * (C) Copyright 2016 Rockchip Electronics Co., Ltd */ -#include <common.h> #include <dm.h> -#include <eeprom.h> #include <env.h> #include <i2c_eeprom.h> #include <init.h> diff --git a/board/ronetix/imx7-cm/imx7-cm.c b/board/ronetix/imx7-cm/imx7-cm.c index c23097f0476..a1f3f3cd797 100644 --- a/board/ronetix/imx7-cm/imx7-cm.c +++ b/board/ronetix/imx7-cm/imx7-cm.c @@ -15,7 +15,6 @@ #include <asm/mach-imx/iomux-v3.h> #include <asm/mach-imx/mxc_i2c.h> #include <asm/io.h> -#include <common.h> #include <i2c.h> #include <miiphy.h> #include <power/pmic.h> diff --git a/board/ronetix/imx7-cm/spl.c b/board/ronetix/imx7-cm/spl.c index b94cfd6ffc6..136de3cf3ef 100644 --- a/board/ronetix/imx7-cm/spl.c +++ b/board/ronetix/imx7-cm/spl.c @@ -5,7 +5,6 @@ * Author: Ilko Iliev <iliev@ronetix.at> */ -#include <common.h> #include <cpu_func.h> #include <init.h> #include <asm/arch/clock.h> diff --git a/board/ronetix/imx8mq-cm/imx8mq_cm.c b/board/ronetix/imx8mq-cm/imx8mq_cm.c index 9805a3a7da8..fbee2c39771 100644 --- a/board/ronetix/imx8mq-cm/imx8mq_cm.c +++ b/board/ronetix/imx8mq-cm/imx8mq_cm.c @@ -3,7 +3,6 @@ * Copyright 2018 NXP */ -#include <common.h> #include <miiphy.h> #include <asm-generic/gpio.h> #include <asm/arch/imx8mq_pins.h> diff --git a/board/ronetix/imx8mq-cm/lpddr4_timing.c b/board/ronetix/imx8mq-cm/lpddr4_timing.c index 685600ee62f..a7ad9375ce3 100644 --- a/board/ronetix/imx8mq-cm/lpddr4_timing.c +++ b/board/ronetix/imx8mq-cm/lpddr4_timing.c @@ -4,7 +4,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/ronetix/imx8mq-cm/spl.c b/board/ronetix/imx8mq-cm/spl.c index 1c675bcab25..ee0ad20ced4 100644 --- a/board/ronetix/imx8mq-cm/spl.c +++ b/board/ronetix/imx8mq-cm/spl.c @@ -4,7 +4,7 @@ * */ -#include <common.h> +#include <config.h> #include <hang.h> #include <init.h> #include <asm/arch/ddr.h> diff --git a/board/ronetix/pm9261/pm9261.c b/board/ronetix/pm9261/pm9261.c index 07febe69dc7..ee578749bce 100644 --- a/board/ronetix/pm9261/pm9261.c +++ b/board/ronetix/pm9261/pm9261.c @@ -7,7 +7,7 @@ * Copyright (C) 2009 Jean-Christopher PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <vsprintf.h> #include <asm/global_data.h> diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c index 76f62ddde91..1de1bd68701 100644 --- a/board/ronetix/pm9263/pm9263.c +++ b/board/ronetix/pm9263/pm9263.c @@ -7,7 +7,7 @@ * Copyright (C) 2009 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <linux/sizes.h> diff --git a/board/ronetix/pm9g45/pm9g45.c b/board/ronetix/pm9g45/pm9g45.c index aa5c80ac641..5d5edd9f253 100644 --- a/board/ronetix/pm9g45/pm9g45.c +++ b/board/ronetix/pm9g45/pm9g45.c @@ -10,7 +10,7 @@ * Lead Tech Design <www.leadtechdesign.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <linux/sizes.h> diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c index 3ebf600e1d7..e70b4a82687 100644 --- a/board/samsung/arndale/arndale.c +++ b/board/samsung/arndale/arndale.c @@ -3,7 +3,7 @@ * Copyright (C) 2013 Samsung Electronics */ -#include <common.h> +#include <config.h> #include <cpu_func.h> #include <init.h> #include <log.h> diff --git a/board/samsung/arndale/arndale_spl.c b/board/samsung/arndale/arndale_spl.c index 6ad0273e049..c40ca7fa749 100644 --- a/board/samsung/arndale/arndale_spl.c +++ b/board/samsung/arndale/arndale_spl.c @@ -3,7 +3,6 @@ * Copyright (c) 2012 The Chromium OS Authors. */ -#include <common.h> #include <asm/arch/spl.h> #define SIGNATURE 0xdeadbeef diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 5a71982775d..eed1c2450fa 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -4,7 +4,7 @@ * Rajeshwari Shinde <rajeshwari.s@samsung.com> */ -#include <common.h> +#include <config.h> #include <cros_ec.h> #include <env.h> #include <errno.h> diff --git a/board/samsung/common/exynos-uboot-spl.lds b/board/samsung/common/exynos-uboot-spl.lds index 73cd97a1b1d..9d3b57e98db 100644 --- a/board/samsung/common/exynos-uboot-spl.lds +++ b/board/samsung/common/exynos-uboot-spl.lds @@ -41,11 +41,7 @@ SECTIONS . = ALIGN(4); __image_copy_end = .; - - .end : - { - *(.__end) - } >.sram + _end = .; .bss : { diff --git a/board/samsung/common/exynos5-dt-types.c b/board/samsung/common/exynos5-dt-types.c index 9294d36ba35..8328bf427cc 100644 --- a/board/samsung/common/exynos5-dt-types.c +++ b/board/samsung/common/exynos5-dt-types.c @@ -4,7 +4,7 @@ * Przemyslaw Marczak <p.marczak@samsung.com> */ -#include <common.h> +#include <config.h> #include <adc.h> #include <dm.h> #include <errno.h> diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c index b3e87c93751..56862bcb34d 100644 --- a/board/samsung/common/exynos5-dt.c +++ b/board/samsung/common/exynos5-dt.c @@ -3,7 +3,7 @@ * Copyright (C) 2012 Samsung Electronics */ -#include <common.h> +#include <config.h> #include <dm.h> #include <dwc3-uboot.h> #include <env.h> diff --git a/board/samsung/common/gadget.c b/board/samsung/common/gadget.c index 9487f9ec4e0..c1b4342f4e2 100644 --- a/board/samsung/common/gadget.c +++ b/board/samsung/common/gadget.c @@ -4,7 +4,7 @@ * Lukasz Majewski <l.majewski@samsung.com> */ -#include <common.h> +#include <linux/string.h> #include <linux/usb/ch9.h> #define EXYNOS_G_DNL_THOR_VENDOR_NUM 0x04E8 diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c index cc114aaaa6d..c134a9d70e2 100644 --- a/board/samsung/common/misc.c +++ b/board/samsung/common/misc.c @@ -4,7 +4,7 @@ * Przemyslaw Marczak <p.marczak@samsung.com> */ -#include <common.h> +#include <config.h> #include <command.h> #include <env.h> #include <libtizen.h> diff --git a/board/samsung/common/sromc.c b/board/samsung/common/sromc.c index 76e37dfe262..689ac8f8c6f 100644 --- a/board/samsung/common/sromc.c +++ b/board/samsung/common/sromc.c @@ -5,7 +5,6 @@ #define LOG_CATEGORY UCLASS_ETH -#include <common.h> #include <dm.h> #include <log.h> #include <asm/arch/pinmux.h> diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c index c8f5a153bb4..a1047f3fd2a 100644 --- a/board/samsung/goni/goni.c +++ b/board/samsung/goni/goni.c @@ -5,7 +5,6 @@ * Kyungmin Park <kyungmin.park@samsung.com> */ -#include <common.h> #include <init.h> #include <log.h> #include <asm/global_data.h> diff --git a/board/samsung/goni/onenand.c b/board/samsung/goni/onenand.c index c67c107b16c..6c7a03624b0 100644 --- a/board/samsung/goni/onenand.c +++ b/board/samsung/goni/onenand.c @@ -4,7 +4,7 @@ * Kyungmin Park <kyungmin.park@samsung.com> */ -#include <common.h> +#include <config.h> #include <linux/mtd/mtd.h> #include <linux/mtd/onenand.h> #include <linux/mtd/samsung_onenand.h> diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index 99e5613ced9..84d6d919f07 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -4,7 +4,7 @@ * Przemyslaw Marczak <p.marczak@samsung.com> */ -#include <common.h> +#include <config.h> #include <log.h> #include <asm/arch/pinmux.h> #include <asm/arch/power.h> diff --git a/board/samsung/origen/origen.c b/board/samsung/origen/origen.c index ddf6a2b72fa..c474a7e54fa 100644 --- a/board/samsung/origen/origen.c +++ b/board/samsung/origen/origen.c @@ -3,7 +3,6 @@ * Copyright (C) 2011 Samsung Electronics */ -#include <common.h> #include <asm/io.h> #include <asm/gpio.h> #include <asm/arch/cpu.h> diff --git a/board/samsung/smdk5250/smdk5250_spl.c b/board/samsung/smdk5250/smdk5250_spl.c index b0ef34dd6aa..1c78cb6dda4 100644 --- a/board/samsung/smdk5250/smdk5250_spl.c +++ b/board/samsung/smdk5250/smdk5250_spl.c @@ -3,7 +3,6 @@ * Copyright (c) 2012 The Chromium OS Authors. */ -#include <common.h> #include <asm/arch/cpu.h> #include <asm/arch/spl.h> #include <asm/arch/clk.h> diff --git a/board/samsung/smdk5420/smdk5420_spl.c b/board/samsung/smdk5420/smdk5420_spl.c index 84126f5608c..ccf8b257ec2 100644 --- a/board/samsung/smdk5420/smdk5420_spl.c +++ b/board/samsung/smdk5420/smdk5420_spl.c @@ -3,7 +3,6 @@ * Copyright (C) 2013 The Chromium OS Authors. */ -#include <common.h> #include <asm/arch/cpu.h> #include <asm/arch/spl.h> #include <asm/arch/clk.h> diff --git a/board/samsung/smdkc100/onenand.c b/board/samsung/smdkc100/onenand.c index 04dc04a1a4a..86ec550aaca 100644 --- a/board/samsung/smdkc100/onenand.c +++ b/board/samsung/smdkc100/onenand.c @@ -4,7 +4,6 @@ * Kyungmin Park <kyungmin.park@samsung.com> */ -#include <common.h> #include <linux/compat.h> #include <linux/mtd/mtd.h> #include <linux/mtd/onenand.h> diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c index 4f46911b0b4..7d0b0fcb0ae 100644 --- a/board/samsung/smdkc100/smdkc100.c +++ b/board/samsung/smdkc100/smdkc100.c @@ -5,7 +5,7 @@ * Kyungmin Park <kyungmin.park@samsung.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <net.h> #include <asm/global_data.h> diff --git a/board/samsung/smdkv310/smdkv310.c b/board/samsung/smdkv310/smdkv310.c index 47483a26a62..5a4874b29cd 100644 --- a/board/samsung/smdkv310/smdkv310.c +++ b/board/samsung/smdkv310/smdkv310.c @@ -3,7 +3,7 @@ * Copyright (C) 2011 Samsung Electronics */ -#include <common.h> +#include <config.h> #include <init.h> #include <log.h> #include <net.h> diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c index 6a3e5b29b98..6efc6f3831d 100644 --- a/board/samsung/trats/trats.c +++ b/board/samsung/trats/trats.c @@ -6,7 +6,6 @@ * Donghwa Lee <dh09.lee@samsung.com> */ -#include <common.h> #include <env.h> #include <log.h> #include <asm/io.h> diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c index 81ccc124c80..612575a5094 100644 --- a/board/samsung/trats2/trats2.c +++ b/board/samsung/trats2/trats2.c @@ -5,7 +5,6 @@ * Piotr Wilczek <p.wilczek@samsung.com> */ -#include <common.h> #include <log.h> #include <asm/gpio.h> #include <asm/arch/pinmux.h> diff --git a/board/samsung/universal_c210/onenand.c b/board/samsung/universal_c210/onenand.c index 265a2cde4b4..ba56e86df46 100644 --- a/board/samsung/universal_c210/onenand.c +++ b/board/samsung/universal_c210/onenand.c @@ -4,7 +4,7 @@ * Kyungmin Park <kyungmin.park@samsung.com> */ -#include <common.h> +#include <config.h> #include <linux/mtd/mtd.h> #include <linux/mtd/onenand.h> #include <linux/mtd/samsung_onenand.h> diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c index 2d61dff89c2..6bed724153e 100644 --- a/board/samsung/universal_c210/universal.c +++ b/board/samsung/universal_c210/universal.c @@ -5,7 +5,6 @@ * Kyungmin Park <kyungmin.park@samsung.com> */ -#include <common.h> #include <env.h> #include <log.h> #include <spi.h> diff --git a/board/schneider/rzn1-snarc/rzn1.c b/board/schneider/rzn1-snarc/rzn1.c index 09241c3a954..e1d5b5b0497 100644 --- a/board/schneider/rzn1-snarc/rzn1.c +++ b/board/schneider/rzn1-snarc/rzn1.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> #include <dm.h> #include <ram.h> #include <asm/global_data.h> diff --git a/board/seeed/linkit-smart-7688/board.c b/board/seeed/linkit-smart-7688/board.c index bf7c69ea838..91fa08fd9ec 100644 --- a/board/seeed/linkit-smart-7688/board.c +++ b/board/seeed/linkit-smart-7688/board.c @@ -3,7 +3,6 @@ * Copyright (C) 2018 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <init.h> #include <asm/io.h> #include <linux/bitops.h> diff --git a/board/seeed/npi_imx6ull/spl.c b/board/seeed/npi_imx6ull/spl.c index b29da2c1fc1..2312d8fac69 100644 --- a/board/seeed/npi_imx6ull/spl.c +++ b/board/seeed/npi_imx6ull/spl.c @@ -4,7 +4,7 @@ * Author: Navin Sankar Velliangiri <navin@linumiz.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <spl.h> #include <asm/arch/clock.h> diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c index b1d7e3b1c05..53dac8bfe1b 100644 --- a/board/siemens/capricorn/board.c +++ b/board/siemens/capricorn/board.c @@ -5,7 +5,6 @@ * Copyright 2019 Siemens AG * */ -#include <common.h> #include <command.h> #include <dm.h> #include <env.h> diff --git a/board/siemens/capricorn/spl.c b/board/siemens/capricorn/spl.c index e160c611a96..696b5ebd340 100644 --- a/board/siemens/capricorn/spl.c +++ b/board/siemens/capricorn/spl.c @@ -5,7 +5,6 @@ * Copyright 2019 Siemens AG * */ -#include <common.h> #include <init.h> #include <spl.h> #include <dm.h> diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c index 569b86db00a..7d73d1f2b36 100644 --- a/board/siemens/corvus/board.c +++ b/board/siemens/corvus/board.c @@ -10,7 +10,7 @@ * Lead Tech Design <www.leadtechdesign.com> */ -#include <common.h> +#include <config.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index 0b0686e2628..ed292c364a5 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -8,7 +8,7 @@ * Jan Kiszka <jan.kiszka@siemens.com> */ -#include <common.h> +#include <config.h> #include <bootstage.h> #include <dm.h> #include <fdt_support.h> diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c index 15044c7d0ed..946fbc3f229 100644 --- a/board/siemens/smartweb/smartweb.c +++ b/board/siemens/smartweb/smartweb.c @@ -15,7 +15,7 @@ * DENX Software Engineering GmbH */ -#include <common.h> +#include <config.h> #include <dm.h> #include <init.h> #include <net.h> diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index ad44a7c0d28..bda12a97708 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -12,7 +12,7 @@ */ #include <command.h> -#include <common.h> +#include <config.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/silinux/ek874/ek874.c b/board/silinux/ek874/ek874.c index 6dc804a0c06..a3fe6f96d09 100644 --- a/board/silinux/ek874/ek874.c +++ b/board/silinux/ek874/ek874.c @@ -6,8 +6,8 @@ * Copyright (C) 2021 Renesas Electronics Corporation */ -#include <common.h> #include <asm/global_data.h> +#include <asm/u-boot.h> #include <asm/io.h> #define RST_BASE 0xE6160000 diff --git a/board/sipeed/maix/maix.c b/board/sipeed/maix/maix.c index 06653b5a876..08077a1f9e1 100644 --- a/board/sipeed/maix/maix.c +++ b/board/sipeed/maix/maix.c @@ -3,7 +3,7 @@ * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com> */ -#include <common.h> +#include <config.h> #include <clk.h> #include <dm.h> #include <fdt_support.h> diff --git a/board/skyworth/hc2910-2aghd05/hc2910-2aghd05.c b/board/skyworth/hc2910-2aghd05/hc2910-2aghd05.c index abad5efdafb..22be10d70a7 100644 --- a/board/skyworth/hc2910-2aghd05/hc2910-2aghd05.c +++ b/board/skyworth/hc2910-2aghd05/hc2910-2aghd05.c @@ -3,7 +3,6 @@ * Board init file for Skyworth HC2910 2AGHD05 */ -#include <common.h> #include <fdtdec.h> #include <init.h> #include <asm/system.h> diff --git a/board/socionext/developerbox/developerbox.c b/board/socionext/developerbox/developerbox.c index 062e4a7b79f..556a9ed527e 100644 --- a/board/socionext/developerbox/developerbox.c +++ b/board/socionext/developerbox/developerbox.c @@ -9,7 +9,7 @@ #include <asm/armv8/mmu.h> #include <asm/global_data.h> #include <asm/io.h> -#include <common.h> +#include <config.h> #include <efi.h> #include <efi_loader.h> #include <env_internal.h> diff --git a/board/socrates/ddr.c b/board/socrates/ddr.c index 3a94f7beccd..bf4894eff67 100644 --- a/board/socrates/ddr.c +++ b/board/socrates/ddr.c @@ -3,7 +3,6 @@ * Copyright 2008 Freescale Semiconductor, Inc. */ -#include <common.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> diff --git a/board/socrates/law.c b/board/socrates/law.c index e4427ecff1b..446fdbcaba3 100644 --- a/board/socrates/law.c +++ b/board/socrates/law.c @@ -9,7 +9,7 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <asm/fsl_law.h> #include <asm/mmu.h> diff --git a/board/socrates/nand.c b/board/socrates/nand.c index b1e38c511e5..517a4a0af6a 100644 --- a/board/socrates/nand.c +++ b/board/socrates/nand.c @@ -4,7 +4,7 @@ * Sergei Poselenov, Emcraft Systems, sposelenov@emcraft.com. */ -#include <common.h> +#include <config.h> #if defined(CFG_SYS_NAND_BASE) #include <nand.h> diff --git a/board/socrates/sdram.c b/board/socrates/sdram.c index 61402a554b7..d0415d26ce7 100644 --- a/board/socrates/sdram.c +++ b/board/socrates/sdram.c @@ -4,7 +4,7 @@ * Sergei Poselenov, Emcraft Systems, sposelenov@emcraft.com. */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/processor.h> #include <asm/immap_85xx.h> diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index 1d63c81a9c8..6e6e276cc74 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -10,7 +10,7 @@ * (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.com> */ -#include <common.h> +#include <config.h> #include <clock_legacy.h> #include <env.h> #include <init.h> diff --git a/board/socrates/tlb.c b/board/socrates/tlb.c index 631f6c34075..0cc675781d1 100644 --- a/board/socrates/tlb.c +++ b/board/socrates/tlb.c @@ -9,8 +9,9 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <common.h> +#include <config.h> #include <asm/mmu.h> +#include <asm/ppc.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c index 4483bd7f7a3..a0dbf97524b 100644 --- a/board/softing/vining_2000/vining_2000.c +++ b/board/softing/vining_2000/vining_2000.c @@ -24,7 +24,7 @@ #include <linux/bitops.h> #include <linux/delay.h> #include <linux/sizes.h> -#include <common.h> +#include <config.h> #include <fsl_esdhc_imx.h> #include <mmc.h> #include <i2c.h> diff --git a/board/softing/vining_fpga/socfpga.c b/board/softing/vining_fpga/socfpga.c index b3f9550742e..2483fbcf263 100644 --- a/board/softing/vining_fpga/socfpga.c +++ b/board/softing/vining_fpga/socfpga.c @@ -3,7 +3,7 @@ * Copyright (C) 2012 Altera Corporation <www.altera.com> */ -#include <common.h> +#include <config.h> #include <eeprom.h> #include <env.h> #include <init.h> diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c index 6977db0a9e2..2dbd071abd9 100644 --- a/board/solidrun/clearfog/clearfog.c +++ b/board/solidrun/clearfog/clearfog.c @@ -3,7 +3,7 @@ * Copyright (C) 2015 Stefan Roese <sr@denx.de> */ -#include <common.h> +#include <config.h> #include <env.h> #include <i2c.h> #include <init.h> diff --git a/board/solidrun/common/tlv_data.c b/board/solidrun/common/tlv_data.c index cf5824886c3..b8086605c3a 100644 --- a/board/solidrun/common/tlv_data.c +++ b/board/solidrun/common/tlv_data.c @@ -3,9 +3,9 @@ * Copyright 2020 SolidRun */ -#include <common.h> #include <compiler.h> #include <tlv_eeprom.h> +#include <linux/kernel.h> #include "tlv_data.h" #define SR_TLV_CODE_RAM_SIZE 0x81 diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c index 7f4811d8879..3406ba8616e 100644 --- a/board/solidrun/mx6cuboxi/mx6cuboxi.c +++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c @@ -15,7 +15,7 @@ * Ported to SolidRun microSOM by Rabeeh Khoury <rabeeh@solid-run.com> */ -#include <common.h> +#include <config.h> #include <image.h> #include <init.h> #include <log.h> diff --git a/board/somlabs/visionsom-6ull/visionsom-6ull.c b/board/somlabs/visionsom-6ull/visionsom-6ull.c index 38d14f6bc26..0ecb5c3b493 100644 --- a/board/somlabs/visionsom-6ull/visionsom-6ull.c +++ b/board/somlabs/visionsom-6ull/visionsom-6ull.c @@ -17,7 +17,6 @@ #include <asm/mach-imx/iomux-v3.h> #include <asm/mach-imx/mxc_i2c.h> #include <asm/io.h> -#include <common.h> #include <env.h> #include <fsl_esdhc_imx.h> #include <i2c.h> diff --git a/board/sr1500/socfpga.c b/board/sr1500/socfpga.c index d9125a76bf7..5603ef24da8 100644 --- a/board/sr1500/socfpga.c +++ b/board/sr1500/socfpga.c @@ -3,7 +3,6 @@ * Copyright (C) 2015 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <init.h> #include <asm/arch/reset_manager.h> #include <asm/gpio.h> diff --git a/board/st/common/cmd_stboard.c b/board/st/common/cmd_stboard.c index c8c0bad5da1..50da063051b 100644 --- a/board/st/common/cmd_stboard.c +++ b/board/st/common/cmd_stboard.c @@ -30,7 +30,6 @@ */ #ifndef CONFIG_SPL_BUILD -#include <common.h> #include <command.h> #include <console.h> #include <misc.h> diff --git a/board/st/common/stm32mp_dfu.c b/board/st/common/stm32mp_dfu.c index 77edb86e78c..1db8e45480e 100644 --- a/board/st/common/stm32mp_dfu.c +++ b/board/st/common/stm32mp_dfu.c @@ -3,7 +3,6 @@ * Copyright (C) 2020, STMicroelectronics - All Rights Reserved */ -#include <common.h> #include <blk.h> #include <dm.h> #include <dfu.h> diff --git a/board/st/common/stm32mp_dfu_virt.c b/board/st/common/stm32mp_dfu_virt.c index f0f99605796..4049d72bf9d 100644 --- a/board/st/common/stm32mp_dfu_virt.c +++ b/board/st/common/stm32mp_dfu_virt.c @@ -3,7 +3,6 @@ * Copyright (C) 2023, STMicroelectronics - All Rights Reserved */ -#include <common.h> #include <dfu.h> #include <dm.h> #include <misc.h> diff --git a/board/st/common/stpmic1.c b/board/st/common/stpmic1.c index 969ad484864..45c2bb5bcea 100644 --- a/board/st/common/stpmic1.c +++ b/board/st/common/stpmic1.c @@ -5,7 +5,6 @@ #define LOG_CATEGORY LOGC_BOARD -#include <common.h> #include <dm.h> #include <log.h> #include <asm/io.h> diff --git a/board/st/common/stusb160x.c b/board/st/common/stusb160x.c index f0385e5e383..e1ad8b00717 100644 --- a/board/st/common/stusb160x.c +++ b/board/st/common/stusb160x.c @@ -8,7 +8,6 @@ #define LOG_CATEGORY UCLASS_I2C_GENERIC -#include <common.h> #include <dm.h> #include <i2c.h> diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c index 82817571ae3..a912712c9dd 100644 --- a/board/st/stih410-b2260/board.c +++ b/board/st/stih410-b2260/board.c @@ -4,7 +4,6 @@ * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics. */ -#include <common.h> #include <cpu_func.h> #include <init.h> #include <asm/cache.h> diff --git a/board/st/stm32f429-discovery/led.c b/board/st/stm32f429-discovery/led.c index 8dda6a97bd1..4b8038341b9 100644 --- a/board/st/stm32f429-discovery/led.c +++ b/board/st/stm32f429-discovery/led.c @@ -4,7 +4,6 @@ * Kamil Lulko, <kamil.lulko@gmail.com> */ -#include <common.h> #include <status_led.h> #include <asm-generic/gpio.h> diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c index 55e464cc7cf..22d751b44d3 100644 --- a/board/st/stm32f429-discovery/stm32f429-discovery.c +++ b/board/st/stm32f429-discovery/stm32f429-discovery.c @@ -10,7 +10,6 @@ * Kamil Lulko, <kamil.lulko@gmail.com> */ -#include <common.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/st/stm32f429-evaluation/stm32f429-evaluation.c b/board/st/stm32f429-evaluation/stm32f429-evaluation.c index 25472f041fe..db59ebb838e 100644 --- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c +++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c @@ -4,7 +4,6 @@ * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics. */ -#include <common.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c index 9ed6c1e6768..134d207d95d 100644 --- a/board/st/stm32f469-discovery/stm32f469-discovery.c +++ b/board/st/stm32f469-discovery/stm32f469-discovery.c @@ -4,7 +4,6 @@ * Author(s): Patrice CHOTARD, <patrice.chotard@foss.st.com> for STMicroelectronics. */ -#include <common.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c index 0f966600843..6d86e4fe7aa 100644 --- a/board/st/stm32f746-disco/stm32f746-disco.c +++ b/board/st/stm32f746-disco/stm32f746-disco.c @@ -4,7 +4,7 @@ * Author(s): Vikas Manocha, <vikas.manocha@st.com> for STMicroelectronics. */ -#include <common.h> +#include <config.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/st/stm32h743-disco/stm32h743-disco.c b/board/st/stm32h743-disco/stm32h743-disco.c index 4ca5e847212..35ef9ff9e28 100644 --- a/board/st/stm32h743-disco/stm32h743-disco.c +++ b/board/st/stm32h743-disco/stm32h743-disco.c @@ -4,7 +4,6 @@ * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics. */ -#include <common.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/st/stm32h743-eval/stm32h743-eval.c b/board/st/stm32h743-eval/stm32h743-eval.c index 4ca5e847212..35ef9ff9e28 100644 --- a/board/st/stm32h743-eval/stm32h743-eval.c +++ b/board/st/stm32h743-eval/stm32h743-eval.c @@ -4,7 +4,6 @@ * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics. */ -#include <common.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/st/stm32h750-art-pi/stm32h750-art-pi.c b/board/st/stm32h750-art-pi/stm32h750-art-pi.c index 0d39ce849a6..75aa4d139fb 100644 --- a/board/st/stm32h750-art-pi/stm32h750-art-pi.c +++ b/board/st/stm32h750-art-pi/stm32h750-art-pi.c @@ -4,7 +4,6 @@ * Author(s): Dillon Min <dillon.minfei@gmail.com> */ -#include <common.h> #include <dm.h> #include <init.h> #include <log.h> diff --git a/board/st/stm32mp1/spl.c b/board/st/stm32mp1/spl.c index 8b4a529f759..d63dffd97e8 100644 --- a/board/st/stm32mp1/spl.c +++ b/board/st/stm32mp1/spl.c @@ -4,7 +4,6 @@ */ #include <config.h> -#include <common.h> #include <power/pmic.h> #include <power/stpmic1.h> #include <asm/arch/sys_proto.h> diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index db15d78237e..97532a8156f 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -5,7 +5,6 @@ #define LOG_CATEGORY LOGC_BOARD -#include <common.h> #include <adc.h> #include <bootm.h> #include <button.h> diff --git a/board/ste/stemmy/stemmy.c b/board/ste/stemmy/stemmy.c index 060d562cbc9..826c002907d 100644 --- a/board/ste/stemmy/stemmy.c +++ b/board/ste/stemmy/stemmy.c @@ -2,12 +2,12 @@ /* * Copyright (C) 2019 Stephan Gerhold <stephan@gerhold.net> */ -#include <common.h> #include <env.h> #include <fdt_support.h> #include <init.h> #include <log.h> #include <stdlib.h> +#include <linux/errno.h> #include <asm/global_data.h> #include <asm/setup.h> #include <asm/system.h> diff --git a/board/storopack/smegw01/smegw01.c b/board/storopack/smegw01/smegw01.c index 345191b31c2..910feeda31f 100644 --- a/board/storopack/smegw01/smegw01.c +++ b/board/storopack/smegw01/smegw01.c @@ -12,7 +12,6 @@ #include <asm/mach-imx/hab.h> #include <asm/mach-imx/iomux-v3.h> #include <asm/io.h> -#include <common.h> #include <env.h> #include <env_internal.h> #include <asm/arch/crm_regs.h> diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 1313b01dcea..ed86f1df5dc 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -10,7 +10,6 @@ * Some board init for the Allwinner A10-evb board. */ -#include <common.h> #include <clock_legacy.h> #include <dm.h> #include <env.h> diff --git a/board/sunxi/chip.c b/board/sunxi/chip.c index eeee6319e79..270af2506d2 100644 --- a/board/sunxi/chip.c +++ b/board/sunxi/chip.c @@ -5,7 +5,6 @@ * Based on initial code from Maxime Ripard */ -#include <common.h> #include <malloc.h> #include <dm.h> #include <w1.h> diff --git a/board/sunxi/dram_sun4i_auto.c b/board/sunxi/dram_sun4i_auto.c index 547d1c0cb4d..4b78919a5ba 100644 --- a/board/sunxi/dram_sun4i_auto.c +++ b/board/sunxi/dram_sun4i_auto.c @@ -1,4 +1,3 @@ -#include <common.h> #include <init.h> #include <asm/arch/dram.h> diff --git a/board/sunxi/dram_sun5i_auto.c b/board/sunxi/dram_sun5i_auto.c index 517506ccc4f..8976e3b16d6 100644 --- a/board/sunxi/dram_sun5i_auto.c +++ b/board/sunxi/dram_sun5i_auto.c @@ -1,6 +1,5 @@ /* DRAM parameters for auto dram configuration on sun5i and sun7i */ -#include <common.h> #include <init.h> #include <asm/arch/dram.h> diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c index 2a885305ebe..710e821e3fc 100644 --- a/board/sunxi/gmac.c +++ b/board/sunxi/gmac.c @@ -1,4 +1,3 @@ -#include <common.h> #include <netdev.h> #include <miiphy.h> #include <asm/io.h> diff --git a/board/sysam/amcore/amcore.c b/board/sysam/amcore/amcore.c index 086421d9265..d5aa1f0776f 100644 --- a/board/sysam/amcore/amcore.c +++ b/board/sysam/amcore/amcore.c @@ -7,7 +7,7 @@ * This file copies memory testdram() from sandburst/common/sb_common.c */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/immap.h> diff --git a/board/sysam/stmark2/stmark2.c b/board/sysam/stmark2/stmark2.c index 475e3edfa62..7818f2671d5 100644 --- a/board/sysam/stmark2/stmark2.c +++ b/board/sysam/stmark2/stmark2.c @@ -5,7 +5,7 @@ * (C) Copyright 2017 Angelo Dureghello <angelo@sysam.it> */ -#include <common.h> +#include <config.h> #include <init.h> #include <spi.h> #include <asm/global_data.h> diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c index 3f7d42f3eb8..2e54ede62d6 100644 --- a/board/tcl/sl50/board.c +++ b/board/tcl/sl50/board.c @@ -7,7 +7,7 @@ * Copyright (C) 2011, Texas Instruments, Incorporated - https://www.ti.com/ */ -#include <common.h> +#include <config.h> #include <env.h> #include <errno.h> #include <init.h> diff --git a/board/tcl/sl50/mux.c b/board/tcl/sl50/mux.c index ab9088145ab..6d89c4a3998 100644 --- a/board/tcl/sl50/mux.c +++ b/board/tcl/sl50/mux.c @@ -5,7 +5,6 @@ * Copyright (C) 2011, Texas Instruments, Incorporated - https://www.ti.com/ */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> #include <asm/arch/mux.h> diff --git a/board/technexion/pico-imx6/pico-imx6.c b/board/technexion/pico-imx6/pico-imx6.c index 6b9c4f4373c..03170b148c5 100644 --- a/board/technexion/pico-imx6/pico-imx6.c +++ b/board/technexion/pico-imx6/pico-imx6.c @@ -6,7 +6,6 @@ * Author: Fabio Estevam <festevam@gmail.com> */ -#include <common.h> #include <env.h> #include <init.h> #include <net.h> diff --git a/board/technexion/pico-imx6/spl.c b/board/technexion/pico-imx6/spl.c index 3b36bb8df13..50f51774264 100644 --- a/board/technexion/pico-imx6/spl.c +++ b/board/technexion/pico-imx6/spl.c @@ -6,7 +6,6 @@ * Fabio Estevam <festevam@gmail.com> */ -#include <common.h> #include <image.h> #include <init.h> #include <asm/arch/clock.h> diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c index 682c88dee78..10dcf8077e2 100644 --- a/board/technexion/pico-imx6ul/pico-imx6ul.c +++ b/board/technexion/pico-imx6ul/pico-imx6ul.c @@ -17,7 +17,6 @@ #include <asm/gpio.h> #include <asm/mach-imx/iomux-v3.h> #include <asm/io.h> -#include <common.h> #include <miiphy.h> #include <linux/delay.h> #include <linux/sizes.h> diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c index ff56fd88d68..67484e62dad 100644 --- a/board/technexion/pico-imx6ul/spl.c +++ b/board/technexion/pico-imx6ul/spl.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> #include <cpu_func.h> #include <hang.h> #include <init.h> diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index b12941ccf82..d0f739c624a 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -15,7 +15,6 @@ #include <asm/mach-imx/iomux-v3.h> #include <asm/mach-imx/boot_mode.h> #include <asm/io.h> -#include <common.h> #include <miiphy.h> #include <power/pmic.h> #include <power/pfuze3000_pmic.h> diff --git a/board/technexion/pico-imx7d/spl.c b/board/technexion/pico-imx7d/spl.c index 0192eafbaa1..8f219f76c60 100644 --- a/board/technexion/pico-imx7d/spl.c +++ b/board/technexion/pico-imx7d/spl.c @@ -5,7 +5,7 @@ * Author: Richard Hu <richard.hu@technexion.com> */ -#include <common.h> +#include <config.h> #include <cpu_func.h> #include <init.h> #include <asm/arch/clock.h> diff --git a/board/technexion/pico-imx8mq/lpddr4_timing_1gb.c b/board/technexion/pico-imx8mq/lpddr4_timing_1gb.c index 97b9ee27527..cd8ba59f645 100644 --- a/board/technexion/pico-imx8mq/lpddr4_timing_1gb.c +++ b/board/technexion/pico-imx8mq/lpddr4_timing_1gb.c @@ -7,7 +7,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/technexion/pico-imx8mq/lpddr4_timing_2gb.c b/board/technexion/pico-imx8mq/lpddr4_timing_2gb.c index 1572a50a05f..3f66238a504 100644 --- a/board/technexion/pico-imx8mq/lpddr4_timing_2gb.c +++ b/board/technexion/pico-imx8mq/lpddr4_timing_2gb.c @@ -7,7 +7,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/technexion/pico-imx8mq/lpddr4_timing_3gb.c b/board/technexion/pico-imx8mq/lpddr4_timing_3gb.c index 3fc60a3eeb9..2f037abc97d 100644 --- a/board/technexion/pico-imx8mq/lpddr4_timing_3gb.c +++ b/board/technexion/pico-imx8mq/lpddr4_timing_3gb.c @@ -7,7 +7,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/technexion/pico-imx8mq/lpddr4_timing_4gb.c b/board/technexion/pico-imx8mq/lpddr4_timing_4gb.c index 93b34235162..336ac4c2f54 100644 --- a/board/technexion/pico-imx8mq/lpddr4_timing_4gb.c +++ b/board/technexion/pico-imx8mq/lpddr4_timing_4gb.c @@ -7,7 +7,6 @@ */ #include <linux/kernel.h> -#include <common.h> #include <asm/arch/ddr.h> #include <asm/arch/lpddr4_define.h> diff --git a/board/technexion/pico-imx8mq/pico-imx8mq.c b/board/technexion/pico-imx8mq/pico-imx8mq.c index 2be3206f78a..1659db112fa 100644 --- a/board/technexion/pico-imx8mq/pico-imx8mq.c +++ b/board/technexion/pico-imx8mq/pico-imx8mq.c @@ -3,7 +3,6 @@ * Copyright 2018 NXP */ -#include <common.h> #include <env.h> #include <init.h> #include <malloc.h> diff --git a/board/technexion/pico-imx8mq/spl.c b/board/technexion/pico-imx8mq/spl.c index 1a9c7996cb2..c9d68b402ae 100644 --- a/board/technexion/pico-imx8mq/spl.c +++ b/board/technexion/pico-imx8mq/spl.c @@ -3,7 +3,6 @@ * Copyright 2018 NXP */ -#include <common.h> #include <hang.h> #include <init.h> #include <log.h> diff --git a/board/terasic/de1-soc/socfpga.c b/board/terasic/de1-soc/socfpga.c index 22fbee40aba..8d17f44fd37 100644 --- a/board/terasic/de1-soc/socfpga.c +++ b/board/terasic/de1-soc/socfpga.c @@ -2,7 +2,6 @@ /* * Copyright (C) 2012 Altera Corporation <www.altera.com> */ -#include <common.h> #include <spl.h> void board_boot_order(u32 *spl_boot_list) diff --git a/board/thead/th1520_lpi4a/board.c b/board/thead/th1520_lpi4a/board.c index 16c3e456b3e..bb83e7561f4 100644 --- a/board/thead/th1520_lpi4a/board.c +++ b/board/thead/th1520_lpi4a/board.c @@ -4,7 +4,6 @@ * */ -#include <common.h> #include <cpu_func.h> int board_init(void) diff --git a/board/theadorable/fpga.c b/board/theadorable/fpga.c index bc8379cccf6..56d3647227b 100644 --- a/board/theadorable/fpga.c +++ b/board/theadorable/fpga.c @@ -3,10 +3,10 @@ * Copyright (C) 2016 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <altera.h> #include <errno.h> #include <log.h> +#include <time.h> #include <asm/gpio.h> #include <asm/io.h> #include <asm/arch/cpu.h> diff --git a/board/theadorable/theadorable.c b/board/theadorable/theadorable.c index 144f122bb20..cca5c3d33b5 100644 --- a/board/theadorable/theadorable.c +++ b/board/theadorable/theadorable.c @@ -3,7 +3,6 @@ * Copyright (C) 2015-2019 Stefan Roese <sr@denx.de> */ -#include <common.h> #include <command.h> #include <console.h> #include <dm.h> diff --git a/board/theobroma-systems/tiger_rk3588/Kconfig b/board/theobroma-systems/tiger_rk3588/Kconfig new file mode 100644 index 00000000000..2c6ac6a9a83 --- /dev/null +++ b/board/theobroma-systems/tiger_rk3588/Kconfig @@ -0,0 +1,16 @@ +if TARGET_TIGER_RK3588 + +config SYS_BOARD + default "tiger_rk3588" + +config SYS_VENDOR + default "theobroma-systems" + +config SYS_CONFIG_NAME + default "tiger_rk3588" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ENV_IS_NOWHERE + +endif diff --git a/board/theobroma-systems/tiger_rk3588/MAINTAINERS b/board/theobroma-systems/tiger_rk3588/MAINTAINERS new file mode 100644 index 00000000000..e5aab4b29f3 --- /dev/null +++ b/board/theobroma-systems/tiger_rk3588/MAINTAINERS @@ -0,0 +1,13 @@ +TIGER-RK3588 (SOM-RK3588-Q7) +M: Klaus Goger <klaus.goger@cherry.de> +M: Quentin Schulz <quentin.schulz@cherry.de> +M: Heiko Stuebner <heiko.stuebner@cherry.de> +S: Maintained +F: board/theobroma-systems/tiger_rk3588 +F: board/theobroma-systems/common +F: doc/board/theobroma-systems/ +F: include/configs/tiger_rk3588.h +F: arch/arm/dts/rk3588-tiger* +F: configs/tiger-rk3588_defconfig +W: https://embedded.cherry.de/product/tiger-som-rk3588-q7/ +T: git git://git.embedded.cherry.de/tiger-u-boot.git diff --git a/board/theobroma-systems/tiger_rk3588/Makefile b/board/theobroma-systems/tiger_rk3588/Makefile new file mode 100644 index 00000000000..5c4c484657a --- /dev/null +++ b/board/theobroma-systems/tiger_rk3588/Makefile @@ -0,0 +1,10 @@ +# +# Copyright (c) 2024 Theobroma Systems Design und Consulting GmbH +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += tiger_rk3588.o +ifneq ($(CONFIG_SPL_BUILD),y) +obj-y += ../common/common.o +endif diff --git a/board/theobroma-systems/tiger_rk3588/tiger_rk3588.c b/board/theobroma-systems/tiger_rk3588/tiger_rk3588.c new file mode 100644 index 00000000000..a6d44f10db3 --- /dev/null +++ b/board/theobroma-systems/tiger_rk3588/tiger_rk3588.c @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2023 Theobroma Systems Design und Consulting GmbH + */ + +#include <phy.h> +#include <eth_phy.h> + +#include <asm/types.h> +#include <asm/arch-rockchip/cru_rk3588.h> +#include <asm/arch-rockchip/hardware.h> +#include <asm/arch-rockchip/ioc_rk3588.h> +#include <asm-generic/u-boot.h> +#include <dm/device.h> +#include <dm/uclass-id.h> +#include <linux/bitfield.h> + +#include "../common/common.h" + +#define GPIO2C3_SEL_MASK GENMASK(15, 12) +#define GPIO2C3_ETH0_REFCLKO_25M FIELD_PREP(GPIO2C3_SEL_MASK, 1) + +#define REFCLKO25M_ETH0_OUT_SEL_MASK BIT(15) +#define REFCLKO25M_ETH0_OUT_SEL_CPLL FIELD_PREP(REFCLKO25M_ETH0_OUT_SEL_MASK, 1) +#define REFCLKO25M_ETH0_OUT_DIV_MASK GENMASK(14, 8) +#define REFCLKO25M_ETH0_OUT_DIV(x) FIELD_PREP(REFCLKO25M_ETH0_OUT_DIV_MASK, (x) - 1) + +#define REFCLKO25M_ETH0_OUT_EN BIT(4) + +void setup_eth0refclko(void) +{ + /* Configure and enable ETH0_REFCLKO_25MHz */ + static struct rk3588_bus_ioc * const bus_ioc = (void *)BUS_IOC_BASE; + static struct rk3588_cru * const cru = (void *)CRU_BASE; + + /* 1. Pinmux */ + rk_clrsetreg(&bus_ioc->gpio2c_iomux_sel_l, GPIO2C3_SEL_MASK, GPIO2C3_ETH0_REFCLKO_25M); + /* 2. Parent clock selection + divider => CPLL (1.5GHz) / 60 => 25MHz */ + rk_clrsetreg(&cru->clksel_con[15], + REFCLKO25M_ETH0_OUT_SEL_MASK | REFCLKO25M_ETH0_OUT_DIV_MASK, + REFCLKO25M_ETH0_OUT_SEL_CPLL | REFCLKO25M_ETH0_OUT_DIV(60)); + /* 3. Enable clock */ + rk_clrreg(&cru->clkgate_con[5], REFCLKO25M_ETH0_OUT_EN); +} + +int rockchip_early_misc_init_r(void) +{ + setup_boottargets(); + + setup_eth0refclko(); + + return 0; +} diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 34f987c2b72..34f4a919656 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -7,7 +7,7 @@ * Copyright (C) 2011, Texas Instruments, Incorporated - https://www.ti.com/ */ -#include <common.h> +#include <config.h> #include <dm.h> #include <env.h> #include <errno.h> diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h index 1284c160d81..b0a3842423f 100644 --- a/board/ti/am335x/board.h +++ b/board/ti/am335x/board.h @@ -10,6 +10,8 @@ #ifndef _BOARD_H_ #define _BOARD_H_ +#include <linux/string.h> + /** * AM335X (EMIF_4D) EMIF REG_COS_COUNT_1, REG_COS_COUNT_2, and * REG_PR_OLD_COUNT values to avoid LCDC DMA FIFO underflows and Frame diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index 0bad154f86e..960de15398f 100644 --- a/board/ti/am335x/mux.c +++ b/board/ti/am335x/mux.c @@ -13,7 +13,7 @@ * GNU General Public License for more details. */ -#include <common.h> +#include <config.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> #include <asm/arch/mux.h> diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index a4679a2e294..40b7fcfc387 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -7,8 +7,7 @@ * Copyright (C) 2013, Texas Instruments, Incorporated - https://www.ti.com/ */ -#include <common.h> -#include <eeprom.h> +#include <config.h> #include <asm/global_data.h> #include <dm/uclass.h> #include <env.h> diff --git a/board/ti/am43xx/board.h b/board/ti/am43xx/board.h index 37a169aaf75..b1025bdda1e 100644 --- a/board/ti/am43xx/board.h +++ b/board/ti/am43xx/board.h @@ -11,6 +11,7 @@ #ifndef _BOARD_H_ #define _BOARD_H_ +#include <linux/string.h> #include <asm/arch/omap.h> #define DEV_ATTR_MAX_OFFSET 5 diff --git a/board/ti/am43xx/mux.c b/board/ti/am43xx/mux.c index 463f1cc7178..2fcccbd1f04 100644 --- a/board/ti/am43xx/mux.c +++ b/board/ti/am43xx/mux.c @@ -5,7 +5,6 @@ * Copyright (C) 2013 Texas Instruments Incorporated - https://www.ti.com/ */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/arch/mux.h> #include "../common/board_detect.h" diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index b004a89bb32..48668884bdd 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -7,7 +7,7 @@ * Based on board/ti/dra7xx/evm.c */ -#include <common.h> +#include <config.h> #include <env.h> #include <fastboot.h> #include <fdt_support.h> diff --git a/board/ti/am62ax/am62ax.env b/board/ti/am62ax/am62ax.env index 334374abb73..97122fb57ba 100644 --- a/board/ti/am62ax/am62ax.env +++ b/board/ti/am62ax/am62ax.env @@ -1,5 +1,8 @@ #include <env/ti/ti_common.env> #include <env/ti/mmc.env> +#if CONFIG_CMD_REMOTEPROC +#include <env/ti/k3_rproc.env> +#endif name_kern=Image console=ttyS2,115200n8 @@ -27,3 +30,4 @@ get_kern_mmc=load mmc ${bootpart} ${loadaddr} get_fit_mmc=load mmc ${bootpart} ${addr_fit} ${bootdir}/${name_fit} partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs} +rproc_fw_binaries= 0 /lib/firmware/am62a-mcu-r5f0_0-fw 1 /lib/firmware/am62a-c71_0-fw diff --git a/board/ti/am62px/evm.c b/board/ti/am62px/evm.c index 97a95ce8cc2..1a2c46c462b 100644 --- a/board/ti/am62px/evm.c +++ b/board/ti/am62px/evm.c @@ -6,6 +6,7 @@ * */ +#include <efi_loader.h> #include <asm/arch/hardware.h> #include <asm/io.h> #include <dm/uclass.h> @@ -13,6 +14,39 @@ #include <fdt_support.h> #include <spl.h> +struct efi_fw_image fw_images[] = { + { + .image_type_id = AM62PX_SK_TIBOOT3_IMAGE_GUID, + .fw_name = u"AM62PX_SK_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = AM62PX_SK_SPL_IMAGE_GUID, + .fw_name = u"AM62PX_SK_SPL", + .image_index = 2, + }, + { + .image_type_id = AM62PX_SK_UBOOT_IMAGE_GUID, + .fw_name = u"AM62PX_SK_UBOOT", + .image_index = 3, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=tiboot3.bin raw 0 80000;" + "tispl.bin raw 80000 200000;u-boot.img raw 280000 400000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/board/ti/am62x/MAINTAINERS b/board/ti/am62x/MAINTAINERS index 105e741995e..562a5c67669 100644 --- a/board/ti/am62x/MAINTAINERS +++ b/board/ti/am62x/MAINTAINERS @@ -1,8 +1,10 @@ AM62x BOARD -M: Dave Gerlach <d-gerlach@ti.com> +M: Bryan Brattlof <bb@ti.com> M: Tom Rini <trini@konsulko.com> S: Maintained F: board/ti/am62x/ F: include/configs/am62x_evm.h F: configs/am62x_evm_r5_defconfig F: configs/am62x_evm_a53_defconfig +F: configs/am62x_lpsk_r5_defconfig +F: configs/am62x_lpsk_a53_defconfig diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env index 9cb186c2a03..09b9b16a3e5 100644 --- a/board/ti/am62x/am62x.env +++ b/board/ti/am62x/am62x.env @@ -1,5 +1,6 @@ #include <env/ti/ti_common.env> #include <env/ti/mmc.env> +#include <env/ti/k3_dfu.env> name_kern=Image console=ttyS2,115200n8 diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index b3e8680dfab..9bdd0223cdb 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -7,6 +7,7 @@ * */ +#include <efi_loader.h> #include <env.h> #include <spl.h> #include <init.h> @@ -46,6 +47,39 @@ int splash_screen_prepare(void) } #endif +struct efi_fw_image fw_images[] = { + { + .image_type_id = AM62X_SK_TIBOOT3_IMAGE_GUID, + .fw_name = u"AM62X_SK_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = AM62X_SK_SPL_IMAGE_GUID, + .fw_name = u"AM62X_SK_SPL", + .image_index = 2, + }, + { + .image_type_id = AM62X_SK_UBOOT_IMAGE_GUID, + .fw_name = u"AM62X_SK_UBOOT", + .image_index = 3, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=tiboot3.bin raw 0 80000;" + "tispl.bin raw 80000 200000;u-boot.img raw 280000 400000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/board/ti/am64x/am64x.env b/board/ti/am64x/am64x.env index 9a8812d4ee5..8ad805a613c 100644 --- a/board/ti/am64x/am64x.env +++ b/board/ti/am64x/am64x.env @@ -39,3 +39,8 @@ usbboot=setenv boot usb; run get_kern_usb; run get_fdt_usb; run run_kern; + +#if CONFIG_TI_ICSSG_PRUETH +storage_interface=mmc +fw_dev_part=1:2 +#endif diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c index b8de69da06c..609e5cf6d51 100644 --- a/board/ti/am64x/evm.c +++ b/board/ti/am64x/evm.c @@ -7,6 +7,7 @@ * */ +#include <efi_loader.h> #include <asm/io.h> #include <dm/uclass.h> #include <k3-ddrss.h> @@ -27,6 +28,39 @@ DECLARE_GLOBAL_DATA_PTR; +struct efi_fw_image fw_images[] = { + { + .image_type_id = AM64X_SK_TIBOOT3_IMAGE_GUID, + .fw_name = u"AM64X_SK_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = AM64X_SK_SPL_IMAGE_GUID, + .fw_name = u"AM64X_SK_SPL", + .image_index = 2, + }, + { + .image_type_id = AM64X_SK_UBOOT_IMAGE_GUID, + .fw_name = u"AM64X_SK_UBOOT", + .image_index = 3, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=tiboot3.bin raw 0 100000;" + "tispl.bin raw 100000 200000;u-boot.img raw 300000 400000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index 38e23ccbb67..ea21d48bbc0 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -7,10 +7,9 @@ * Steve Kipisz */ -#include <common.h> -#include <eeprom.h> #include <log.h> #include <net.h> +#include <linux/types.h> #include <asm/arch/hardware.h> #include <asm/omap_common.h> #include <dm/uclass.h> diff --git a/board/ti/common/cape_detect.c b/board/ti/common/cape_detect.c index 2e6105cfbf1..da805befabc 100644 --- a/board/ti/common/cape_detect.c +++ b/board/ti/common/cape_detect.c @@ -4,10 +4,11 @@ * Köry Maincent, Bootlin, <kory.maincent@bootlin.com> */ -#include <common.h> +#include <stdio.h> #include <malloc.h> #include <i2c.h> #include <extension_board.h> +#include <vsprintf.h> #include "cape_detect.h" diff --git a/board/ti/common/fdt_ops.c b/board/ti/common/fdt_ops.c index eb917be9e0d..8a3300993ed 100644 --- a/board/ti/common/fdt_ops.c +++ b/board/ti/common/fdt_ops.c @@ -6,7 +6,7 @@ */ #include <env.h> -#include <vsprintf.h> +#include <stdio.h> #include "fdt_ops.h" void ti_set_fdt_env(const char *board_name, struct ti_fdt_map *fdt_map) diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index a8a216d034a..2b1db2541b0 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -9,7 +9,7 @@ * Aneesh V <aneesh@ti.com> * Steve Sakoman <steve@sakoman.com> */ -#include <common.h> +#include <config.h> #include <env.h> #include <fdt_support.h> #include <fastboot.h> diff --git a/board/ti/j721e/MAINTAINERS b/board/ti/j721e/MAINTAINERS index f5ca7d06a34..06aba53d9b0 100644 --- a/board/ti/j721e/MAINTAINERS +++ b/board/ti/j721e/MAINTAINERS @@ -5,5 +5,7 @@ F: board/ti/j721e F: include/configs/j721e_evm.h F: configs/j721e_evm_r5_defconfig F: configs/j721e_evm_a72_defconfig +F: configs/j721e_sk_r5_defconfig +F: configs/j721e_sk_a72_defconfig F: configs/j7200_evm_r5_defconfig F: configs/j7200_evm_a72_defconfig diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index 539eaf47186..f3452ff0a8f 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -7,6 +7,7 @@ * */ +#include <efi_loader.h> #include <generic-phy.h> #include <image.h> #include <net.h> @@ -32,6 +33,45 @@ DECLARE_GLOBAL_DATA_PTR; +struct efi_fw_image fw_images[] = { + { + .image_type_id = J721E_SK_TIBOOT3_IMAGE_GUID, + .fw_name = u"J721E_SK_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = J721E_SK_SPL_IMAGE_GUID, + .fw_name = u"J721E_SK_SPL", + .image_index = 2, + }, + { + .image_type_id = J721E_SK_UBOOT_IMAGE_GUID, + .fw_name = u"J721E_SK_UBOOT", + .image_index = 3, + }, + { + .image_type_id = J721E_SK_SYSFW_IMAGE_GUID, + .fw_name = u"J721E_SK_SYSFW", + .image_index = 4, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=tiboot3.bin raw 0 80000;" + "tispl.bin raw 80000 200000;u-boot.img raw 280000 400000;" + "sysfw.itb raw 6C0000 100000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/board/ti/j721s2/MAINTAINERS b/board/ti/j721s2/MAINTAINERS index 08c8d110ac0..e31f2acea7b 100644 --- a/board/ti/j721s2/MAINTAINERS +++ b/board/ti/j721s2/MAINTAINERS @@ -7,17 +7,12 @@ F: doc/board/ti/j721s2_evm.rst F: include/configs/j721s2_evm.h F: configs/j721s2_evm_r5_defconfig F: configs/j721s2_evm_a72_defconfig -F: arch/arm/dts/k3-j721s2.dtsi -F: arch/arm/dts/k3-j721s2-main.dtsi -F: arch/arm/dts/k3-j721s2-mcu-wakeup.dtsi -F: arch/arm/dts/k3-j721s2-thermal.dtsi -F: arch/arm/dts/k3-j721s2-som-p0.dtsi -F: arch/arm/dts/k3-j721s2-common-proc-board.dts +F: configs/am68_sk_r5_defconfig +F: configs/am68_sk_a72_defconfig F: arch/arm/dts/k3-j721s2-common-proc-board-u-boot.dtsi +F: arch/arm/dts/k3-j721s2-r5.dtsi F: arch/arm/dts/k3-j721s2-r5-common-proc-board.dts F: arch/arm/dts/k3-j721s2-ddr.dtsi F: arch/arm/dts/k3-j721s2-ddr-evm-lp4-4266.dtsi -F: arch/arm/dts/k3-am68-sk-som.dtsi -F: arch/arm/dts/k3-am68-sk-base-board.dts F: arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi F: arch/arm/dts/k3-am68-sk-r5-base-board.dts diff --git a/board/ti/j721s2/j721s2.env b/board/ti/j721s2/j721s2.env index 9a03b9f30ae..a6b22550809 100644 --- a/board/ti/j721s2/j721s2.env +++ b/board/ti/j721s2/j721s2.env @@ -13,6 +13,7 @@ args_all=setenv optargs earlycon=ns16550a,mmio32,0x02880000 ${mtdparts} run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} +boot_targets=mmc1 mmc0 usb pxe dhcp boot=mmc mmcdev=1 bootpart=1:2 diff --git a/board/ti/j722s/Kconfig b/board/ti/j722s/Kconfig new file mode 100644 index 00000000000..68c214e473b --- /dev/null +++ b/board/ti/j722s/Kconfig @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ +# + +if TARGET_J722S_R5_EVM || TARGET_J722S_A53_EVM + +config SYS_BOARD + default "j722s" + +config SYS_VENDOR + default "ti" + +config SYS_CONFIG_NAME + default "j722s_evm" + +source "board/ti/common/Kconfig" + +endif + +if TARGET_J722S_R5_EVM + +config SPL_LDSCRIPT + default "arch/arm/mach-omap2/u-boot-spl.lds" + +endif diff --git a/board/ti/j722s/MAINTAINERS b/board/ti/j722s/MAINTAINERS new file mode 100644 index 00000000000..7908c30def2 --- /dev/null +++ b/board/ti/j722s/MAINTAINERS @@ -0,0 +1,9 @@ +J722S BOARD +M: Vaishnav Achath <vaishnav.a@ti.com> +M: Jayesh Choudhary <j-choudhary@ti.com> +M: Tom Rini <trini@konsulko.com> +S: Maintained +F: board/ti/j722s/ +F: include/configs/j722s_evm.h +F: configs/j722s_evm_r5_defconfig +F: configs/j722s_evm_a53_defconfig diff --git a/board/ti/j722s/Makefile b/board/ti/j722s/Makefile new file mode 100644 index 00000000000..20d2ec934b1 --- /dev/null +++ b/board/ti/j722s/Makefile @@ -0,0 +1,7 @@ +# +# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evm.o diff --git a/board/ti/j722s/board-cfg.yaml b/board/ti/j722s/board-cfg.yaml new file mode 100644 index 00000000000..f9a4c438ca9 --- /dev/null +++ b/board/ti/j722s/board-cfg.yaml @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ +# +# Board configuration for J722S +# + +--- + +board-cfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1 + control: + subhdr: + magic: 0xC1D3 + size: 7 + main_isolation_enable: 0x5A + main_isolation_hostid: 0x2 + secproxy: + subhdr: + magic: 0x1207 + size: 7 + scaling_factor: 0x1 + scaling_profile: 0x1 + disable_main_nav_secure_proxy: 0 + msmc: + subhdr: + magic: 0xA5C3 + size: 5 + msmc_cache_size: 0x0 + debug_cfg: + subhdr: + magic: 0x020C + size: 8 + trace_dst_enables: 0x00 + trace_src_enables: 0x00 diff --git a/board/ti/j722s/evm.c b/board/ti/j722s/evm.c new file mode 100644 index 00000000000..515aaa81878 --- /dev/null +++ b/board/ti/j722s/evm.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Board specific initialization for J722S platforms + * + * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ + * + */ + +#include <asm/arch/hardware.h> +#include <asm/io.h> +#include <dm/uclass.h> +#include <env.h> +#include <fdt_support.h> +#include <spl.h> + +int board_init(void) +{ + return 0; +} + +int dram_init(void) +{ + return fdtdec_setup_mem_size_base(); +} + +int dram_init_banksize(void) +{ + return fdtdec_setup_memory_banksize(); +} diff --git a/board/ti/j722s/j722s.env b/board/ti/j722s/j722s.env new file mode 100644 index 00000000000..f8b6aff2c2f --- /dev/null +++ b/board/ti/j722s/j722s.env @@ -0,0 +1,15 @@ +#include <env/ti/ti_common.env> +#include <env/ti/mmc.env> + +name_kern=Image +console=ttyS2,115200n8 +args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000 + ${mtdparts} +run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} + +boot_targets=mmc1 mmc0 pxe dhcp +boot=mmc +mmcdev=1 +bootpart=1:2 +bootdir=/boot +rd_spec=- diff --git a/board/ti/j722s/pm-cfg.yaml b/board/ti/j722s/pm-cfg.yaml new file mode 100644 index 00000000000..46b3ad20109 --- /dev/null +++ b/board/ti/j722s/pm-cfg.yaml @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ +# +# Power management configuration for J722S +# + +--- + +pm-cfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1 diff --git a/board/ti/j722s/rm-cfg.yaml b/board/ti/j722s/rm-cfg.yaml new file mode 100644 index 00000000000..21ca30104c7 --- /dev/null +++ b/board/ti/j722s/rm-cfg.yaml @@ -0,0 +1,1119 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ +# +# Resource management configuration for J722S +# + +--- + +rm-cfg: + rm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1 + host_cfg: + subhdr: + magic: 0x4C41 + size: 356 + host_cfg_entries: + - + host_id: 12 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - + host_id: 20 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - + host_id: 22 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - + host_id: 30 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - + host_id: 36 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - + host_id: 38 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + resasg: + subhdr: + magic: 0x7B25 + size: 8 + resasg_entries_size: 1160 + reserved: 0 + resasg_entries: + - + start_resource: 0 + num_resource: 16 + type: 192 + host_id: 12 + reserved: 0 + - + start_resource: 16 + num_resource: 6 + type: 192 + host_id: 38 + reserved: 0 + - + start_resource: 34 + num_resource: 2 + type: 192 + host_id: 30 + reserved: 0 + - + start_resource: 0 + num_resource: 4 + type: 320 + host_id: 12 + reserved: 0 + - + start_resource: 4 + num_resource: 4 + type: 320 + host_id: 30 + reserved: 0 + - + start_resource: 12 + num_resource: 4 + type: 320 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 26 + type: 384 + host_id: 128 + reserved: 0 + - + start_resource: 50176 + num_resource: 164 + type: 1666 + host_id: 128 + reserved: 0 + - + start_resource: 0 + num_resource: 1 + type: 1667 + host_id: 128 + reserved: 0 + - + start_resource: 0 + num_resource: 16 + type: 1677 + host_id: 12 + reserved: 0 + - + start_resource: 16 + num_resource: 6 + type: 1677 + host_id: 20 + reserved: 0 + - + start_resource: 16 + num_resource: 6 + type: 1677 + host_id: 36 + reserved: 0 + - + start_resource: 22 + num_resource: 2 + type: 1677 + host_id: 30 + reserved: 0 + - + start_resource: 24 + num_resource: 4 + type: 1677 + host_id: 22 + reserved: 0 + - + start_resource: 28 + num_resource: 4 + type: 1677 + host_id: 38 + reserved: 0 + - + start_resource: 57 + num_resource: 16 + type: 1678 + host_id: 12 + reserved: 0 + - + start_resource: 73 + num_resource: 5 + type: 1678 + host_id: 20 + reserved: 0 + - + start_resource: 73 + num_resource: 5 + type: 1678 + host_id: 36 + reserved: 0 + - + start_resource: 78 + num_resource: 2 + type: 1678 + host_id: 30 + reserved: 0 + - + start_resource: 80 + num_resource: 2 + type: 1678 + host_id: 38 + reserved: 0 + - + start_resource: 32 + num_resource: 12 + type: 1679 + host_id: 12 + reserved: 0 + - + start_resource: 44 + num_resource: 6 + type: 1679 + host_id: 20 + reserved: 0 + - + start_resource: 44 + num_resource: 6 + type: 1679 + host_id: 36 + reserved: 0 + - + start_resource: 50 + num_resource: 2 + type: 1679 + host_id: 30 + reserved: 0 + - + start_resource: 52 + num_resource: 2 + type: 1679 + host_id: 38 + reserved: 0 + - + start_resource: 54 + num_resource: 3 + type: 1679 + host_id: 128 + reserved: 0 + - + start_resource: 0 + num_resource: 16 + type: 1696 + host_id: 12 + reserved: 0 + - + start_resource: 16 + num_resource: 6 + type: 1696 + host_id: 20 + reserved: 0 + - + start_resource: 16 + num_resource: 6 + type: 1696 + host_id: 36 + reserved: 0 + - + start_resource: 22 + num_resource: 2 + type: 1696 + host_id: 30 + reserved: 0 + - + start_resource: 24 + num_resource: 4 + type: 1696 + host_id: 22 + reserved: 0 + - + start_resource: 28 + num_resource: 4 + type: 1696 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 16 + type: 1697 + host_id: 12 + reserved: 0 + - + start_resource: 16 + num_resource: 5 + type: 1697 + host_id: 20 + reserved: 0 + - + start_resource: 16 + num_resource: 5 + type: 1697 + host_id: 36 + reserved: 0 + - + start_resource: 21 + num_resource: 2 + type: 1697 + host_id: 30 + reserved: 0 + - + start_resource: 23 + num_resource: 2 + type: 1697 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 12 + type: 1698 + host_id: 12 + reserved: 0 + - + start_resource: 12 + num_resource: 6 + type: 1698 + host_id: 20 + reserved: 0 + - + start_resource: 12 + num_resource: 6 + type: 1698 + host_id: 36 + reserved: 0 + - + start_resource: 18 + num_resource: 2 + type: 1698 + host_id: 30 + reserved: 0 + - + start_resource: 20 + num_resource: 2 + type: 1698 + host_id: 38 + reserved: 0 + - + start_resource: 22 + num_resource: 3 + type: 1698 + host_id: 128 + reserved: 0 + - + start_resource: 7 + num_resource: 21 + type: 1802 + host_id: 12 + reserved: 0 + - + start_resource: 44 + num_resource: 36 + type: 1802 + host_id: 35 + reserved: 0 + - + start_resource: 44 + num_resource: 36 + type: 1802 + host_id: 36 + reserved: 0 + - + start_resource: 84 + num_resource: 16 + type: 1802 + host_id: 20 + reserved: 0 + - + start_resource: 100 + num_resource: 16 + type: 1802 + host_id: 22 + reserved: 0 + - + start_resource: 154 + num_resource: 14 + type: 1802 + host_id: 38 + reserved: 0 + - + start_resource: 168 + num_resource: 16 + type: 1802 + host_id: 30 + reserved: 0 + - + start_resource: 17 + num_resource: 512 + type: 1805 + host_id: 12 + reserved: 0 + - + start_resource: 529 + num_resource: 256 + type: 1805 + host_id: 35 + reserved: 0 + - + start_resource: 529 + num_resource: 256 + type: 1805 + host_id: 36 + reserved: 0 + - + start_resource: 785 + num_resource: 128 + type: 1805 + host_id: 30 + reserved: 0 + - + start_resource: 913 + num_resource: 128 + type: 1805 + host_id: 20 + reserved: 0 + - + start_resource: 1041 + num_resource: 128 + type: 1805 + host_id: 22 + reserved: 0 + - + start_resource: 1169 + num_resource: 128 + type: 1805 + host_id: 38 + reserved: 0 + - + start_resource: 1297 + num_resource: 239 + type: 1805 + host_id: 128 + reserved: 0 + - + start_resource: 4096 + num_resource: 29 + type: 1807 + host_id: 128 + reserved: 0 + - + start_resource: 4608 + num_resource: 99 + type: 1808 + host_id: 128 + reserved: 0 + - + start_resource: 5120 + num_resource: 24 + type: 1809 + host_id: 128 + reserved: 0 + - + start_resource: 5632 + num_resource: 51 + type: 1810 + host_id: 128 + reserved: 0 + - + start_resource: 6144 + num_resource: 51 + type: 1811 + host_id: 128 + reserved: 0 + - + start_resource: 8192 + num_resource: 32 + type: 1812 + host_id: 128 + reserved: 0 + - + start_resource: 8704 + num_resource: 32 + type: 1813 + host_id: 128 + reserved: 0 + - + start_resource: 9216 + num_resource: 32 + type: 1814 + host_id: 128 + reserved: 0 + - + start_resource: 9728 + num_resource: 25 + type: 1815 + host_id: 128 + reserved: 0 + - + start_resource: 10240 + num_resource: 25 + type: 1816 + host_id: 128 + reserved: 0 + - + start_resource: 10752 + num_resource: 25 + type: 1817 + host_id: 128 + reserved: 0 + - + start_resource: 11264 + num_resource: 25 + type: 1818 + host_id: 128 + reserved: 0 + - + start_resource: 11776 + num_resource: 25 + type: 1819 + host_id: 128 + reserved: 0 + - + start_resource: 12288 + num_resource: 25 + type: 1820 + host_id: 128 + reserved: 0 + - + start_resource: 0 + num_resource: 1 + type: 1923 + host_id: 128 + reserved: 0 + - + start_resource: 0 + num_resource: 10 + type: 1936 + host_id: 12 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1936 + host_id: 35 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1936 + host_id: 36 + reserved: 0 + - + start_resource: 13 + num_resource: 3 + type: 1936 + host_id: 30 + reserved: 0 + - + start_resource: 16 + num_resource: 3 + type: 1936 + host_id: 38 + reserved: 0 + - + start_resource: 19 + num_resource: 64 + type: 1937 + host_id: 12 + reserved: 0 + - + start_resource: 19 + num_resource: 64 + type: 1937 + host_id: 36 + reserved: 0 + - + start_resource: 83 + num_resource: 8 + type: 1938 + host_id: 12 + reserved: 0 + - + start_resource: 91 + num_resource: 8 + type: 1939 + host_id: 12 + reserved: 0 + - + start_resource: 99 + num_resource: 10 + type: 1942 + host_id: 12 + reserved: 0 + - + start_resource: 109 + num_resource: 3 + type: 1942 + host_id: 35 + reserved: 0 + - + start_resource: 109 + num_resource: 3 + type: 1942 + host_id: 36 + reserved: 0 + - + start_resource: 112 + num_resource: 3 + type: 1942 + host_id: 30 + reserved: 0 + - + start_resource: 115 + num_resource: 3 + type: 1942 + host_id: 38 + reserved: 0 + - + start_resource: 118 + num_resource: 16 + type: 1943 + host_id: 12 + reserved: 0 + - + start_resource: 118 + num_resource: 16 + type: 1943 + host_id: 36 + reserved: 0 + - + start_resource: 134 + num_resource: 8 + type: 1944 + host_id: 12 + reserved: 0 + - + start_resource: 134 + num_resource: 8 + type: 1945 + host_id: 12 + reserved: 0 + - + start_resource: 142 + num_resource: 8 + type: 1946 + host_id: 12 + reserved: 0 + - + start_resource: 142 + num_resource: 8 + type: 1947 + host_id: 12 + reserved: 0 + - + start_resource: 0 + num_resource: 10 + type: 1955 + host_id: 12 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1955 + host_id: 35 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1955 + host_id: 36 + reserved: 0 + - + start_resource: 13 + num_resource: 3 + type: 1955 + host_id: 30 + reserved: 0 + - + start_resource: 16 + num_resource: 3 + type: 1955 + host_id: 38 + reserved: 0 + - + start_resource: 19 + num_resource: 8 + type: 1956 + host_id: 12 + reserved: 0 + - + start_resource: 19 + num_resource: 8 + type: 1956 + host_id: 36 + reserved: 0 + - + start_resource: 27 + num_resource: 1 + type: 1957 + host_id: 12 + reserved: 0 + - + start_resource: 28 + num_resource: 1 + type: 1958 + host_id: 12 + reserved: 0 + - + start_resource: 0 + num_resource: 10 + type: 1961 + host_id: 12 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1961 + host_id: 35 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1961 + host_id: 36 + reserved: 0 + - + start_resource: 13 + num_resource: 3 + type: 1961 + host_id: 30 + reserved: 0 + - + start_resource: 16 + num_resource: 3 + type: 1961 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 10 + type: 1962 + host_id: 12 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1962 + host_id: 35 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1962 + host_id: 36 + reserved: 0 + - + start_resource: 13 + num_resource: 3 + type: 1962 + host_id: 30 + reserved: 0 + - + start_resource: 16 + num_resource: 3 + type: 1962 + host_id: 38 + reserved: 0 + - + start_resource: 19 + num_resource: 1 + type: 1963 + host_id: 12 + reserved: 0 + - + start_resource: 19 + num_resource: 1 + type: 1963 + host_id: 36 + reserved: 0 + - + start_resource: 19 + num_resource: 16 + type: 1964 + host_id: 12 + reserved: 0 + - + start_resource: 19 + num_resource: 16 + type: 1964 + host_id: 36 + reserved: 0 + - + start_resource: 20 + num_resource: 1 + type: 1965 + host_id: 12 + reserved: 0 + - + start_resource: 35 + num_resource: 8 + type: 1966 + host_id: 12 + reserved: 0 + - + start_resource: 21 + num_resource: 1 + type: 1967 + host_id: 12 + reserved: 0 + - + start_resource: 35 + num_resource: 8 + type: 1968 + host_id: 12 + reserved: 0 + - + start_resource: 22 + num_resource: 1 + type: 1969 + host_id: 12 + reserved: 0 + - + start_resource: 43 + num_resource: 8 + type: 1970 + host_id: 12 + reserved: 0 + - + start_resource: 23 + num_resource: 1 + type: 1971 + host_id: 12 + reserved: 0 + - + start_resource: 43 + num_resource: 8 + type: 1972 + host_id: 12 + reserved: 0 + - + start_resource: 0 + num_resource: 1 + type: 2112 + host_id: 128 + reserved: 0 + - + start_resource: 2 + num_resource: 2 + type: 2122 + host_id: 12 + reserved: 0 + - + start_resource: 51200 + num_resource: 80 + type: 12738 + host_id: 128 + reserved: 0 + - + start_resource: 0 + num_resource: 1 + type: 12739 + host_id: 128 + reserved: 0 + - + start_resource: 8 + num_resource: 12 + type: 12750 + host_id: 12 + reserved: 0 + - + start_resource: 20 + num_resource: 20 + type: 12750 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 8 + type: 12751 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 12 + type: 12769 + host_id: 12 + reserved: 0 + - + start_resource: 12 + num_resource: 20 + type: 12769 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 8 + type: 12770 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 8 + type: 12810 + host_id: 12 + reserved: 0 + - + start_resource: 22 + num_resource: 18 + type: 12810 + host_id: 38 + reserved: 0 + - + start_resource: 12288 + num_resource: 64 + type: 12813 + host_id: 12 + reserved: 0 + - + start_resource: 12352 + num_resource: 64 + type: 12813 + host_id: 38 + reserved: 0 + - + start_resource: 12416 + num_resource: 88 + type: 12813 + host_id: 128 + reserved: 0 + - + start_resource: 1536 + num_resource: 8 + type: 12823 + host_id: 128 + reserved: 0 + - + start_resource: 2048 + num_resource: 8 + type: 12824 + host_id: 128 + reserved: 0 + - + start_resource: 2560 + num_resource: 8 + type: 12825 + host_id: 128 + reserved: 0 + - + start_resource: 3072 + num_resource: 32 + type: 12826 + host_id: 128 + reserved: 0 + - + start_resource: 3584 + num_resource: 32 + type: 12827 + host_id: 128 + reserved: 0 + - + start_resource: 4096 + num_resource: 32 + type: 12828 + host_id: 128 + reserved: 0 diff --git a/board/ti/j722s/sec-cfg.yaml b/board/ti/j722s/sec-cfg.yaml new file mode 100644 index 00000000000..a41374b30c9 --- /dev/null +++ b/board/ti/j722s/sec-cfg.yaml @@ -0,0 +1,379 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ +# +# Security management configuration for J722S +# + +--- + +sec-cfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1 + processor_acl_list: + subhdr: + magic: 0xF1EA + size: 164 + proc_acl_entries: + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + - + processor_id: 0 + proc_access_master: 0 + proc_access_secondary: [0, 0, 0] + host_hierarchy: + subhdr: + magic: 0x8D27 + size: 68 + host_hierarchy_entries: + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + - + host_id: 0 + supervisor_host_id: 0 + otp_config: + subhdr: + magic: 0x4081 + size: 69 + write_host_id: 0 + otp_entry: + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + - + host_id: 0 + host_perms: 0 + dkek_config: + subhdr: + magic: 0x5170 + size: 12 + allowed_hosts: [128, 0, 0, 0] + allow_dkek_export_tisci: 0x5A + rsvd: [0, 0, 0] + sa2ul_cfg: + subhdr: + magic: 0x23BE + size: 0 + auth_resource_owner: 0 + enable_saul_psil_global_config_writes: 0x5A + rsvd: [0, 0] + sec_dbg_config: + subhdr: + magic: 0x42AF + size: 16 + allow_jtag_unlock: 0x5A + allow_wildcard_unlock: 0x5A + allowed_debug_level_rsvd: 0 + rsvd: 0 + min_cert_rev: 0x0 + jtag_unlock_hosts: [0, 0, 0, 0] + sec_handover_cfg: + subhdr: + magic: 0x608F + size: 10 + handover_msg_sender: 0 + handover_to_host_id: 0 + rsvd: [0, 0, 0, 0] diff --git a/board/ti/j722s/tifs-rm-cfg.yaml b/board/ti/j722s/tifs-rm-cfg.yaml new file mode 100644 index 00000000000..5e8d7e04441 --- /dev/null +++ b/board/ti/j722s/tifs-rm-cfg.yaml @@ -0,0 +1,981 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ +# +# Resource management configuration for J722S +# + +--- + +tifs-rm-cfg: + rm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1 + host_cfg: + subhdr: + magic: 0x4C41 + size: 356 + host_cfg_entries: + - #1 + host_id: 12 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - #2 + host_id: 20 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - #3 + host_id: 22 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - #4 + host_id: 30 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - #5 + host_id: 36 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - #6 + host_id: 38 + allowed_atype: 0x2A + allowed_qos: 0xAAAA + allowed_orderid: 0xAAAAAAAA + allowed_priority: 0xAAAA + allowed_sched_priority: 0xAA + - #7 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #8 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #9 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #10 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #11 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #12 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #13 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #14 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #15 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #16 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #17 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #18 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #19 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #20 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #21 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #22 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #23 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #24 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #25 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #26 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #27 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #28 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #29 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #30 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #31 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + - #32 + host_id: 0 + allowed_atype: 0 + allowed_qos: 0 + allowed_orderid: 0 + allowed_priority: 0 + allowed_sched_priority: 0 + resasg: + subhdr: + magic: 0x7B25 + size: 8 + resasg_entries_size: 976 + reserved: 0 + resasg_entries: + - + start_resource: 0 + num_resource: 16 + type: 1677 + host_id: 12 + reserved: 0 + - + start_resource: 16 + num_resource: 6 + type: 1677 + host_id: 20 + reserved: 0 + - + start_resource: 16 + num_resource: 6 + type: 1677 + host_id: 36 + reserved: 0 + - + start_resource: 22 + num_resource: 2 + type: 1677 + host_id: 30 + reserved: 0 + - + start_resource: 24 + num_resource: 4 + type: 1677 + host_id: 22 + reserved: 0 + - + start_resource: 28 + num_resource: 4 + type: 1677 + host_id: 38 + reserved: 0 + - + start_resource: 57 + num_resource: 16 + type: 1678 + host_id: 12 + reserved: 0 + - + start_resource: 73 + num_resource: 5 + type: 1678 + host_id: 20 + reserved: 0 + - + start_resource: 73 + num_resource: 5 + type: 1678 + host_id: 36 + reserved: 0 + - + start_resource: 78 + num_resource: 2 + type: 1678 + host_id: 30 + reserved: 0 + - + start_resource: 80 + num_resource: 2 + type: 1678 + host_id: 38 + reserved: 0 + - + start_resource: 32 + num_resource: 12 + type: 1679 + host_id: 12 + reserved: 0 + - + start_resource: 44 + num_resource: 6 + type: 1679 + host_id: 20 + reserved: 0 + - + start_resource: 44 + num_resource: 6 + type: 1679 + host_id: 36 + reserved: 0 + - + start_resource: 50 + num_resource: 2 + type: 1679 + host_id: 30 + reserved: 0 + - + start_resource: 52 + num_resource: 2 + type: 1679 + host_id: 38 + reserved: 0 + - + start_resource: 54 + num_resource: 3 + type: 1679 + host_id: 128 + reserved: 0 + - + start_resource: 0 + num_resource: 16 + type: 1696 + host_id: 12 + reserved: 0 + - + start_resource: 16 + num_resource: 6 + type: 1696 + host_id: 20 + reserved: 0 + - + start_resource: 16 + num_resource: 6 + type: 1696 + host_id: 36 + reserved: 0 + - + start_resource: 22 + num_resource: 2 + type: 1696 + host_id: 30 + reserved: 0 + - + start_resource: 24 + num_resource: 4 + type: 1696 + host_id: 22 + reserved: 0 + - + start_resource: 28 + num_resource: 4 + type: 1696 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 16 + type: 1697 + host_id: 12 + reserved: 0 + - + start_resource: 16 + num_resource: 5 + type: 1697 + host_id: 20 + reserved: 0 + - + start_resource: 16 + num_resource: 5 + type: 1697 + host_id: 36 + reserved: 0 + - + start_resource: 21 + num_resource: 2 + type: 1697 + host_id: 30 + reserved: 0 + - + start_resource: 23 + num_resource: 2 + type: 1697 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 12 + type: 1698 + host_id: 12 + reserved: 0 + - + start_resource: 12 + num_resource: 6 + type: 1698 + host_id: 20 + reserved: 0 + - + start_resource: 12 + num_resource: 6 + type: 1698 + host_id: 36 + reserved: 0 + - + start_resource: 18 + num_resource: 2 + type: 1698 + host_id: 30 + reserved: 0 + - + start_resource: 20 + num_resource: 2 + type: 1698 + host_id: 38 + reserved: 0 + - + start_resource: 22 + num_resource: 3 + type: 1698 + host_id: 128 + reserved: 0 + - + start_resource: 7 + num_resource: 21 + type: 1802 + host_id: 12 + reserved: 0 + - + start_resource: 44 + num_resource: 36 + type: 1802 + host_id: 35 + reserved: 0 + - + start_resource: 44 + num_resource: 36 + type: 1802 + host_id: 36 + reserved: 0 + - + start_resource: 84 + num_resource: 16 + type: 1802 + host_id: 20 + reserved: 0 + - + start_resource: 100 + num_resource: 16 + type: 1802 + host_id: 22 + reserved: 0 + - + start_resource: 154 + num_resource: 14 + type: 1802 + host_id: 38 + reserved: 0 + - + start_resource: 168 + num_resource: 16 + type: 1802 + host_id: 30 + reserved: 0 + - + start_resource: 4096 + num_resource: 29 + type: 1807 + host_id: 128 + reserved: 0 + - + start_resource: 4608 + num_resource: 99 + type: 1808 + host_id: 128 + reserved: 0 + - + start_resource: 5120 + num_resource: 24 + type: 1809 + host_id: 128 + reserved: 0 + - + start_resource: 5632 + num_resource: 51 + type: 1810 + host_id: 128 + reserved: 0 + - + start_resource: 6144 + num_resource: 51 + type: 1811 + host_id: 128 + reserved: 0 + - + start_resource: 8192 + num_resource: 32 + type: 1812 + host_id: 128 + reserved: 0 + - + start_resource: 8704 + num_resource: 32 + type: 1813 + host_id: 128 + reserved: 0 + - + start_resource: 9216 + num_resource: 32 + type: 1814 + host_id: 128 + reserved: 0 + - + start_resource: 9728 + num_resource: 25 + type: 1815 + host_id: 128 + reserved: 0 + - + start_resource: 10240 + num_resource: 25 + type: 1816 + host_id: 128 + reserved: 0 + - + start_resource: 10752 + num_resource: 25 + type: 1817 + host_id: 128 + reserved: 0 + - + start_resource: 11264 + num_resource: 25 + type: 1818 + host_id: 128 + reserved: 0 + - + start_resource: 11776 + num_resource: 25 + type: 1819 + host_id: 128 + reserved: 0 + - + start_resource: 12288 + num_resource: 25 + type: 1820 + host_id: 128 + reserved: 0 + - + start_resource: 0 + num_resource: 10 + type: 1936 + host_id: 12 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1936 + host_id: 35 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1936 + host_id: 36 + reserved: 0 + - + start_resource: 13 + num_resource: 3 + type: 1936 + host_id: 30 + reserved: 0 + - + start_resource: 16 + num_resource: 3 + type: 1936 + host_id: 38 + reserved: 0 + - + start_resource: 19 + num_resource: 64 + type: 1937 + host_id: 12 + reserved: 0 + - + start_resource: 19 + num_resource: 64 + type: 1937 + host_id: 36 + reserved: 0 + - + start_resource: 83 + num_resource: 8 + type: 1938 + host_id: 12 + reserved: 0 + - + start_resource: 91 + num_resource: 8 + type: 1939 + host_id: 12 + reserved: 0 + - + start_resource: 99 + num_resource: 10 + type: 1942 + host_id: 12 + reserved: 0 + - + start_resource: 109 + num_resource: 3 + type: 1942 + host_id: 35 + reserved: 0 + - + start_resource: 109 + num_resource: 3 + type: 1942 + host_id: 36 + reserved: 0 + - + start_resource: 112 + num_resource: 3 + type: 1942 + host_id: 30 + reserved: 0 + - + start_resource: 115 + num_resource: 3 + type: 1942 + host_id: 38 + reserved: 0 + - + start_resource: 118 + num_resource: 16 + type: 1943 + host_id: 12 + reserved: 0 + - + start_resource: 118 + num_resource: 16 + type: 1943 + host_id: 36 + reserved: 0 + - + start_resource: 134 + num_resource: 8 + type: 1944 + host_id: 12 + reserved: 0 + - + start_resource: 134 + num_resource: 8 + type: 1945 + host_id: 12 + reserved: 0 + - + start_resource: 142 + num_resource: 8 + type: 1946 + host_id: 12 + reserved: 0 + - + start_resource: 142 + num_resource: 8 + type: 1947 + host_id: 12 + reserved: 0 + - + start_resource: 0 + num_resource: 10 + type: 1955 + host_id: 12 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1955 + host_id: 35 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1955 + host_id: 36 + reserved: 0 + - + start_resource: 13 + num_resource: 3 + type: 1955 + host_id: 30 + reserved: 0 + - + start_resource: 16 + num_resource: 3 + type: 1955 + host_id: 38 + reserved: 0 + - + start_resource: 19 + num_resource: 8 + type: 1956 + host_id: 12 + reserved: 0 + - + start_resource: 19 + num_resource: 8 + type: 1956 + host_id: 36 + reserved: 0 + - + start_resource: 27 + num_resource: 1 + type: 1957 + host_id: 12 + reserved: 0 + - + start_resource: 28 + num_resource: 1 + type: 1958 + host_id: 12 + reserved: 0 + - + start_resource: 0 + num_resource: 10 + type: 1961 + host_id: 12 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1961 + host_id: 35 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1961 + host_id: 36 + reserved: 0 + - + start_resource: 13 + num_resource: 3 + type: 1961 + host_id: 30 + reserved: 0 + - + start_resource: 16 + num_resource: 3 + type: 1961 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 10 + type: 1962 + host_id: 12 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1962 + host_id: 35 + reserved: 0 + - + start_resource: 10 + num_resource: 3 + type: 1962 + host_id: 36 + reserved: 0 + - + start_resource: 13 + num_resource: 3 + type: 1962 + host_id: 30 + reserved: 0 + - + start_resource: 16 + num_resource: 3 + type: 1962 + host_id: 38 + reserved: 0 + - + start_resource: 19 + num_resource: 1 + type: 1963 + host_id: 12 + reserved: 0 + - + start_resource: 19 + num_resource: 1 + type: 1963 + host_id: 36 + reserved: 0 + - + start_resource: 19 + num_resource: 16 + type: 1964 + host_id: 12 + reserved: 0 + - + start_resource: 19 + num_resource: 16 + type: 1964 + host_id: 36 + reserved: 0 + - + start_resource: 20 + num_resource: 1 + type: 1965 + host_id: 12 + reserved: 0 + - + start_resource: 35 + num_resource: 8 + type: 1966 + host_id: 12 + reserved: 0 + - + start_resource: 21 + num_resource: 1 + type: 1967 + host_id: 12 + reserved: 0 + - + start_resource: 35 + num_resource: 8 + type: 1968 + host_id: 12 + reserved: 0 + - + start_resource: 22 + num_resource: 1 + type: 1969 + host_id: 12 + reserved: 0 + - + start_resource: 43 + num_resource: 8 + type: 1970 + host_id: 12 + reserved: 0 + - + start_resource: 23 + num_resource: 1 + type: 1971 + host_id: 12 + reserved: 0 + - + start_resource: 43 + num_resource: 8 + type: 1972 + host_id: 12 + reserved: 0 + - + start_resource: 0 + num_resource: 1 + type: 2112 + host_id: 128 + reserved: 0 + - + start_resource: 2 + num_resource: 2 + type: 2122 + host_id: 12 + reserved: 0 + - + start_resource: 8 + num_resource: 12 + type: 12750 + host_id: 12 + reserved: 0 + - + start_resource: 20 + num_resource: 20 + type: 12750 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 8 + type: 12751 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 12 + type: 12769 + host_id: 12 + reserved: 0 + - + start_resource: 12 + num_resource: 20 + type: 12769 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 8 + type: 12770 + host_id: 38 + reserved: 0 + - + start_resource: 0 + num_resource: 8 + type: 12810 + host_id: 12 + reserved: 0 + - + start_resource: 22 + num_resource: 18 + type: 12810 + host_id: 38 + reserved: 0 + - + start_resource: 1536 + num_resource: 8 + type: 12823 + host_id: 128 + reserved: 0 + - + start_resource: 2048 + num_resource: 8 + type: 12824 + host_id: 128 + reserved: 0 + - + start_resource: 2560 + num_resource: 8 + type: 12825 + host_id: 128 + reserved: 0 + - + start_resource: 3072 + num_resource: 32 + type: 12826 + host_id: 128 + reserved: 0 + - + start_resource: 3584 + num_resource: 32 + type: 12827 + host_id: 128 + reserved: 0 + - + start_resource: 4096 + num_resource: 32 + type: 12828 + host_id: 128 + reserved: 0 diff --git a/board/ti/j784s4/evm.c b/board/ti/j784s4/evm.c index aed0ea5b949..548dbd5925d 100644 --- a/board/ti/j784s4/evm.c +++ b/board/ti/j784s4/evm.c @@ -7,12 +7,46 @@ * */ +#include <efi_loader.h> #include <init.h> #include <spl.h> #include "../common/fdt_ops.h" DECLARE_GLOBAL_DATA_PTR; +struct efi_fw_image fw_images[] = { + { + .image_type_id = AM69_SK_TIBOOT3_IMAGE_GUID, + .fw_name = u"AM69_SK_TIBOOT3", + .image_index = 1, + }, + { + .image_type_id = AM69_SK_SPL_IMAGE_GUID, + .fw_name = u"AM69_SK_SPL", + .image_index = 2, + }, + { + .image_type_id = AM69_SK_UBOOT_IMAGE_GUID, + .fw_name = u"AM69_SK_UBOOT", + .image_index = 3, + } +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=tiboot3.bin raw 0 80000;" + "tispl.bin raw 80000 200000;u-boot.img raw 280000 400000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + int board_init(void) { return 0; diff --git a/board/ti/j784s4/j784s4.env b/board/ti/j784s4/j784s4.env index 7e54ca042ef..f5b72c7505e 100644 --- a/board/ti/j784s4/j784s4.env +++ b/board/ti/j784s4/j784s4.env @@ -3,6 +3,10 @@ #include <env/ti/ufs.env> #include <env/ti/k3_dfu.env> +#if CONFIG_CMD_REMOTEPROC +#include <env/ti/k3_rproc.env> +#endif + name_kern=Image console=ttyS2,115200n8 args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02880000 @@ -15,3 +19,5 @@ mmcdev=1 bootpart=1:2 bootdir=/boot rd_spec=- + +rproc_fw_binaries= 2 /lib/firmware/j784s4-main-r5f0_0-fw 3 /lib/firmware/j784s4-main-r5f0_1-fw 4 /lib/firmware/j784s4-main-r5f1_0-fw 5 /lib/firmware/j784s4-main-r5f1_1-fw 6 /lib/firmware/j784s4-main-r5f2_0-fw 7 /lib/firmware/j784s4-main-r5f2_1-fw 8 /lib/firmware/j784s4-c71_0-fw 9 /lib/firmware/j784s4-c71_1-fw 10 /lib/firmware/j784s4-c71_2-fw 11 /lib/firmware/j784s4-c71_3-fw diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index 5dcda12105b..c6735d37dda 100644 --- a/board/ti/ks2_evm/board.c +++ b/board/ti/ks2_evm/board.c @@ -6,7 +6,7 @@ * Texas Instruments Incorporated, <www.ti.com> */ -#include <common.h> +#include <config.h> #include <asm/global_data.h> #include "board.h" #include <env.h> diff --git a/board/ti/ks2_evm/board_k2e.c b/board/ti/ks2_evm/board_k2e.c index 39abb24e156..4385be4221b 100644 --- a/board/ti/ks2_evm/board_k2e.c +++ b/board/ti/ks2_evm/board_k2e.c @@ -6,7 +6,6 @@ * Texas Instruments Incorporated, <www.ti.com> */ -#include <common.h> #include <image.h> #include <init.h> #include <asm/arch/ddr3.h> diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 5229afad63b..d07b77d23e2 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -5,8 +5,7 @@ * (C) Copyright 2015 * Texas Instruments Incorporated, <www.ti.com> */ -#include <common.h> -#include <eeprom.h> +#include <config.h> #include <env.h> #include <hang.h> #include <image.h> diff --git a/board/ti/ks2_evm/board_k2hk.c b/board/ti/ks2_evm/board_k2hk.c index 12c4649c3c4..2b5d2d75664 100644 --- a/board/ti/ks2_evm/board_k2hk.c +++ b/board/ti/ks2_evm/board_k2hk.c @@ -6,7 +6,6 @@ * Texas Instruments Incorporated, <www.ti.com> */ -#include <common.h> #include <image.h> #include <init.h> #include <asm/arch/clock.h> diff --git a/board/ti/ks2_evm/board_k2l.c b/board/ti/ks2_evm/board_k2l.c index f759ee36466..1971bc94f7d 100644 --- a/board/ti/ks2_evm/board_k2l.c +++ b/board/ti/ks2_evm/board_k2l.c @@ -6,7 +6,6 @@ * Texas Instruments Incorporated, <www.ti.com> */ -#include <common.h> #include <image.h> #include <init.h> #include <asm/arch/ddr3.h> diff --git a/board/ti/ks2_evm/ddr3_cfg.c b/board/ti/ks2_evm/ddr3_cfg.c index 0ade75263f8..fe350fee795 100644 --- a/board/ti/ks2_evm/ddr3_cfg.c +++ b/board/ti/ks2_evm/ddr3_cfg.c @@ -6,7 +6,6 @@ * Texas Instruments Incorporated, <www.ti.com> */ -#include <common.h> #include <asm/arch/ddr3.h> #include "ddr3_cfg.h" diff --git a/board/ti/ks2_evm/ddr3_k2e.c b/board/ti/ks2_evm/ddr3_k2e.c index 95fe3a9021e..28305326e6a 100644 --- a/board/ti/ks2_evm/ddr3_k2e.c +++ b/board/ti/ks2_evm/ddr3_k2e.c @@ -6,7 +6,6 @@ * Texas Instruments Incorporated, <www.ti.com> */ -#include <common.h> #include "ddr3_cfg.h" #include <asm/arch/ddr3.h> diff --git a/board/ti/ks2_evm/ddr3_k2g.c b/board/ti/ks2_evm/ddr3_k2g.c index 3000d7245eb..ef39e078152 100644 --- a/board/ti/ks2_evm/ddr3_k2g.c +++ b/board/ti/ks2_evm/ddr3_k2g.c @@ -6,7 +6,6 @@ * Texas Instruments Incorporated, <www.ti.com> */ -#include <common.h> #include "ddr3_cfg.h" #include <asm/arch/ddr3.h> #include <asm/arch/hardware.h> diff --git a/board/ti/ks2_evm/ddr3_k2hk.c b/board/ti/ks2_evm/ddr3_k2hk.c index 198c5da0e62..05c050cee44 100644 --- a/board/ti/ks2_evm/ddr3_k2hk.c +++ b/board/ti/ks2_evm/ddr3_k2hk.c @@ -6,7 +6,6 @@ * Texas Instruments Incorporated, <www.ti.com> */ -#include <common.h> #include "ddr3_cfg.h" #include <asm/arch/ddr3.h> #include <asm/arch/hardware.h> diff --git a/board/ti/ks2_evm/ddr3_k2l.c b/board/ti/ks2_evm/ddr3_k2l.c index 805bf81f6bd..aa6d45f0f8a 100644 --- a/board/ti/ks2_evm/ddr3_k2l.c +++ b/board/ti/ks2_evm/ddr3_k2l.c @@ -6,7 +6,6 @@ * Texas Instruments Incorporated, <www.ti.com> */ -#include <common.h> #include "ddr3_cfg.h" #include <asm/arch/ddr3.h> diff --git a/board/ti/omap3evm/evm.c b/board/ti/omap3evm/evm.c index a4d6a0138d9..4eb08add256 100644 --- a/board/ti/omap3evm/evm.c +++ b/board/ti/omap3evm/evm.c @@ -10,7 +10,7 @@ * Richard Woodruff <r-woodruff2@ti.com> * Syed Mohammed Khasim <khasim@ti.com> */ -#include <common.h> +#include <config.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index 22093186019..e47d3a952d5 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -4,7 +4,6 @@ * Texas Instruments Incorporated, <www.ti.com> * Steve Sakoman <steve@sakoman.com> */ -#include <common.h> #include <init.h> #include <log.h> #include <net.h> diff --git a/board/ti/sdp4430/cmd_bat.c b/board/ti/sdp4430/cmd_bat.c index 6c1e6ca393c..6bf44d92655 100644 --- a/board/ti/sdp4430/cmd_bat.c +++ b/board/ti/sdp4430/cmd_bat.c @@ -3,7 +3,6 @@ * Copyright (C) 2010 Texas Instruments */ -#include <common.h> #include <command.h> #ifdef CONFIG_CMD_BAT diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c index 2c9ae794fd4..1a71390f543 100644 --- a/board/ti/sdp4430/sdp.c +++ b/board/ti/sdp4430/sdp.c @@ -5,7 +5,6 @@ * Aneesh V <aneesh@ti.com> * Steve Sakoman <steve@sakoman.com> */ -#include <common.h> #include <init.h> #include <net.h> #include <twl6030.h> diff --git a/board/timll/devkit3250/devkit3250.c b/board/timll/devkit3250/devkit3250.c index efef855b3d0..f0c0f03deeb 100644 --- a/board/timll/devkit3250/devkit3250.c +++ b/board/timll/devkit3250/devkit3250.c @@ -5,7 +5,7 @@ * Copyright (C) 2011-2015 Vladimir Zapolskiy <vz@mleia.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/arch/sys_proto.h> #include <asm/arch/clk.h> diff --git a/board/timll/devkit3250/devkit3250_spl.c b/board/timll/devkit3250/devkit3250_spl.c index 12e8ae9c39c..07a367c3ad1 100644 --- a/board/timll/devkit3250/devkit3250_spl.c +++ b/board/timll/devkit3250/devkit3250_spl.c @@ -5,7 +5,6 @@ * (C) Copyright 2015 Vladimir Zapolskiy <vz@mleia.com> */ -#include <common.h> #include <asm/io.h> #include <asm/arch/sys_proto.h> #include <asm/arch/cpu.h> diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c index 06009d8ad54..ad404f7e9c4 100644 --- a/board/timll/devkit8000/devkit8000.c +++ b/board/timll/devkit8000/devkit8000.c @@ -15,7 +15,7 @@ * Syed Mohammed Khasim <khasim@ti.com> * */ -#include <common.h> +#include <config.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c index 0f993e644d7..72d67d90d41 100644 --- a/board/toradex/apalis-imx8/apalis-imx8.c +++ b/board/toradex/apalis-imx8/apalis-imx8.c @@ -3,7 +3,6 @@ * Copyright 2019 Toradex */ -#include <common.h> #include <cpu_func.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c index ee87d9f4145..4557ed1f1f2 100644 --- a/board/toradex/apalis-tk1/apalis-tk1.c +++ b/board/toradex/apalis-tk1/apalis-tk1.c @@ -3,7 +3,6 @@ * Copyright (c) 2016-2018 Toradex, Inc. */ -#include <common.h> #include <dm.h> #include <env.h> #include <init.h> diff --git a/board/toradex/apalis-tk1/as3722_init.c b/board/toradex/apalis-tk1/as3722_init.c index e9bd1028bed..8971f7aa16a 100644 --- a/board/toradex/apalis-tk1/as3722_init.c +++ b/board/toradex/apalis-tk1/as3722_init.c @@ -3,7 +3,6 @@ * Copyright (c) 2012-2016 Toradex, Inc. */ -#include <common.h> #include <log.h> #include <asm/io.h> #include <asm/arch-tegra/tegra_i2c.h> diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 0da245374a0..2dcc042ab26 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -6,7 +6,7 @@ * copied from nitrogen6x */ -#include <common.h> +#include <config.h> #include <cpu_func.h> #include <dm.h> #include <image.h> diff --git a/board/toradex/apalis_imx6/do_fuse.c b/board/toradex/apalis_imx6/do_fuse.c index 6991b1bc136..b404b01e032 100644 --- a/board/toradex/apalis_imx6/do_fuse.c +++ b/board/toradex/apalis_imx6/do_fuse.c @@ -7,7 +7,6 @@ * Helpers for i.MX OTP fusing during module production */ -#include <common.h> #ifndef CONFIG_SPL_BUILD #include <command.h> #include <console.h> diff --git a/board/toradex/apalis_imx6/pf0100.c b/board/toradex/apalis_imx6/pf0100.c index c89052ff5da..157aaec6fe0 100644 --- a/board/toradex/apalis_imx6/pf0100.c +++ b/board/toradex/apalis_imx6/pf0100.c @@ -7,7 +7,6 @@ * Helpers for Freescale PMIC PF0100 */ -#include <common.h> #include <command.h> #include <i2c.h> #include <asm/arch/imx-regs.h> diff --git a/board/toradex/apalis_t30/apalis_t30-spl.c b/board/toradex/apalis_t30/apalis_t30-spl.c index 6e544641833..25049452495 100644 --- a/board/toradex/apalis_t30/apalis_t30-spl.c +++ b/board/toradex/apalis_t30/apalis_t30-spl.c @@ -7,7 +7,6 @@ * Svyatoslav Ryhel <clamor95@gmail.com> */ -#include <common.h> #include <asm/arch-tegra/tegra_i2c.h> #include <linux/delay.h> diff --git a/board/toradex/apalis_t30/apalis_t30.c b/board/toradex/apalis_t30/apalis_t30.c index b10beb44796..02e8f8eb1fe 100644 --- a/board/toradex/apalis_t30/apalis_t30.c +++ b/board/toradex/apalis_t30/apalis_t30.c @@ -4,7 +4,6 @@ * Marcel Ziswiler <marcel@ziswiler.com> */ -#include <common.h> #include <env.h> #include <init.h> #include <log.h> diff --git a/board/toradex/colibri-imx6ull/colibri-imx6ull.c b/board/toradex/colibri-imx6ull/colibri-imx6ull.c index 9b9fb342c9d..7bfe200d6e4 100644 --- a/board/toradex/colibri-imx6ull/colibri-imx6ull.c +++ b/board/toradex/colibri-imx6ull/colibri-imx6ull.c @@ -2,7 +2,7 @@ /* * Copyright (C) 2018-2019 Toradex AG */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <linux/delay.h> diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c index 35657852595..2a71e7b92de 100644 --- a/board/toradex/colibri-imx8x/colibri-imx8x.c +++ b/board/toradex/colibri-imx8x/colibri-imx8x.c @@ -3,7 +3,6 @@ * Copyright 2019 Toradex */ -#include <common.h> #include <cpu_func.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index ce19a9c7975..34e82c2b078 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -6,7 +6,7 @@ * copied from nitrogen6x */ -#include <common.h> +#include <config.h> #include <cpu_func.h> #include <dm.h> #include <env.h> diff --git a/board/toradex/colibri_imx6/do_fuse.c b/board/toradex/colibri_imx6/do_fuse.c index 6991b1bc136..b404b01e032 100644 --- a/board/toradex/colibri_imx6/do_fuse.c +++ b/board/toradex/colibri_imx6/do_fuse.c @@ -7,7 +7,6 @@ * Helpers for i.MX OTP fusing during module production */ -#include <common.h> #ifndef CONFIG_SPL_BUILD #include <command.h> #include <console.h> diff --git a/board/toradex/colibri_imx6/pf0100.c b/board/toradex/colibri_imx6/pf0100.c index 8f08d8c7337..58b7bc3bb9a 100644 --- a/board/toradex/colibri_imx6/pf0100.c +++ b/board/toradex/colibri_imx6/pf0100.c @@ -7,7 +7,6 @@ * Helpers for Freescale PMIC PF0100 */ -#include <common.h> #include <command.h> #include <i2c.h> #include <asm/arch/imx-regs.h> diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index c37c5e0af6d..e966ffbf781 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -3,7 +3,6 @@ * Copyright (C) 2016-2018 Toradex AG */ -#include <common.h> #include <cpu_func.h> #include <init.h> #include <net.h> diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c index 97e33d00f0d..6425fa881ea 100644 --- a/board/toradex/colibri_t20/colibri_t20.c +++ b/board/toradex/colibri_t20/colibri_t20.c @@ -3,7 +3,6 @@ * Copyright (C) 2012 Lucas Stach */ -#include <common.h> #include <env.h> #include <fdt_support.h> #include <init.h> diff --git a/board/toradex/colibri_t30/colibri_t30-spl.c b/board/toradex/colibri_t30/colibri_t30-spl.c index 6e544641833..25049452495 100644 --- a/board/toradex/colibri_t30/colibri_t30-spl.c +++ b/board/toradex/colibri_t30/colibri_t30-spl.c @@ -7,7 +7,6 @@ * Svyatoslav Ryhel <clamor95@gmail.com> */ -#include <common.h> #include <asm/arch-tegra/tegra_i2c.h> #include <linux/delay.h> diff --git a/board/toradex/colibri_t30/colibri_t30.c b/board/toradex/colibri_t30/colibri_t30.c index 0da247de98f..342673ac506 100644 --- a/board/toradex/colibri_t30/colibri_t30.c +++ b/board/toradex/colibri_t30/colibri_t30.c @@ -4,7 +4,6 @@ * Stefan Agner <stefan@agner.ch> */ -#include <common.h> #include <env.h> #include <init.h> #include <asm/arch/gp_padctrl.h> diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index 35920008805..87f82396d63 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -6,7 +6,6 @@ * Copyright 2013 Freescale Semiconductor, Inc. */ -#include <common.h> #include <init.h> #include <asm/global_data.h> diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c index dcf00d2b632..a6e3c6afae8 100644 --- a/board/toradex/common/tdx-cfg-block.c +++ b/board/toradex/common/tdx-cfg-block.c @@ -3,7 +3,7 @@ * Copyright (c) 2016-2020 Toradex */ -#include <common.h> +#include <config.h> #include <asm/global_data.h> #include "tdx-cfg-block.h" #include "tdx-eeprom.h" @@ -158,6 +158,9 @@ const struct toradex_som toradex_modules[] = { [85] = { "Apalis iMX6Q 2GB IT", TARGET_IS_ENABLED(APALIS_IMX6) }, [86] = { "Verdin iMX8M Mini DualLite 2GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, [87] = { "Verdin iMX8M Mini Quad 2GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, + [88] = { "Aquila AM69 Octa 32GB WB IT", TARGET_IS_ENABLED(AQUILA_AM69_A72) }, + [89] = { "Verdin iMX95 Hexa 16GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX95) }, + [90] = { "Verdin iMX8M Mini Quad 4GB WB ET", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, }; struct pid4list { diff --git a/board/toradex/common/tdx-cfg-block.h b/board/toradex/common/tdx-cfg-block.h index 183ee0f2dc9..0d6dd1c3a72 100644 --- a/board/toradex/common/tdx-cfg-block.h +++ b/board/toradex/common/tdx-cfg-block.h @@ -113,6 +113,9 @@ enum { APALIS_IMX6Q_IT_NOWINCE, /* 85 */ VERDIN_IMX8MMDL_2G_IT, VERDIN_IMX8MMQ_2G_IT_NO_CAN, + AQUILA_AM69O_32G_WIFI_BT_IT, + VERDIN_IMX95H_16G_WIFI_BT_IT, + VERDIN_IMX8MMQ_4G_WIFI_BT_ET, /* 90 */ }; enum { diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index 9f09788137d..a6b45cdab81 100644 --- a/board/toradex/common/tdx-common.c +++ b/board/toradex/common/tdx-common.c @@ -4,7 +4,7 @@ */ #include <dm.h> -#include <common.h> +#include <config.h> #include <env.h> #include <g_dnl.h> #include <init.h> diff --git a/board/toradex/verdin-imx8mm/lpddr4_timing.c b/board/toradex/verdin-imx8mm/lpddr4_timing.c index 4dfec679b11..eece226b513 100644 --- a/board/toradex/verdin-imx8mm/lpddr4_timing.c +++ b/board/toradex/verdin-imx8mm/lpddr4_timing.c @@ -18,7 +18,7 @@ struct dram_cfg_param ddr_ddrc_cfg[] = { {0x3d400000, 0xa1080020}, {0x3d400020, 0x202}, {0x3d400024, 0x3a980}, - {0x3d400064, 0x2d00d2}, + {0x3d400064, 0x2d011d}, {0x3d4000d0, 0xc00305ba}, {0x3d4000d4, 0x940000}, {0x3d4000dc, 0xd4002d}, @@ -34,7 +34,7 @@ struct dram_cfg_param ddr_ddrc_cfg[] = { {0x3d40011c, 0x402}, {0x3d400130, 0x20600}, {0x3d400134, 0xc100002}, - {0x3d400138, 0xd8}, + {0x3d400138, 0x123}, {0x3d400144, 0x96004b}, {0x3d400180, 0x2ee0017}, {0x3d400184, 0x2605b8e}, @@ -56,7 +56,7 @@ struct dram_cfg_param ddr_ddrc_cfg[] = { {0x3d400204, 0x80808}, {0x3d400214, 0x7070707}, {0x3d400218, 0x7070707}, - {0x3d40021c, 0xf0f}, + {0x3d40021c, 0xf07}, {0x3d400250, 0x29001701}, {0x3d400254, 0x2c}, {0x3d40025c, 0x4000030}, @@ -71,7 +71,7 @@ struct dram_cfg_param ddr_ddrc_cfg[] = { {0x3d402020, 0x0}, {0x3d402024, 0x7d00}, {0x3d402050, 0x20d040}, - {0x3d402064, 0x6001c}, + {0x3d402064, 0x60026}, {0x3d4020dc, 0x840000}, {0x3d4020e0, 0x310000}, {0x3d4020e8, 0x66004d}, @@ -86,7 +86,7 @@ struct dram_cfg_param ddr_ddrc_cfg[] = { {0x3d40211c, 0x302}, {0x3d402130, 0x20300}, {0x3d402134, 0xa100002}, - {0x3d402138, 0x1d}, + {0x3d402138, 0x27}, {0x3d402144, 0x14000a}, {0x3d402180, 0x640004}, {0x3d402190, 0x3818200}, @@ -96,7 +96,7 @@ struct dram_cfg_param ddr_ddrc_cfg[] = { {0x3d403020, 0x0}, {0x3d403024, 0x1f40}, {0x3d403050, 0x20d040}, - {0x3d403064, 0x30007}, + {0x3d403064, 0x3000A}, {0x3d4030dc, 0x840000}, {0x3d4030e0, 0x310000}, {0x3d4030e8, 0x66004d}, @@ -111,7 +111,7 @@ struct dram_cfg_param ddr_ddrc_cfg[] = { {0x3d40311c, 0x302}, {0x3d403130, 0x20300}, {0x3d403134, 0xa100002}, - {0x3d403138, 0x8}, + {0x3d403138, 0xA}, {0x3d403144, 0x50003}, {0x3d403180, 0x190004}, {0x3d403190, 0x3818200}, diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c index afa3686083a..1020078afea 100644 --- a/board/toradex/verdin-imx8mm/spl.c +++ b/board/toradex/verdin-imx8mm/spl.c @@ -3,7 +3,6 @@ * Copyright 2020 Toradex */ -#include <common.h> #include <command.h> #include <image.h> #include <init.h> diff --git a/board/toradex/verdin-imx8mm/verdin-imx8mm.c b/board/toradex/verdin-imx8mm/verdin-imx8mm.c index 55c02653da6..4230f417d19 100644 --- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c +++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c @@ -3,7 +3,7 @@ * Copyright 2020-2021 Toradex */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/arch/clock.h> #include <asm/arch/sys_proto.h> @@ -84,7 +84,8 @@ static void select_dt_from_module_version(void) */ is_wifi = (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT) || (tdx_hw_tag.prodid == VERDIN_IMX8MMDL_WIFI_BT_IT) || - (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN); + (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN) || + (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_4G_WIFI_BT_ET); } switch (get_pcb_revision()) { @@ -117,7 +118,7 @@ int board_phys_sdram_size(phys_size_t *size) if (!size) return -EINVAL; - *size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); + *size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE + PHYS_SDRAM_2_SIZE); return 0; } diff --git a/board/toradex/verdin-imx8mp/spl.c b/board/toradex/verdin-imx8mp/spl.c index 73729a42b45..8628112a782 100644 --- a/board/toradex/verdin-imx8mp/spl.c +++ b/board/toradex/verdin-imx8mp/spl.c @@ -3,7 +3,6 @@ * Copyright 2022 Toradex */ -#include <common.h> #include <hang.h> #include <init.h> #include <log.h> diff --git a/board/toradex/verdin-imx8mp/verdin-imx8mp.c b/board/toradex/verdin-imx8mp/verdin-imx8mp.c index e16a771e3ec..e57ec3b6896 100644 --- a/board/toradex/verdin-imx8mp/verdin-imx8mp.c +++ b/board/toradex/verdin-imx8mp/verdin-imx8mp.c @@ -3,7 +3,7 @@ * Copyright 2022 Toradex */ -#include <common.h> +#include <config.h> #include <asm/arch/clock.h> #include <asm/arch/imx8mp_pins.h> #include <asm/arch/sys_proto.h> diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c index f2de039b6b4..3ae0dc4ecd7 100644 --- a/board/tplink/wdr4300/wdr4300.c +++ b/board/tplink/wdr4300/wdr4300.c @@ -3,7 +3,6 @@ * Copyright (C) 2016 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <init.h> #include <asm/io.h> #include <asm/addrspace.h> diff --git a/board/tq/tqma6/tqma6.c b/board/tq/tqma6/tqma6.c index 1c2228c77ad..92142c10ae5 100644 --- a/board/tq/tqma6/tqma6.c +++ b/board/tq/tqma6/tqma6.c @@ -21,7 +21,6 @@ #include <asm/io.h> #include <asm/mach-imx/mxc_i2c.h> #include <asm/mach-imx/spi.h> -#include <common.h> #include <fsl_esdhc_imx.h> #include <linux/libfdt.h> #include <i2c.h> diff --git a/board/tq/tqma6/tqma6_mba6.c b/board/tq/tqma6/tqma6_mba6.c index 52851dd5b55..877539e359e 100644 --- a/board/tq/tqma6/tqma6_mba6.c +++ b/board/tq/tqma6/tqma6_mba6.c @@ -20,7 +20,6 @@ #include <asm/gpio.h> #include <asm/mach-imx/mxc_i2c.h> -#include <common.h> #include <fsl_esdhc_imx.h> #include <linux/libfdt.h> #include <malloc.h> diff --git a/board/tq/tqma6/tqma6_wru4.c b/board/tq/tqma6/tqma6_wru4.c index 5d239913fc5..21c710188e0 100644 --- a/board/tq/tqma6/tqma6_wru4.c +++ b/board/tq/tqma6/tqma6_wru4.c @@ -23,7 +23,6 @@ #include <asm/mach-imx/boot_mode.h> #include <asm/mach-imx/mxc_i2c.h> -#include <common.h> #include <fsl_esdhc_imx.h> #include <linux/libfdt.h> #include <malloc.h> diff --git a/board/traverse/common/ten64_controller.c b/board/traverse/common/ten64_controller.c index d6ef8a8d0df..63b72c4df7b 100644 --- a/board/traverse/common/ten64_controller.c +++ b/board/traverse/common/ten64_controller.c @@ -5,7 +5,6 @@ * */ -#include <common.h> #include <dm.h> #include <misc.h> #include <i2c.h> diff --git a/board/traverse/ten64/eth_ten64.c b/board/traverse/ten64/eth_ten64.c index 3f96e572b75..c5f7acecc14 100644 --- a/board/traverse/ten64/eth_ten64.c +++ b/board/traverse/ten64/eth_ten64.c @@ -3,7 +3,6 @@ * Copyright 2017 NXP * Copyright 2019-2021 Traverse Technologies Australia */ -#include <common.h> #include <command.h> #include <netdev.h> #include <malloc.h> diff --git a/board/traverse/ten64/ten64.c b/board/traverse/ten64/ten64.c index 6ff5312d6d7..d41bd2e9dee 100644 --- a/board/traverse/ten64/ten64.c +++ b/board/traverse/ten64/ten64.c @@ -4,7 +4,7 @@ * Copyright 2017-2018 NXP * Copyright 2019-2021 Traverse Technologies */ -#include <common.h> +#include <config.h> #include <display_options.h> #include <dm/uclass.h> #include <env.h> diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c index d99d93b44ae..b435b721e53 100644 --- a/board/udoo/neo/neo.c +++ b/board/udoo/neo/neo.c @@ -29,7 +29,6 @@ #include <spl.h> #include <linux/delay.h> #include <linux/sizes.h> -#include <common.h> #include <i2c.h> #include <power/pmic.h> #include <power/pfuze3000_pmic.h> diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c index 647380e1db6..6c477530055 100644 --- a/board/udoo/udoo_spl.c +++ b/board/udoo/udoo_spl.c @@ -6,7 +6,6 @@ * Based on board/wandboard/spl.c */ -#include <common.h> #include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> diff --git a/board/variscite/dart_6ul/spl.c b/board/variscite/dart_6ul/spl.c index 1dff69c8277..6d17563d32c 100644 --- a/board/variscite/dart_6ul/spl.c +++ b/board/variscite/dart_6ul/spl.c @@ -4,7 +4,7 @@ * Copyright (C) 2019 Parthiban Nallathambi <parthitce@gmail.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <spl.h> #include <asm/arch/clock.h> diff --git a/board/variscite/imx8mn_var_som/imx8mn_var_som.c b/board/variscite/imx8mn_var_som/imx8mn_var_som.c index 994fd4f7058..532d8d60a76 100644 --- a/board/variscite/imx8mn_var_som/imx8mn_var_som.c +++ b/board/variscite/imx8mn_var_som/imx8mn_var_som.c @@ -5,7 +5,6 @@ * Copyright 2023 DimOnOff Inc. */ -#include <common.h> #include <dm.h> #include <env.h> #include <fdtdec.h> diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c index bc7dc5888f2..2c91e9fac43 100644 --- a/board/vscom/baltos/board.c +++ b/board/vscom/baltos/board.c @@ -7,7 +7,7 @@ * Copyright (C) 2011, Texas Instruments, Incorporated - https://www.ti.com/ */ -#include <common.h> +#include <config.h> #include <env.h> #include <errno.h> #include <init.h> diff --git a/board/vscom/baltos/mux.c b/board/vscom/baltos/mux.c index 7b99cf0e182..77b142f08f0 100644 --- a/board/vscom/baltos/mux.c +++ b/board/vscom/baltos/mux.c @@ -13,7 +13,6 @@ * GNU General Public License for more details. */ -#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> #include <asm/arch/mux.h> diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c index 717e02a039b..9ce2785a4f0 100644 --- a/board/wandboard/spl.c +++ b/board/wandboard/spl.c @@ -5,7 +5,7 @@ * Richard Hu <hakahu@gmail.com> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index 8be62c86695..a48ef33ffde 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -6,7 +6,6 @@ * Author: Fabio Estevam <fabio.estevam@freescale.com> */ -#include <common.h> #include <image.h> #include <init.h> #include <log.h> diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index ead52d5a490..4cd3ff0051b 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -15,7 +15,6 @@ #include <asm/mach-imx/hab.h> #include <asm/mach-imx/iomux-v3.h> #include <asm/io.h> -#include <common.h> #include <env.h> #include <asm/arch/crm_regs.h> #include <netdev.h> diff --git a/board/work-microwave/work_92105/work_92105.c b/board/work-microwave/work_92105/work_92105.c index c8e791a4da8..9a236880e3c 100644 --- a/board/work-microwave/work_92105/work_92105.c +++ b/board/work-microwave/work_92105/work_92105.c @@ -6,7 +6,7 @@ * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr> */ -#include <common.h> +#include <config.h> #include <init.h> #include <asm/global_data.h> #include <asm/io.h> diff --git a/board/work-microwave/work_92105/work_92105_display.c b/board/work-microwave/work_92105/work_92105_display.c index 64dd5d4072a..d4ab2299895 100644 --- a/board/work-microwave/work_92105/work_92105_display.c +++ b/board/work-microwave/work_92105/work_92105_display.c @@ -10,7 +10,6 @@ * MAX518 I2C DACs and native LPC32xx GPO 15. */ -#include <common.h> #include <command.h> #include <log.h> #include <asm/arch/sys_proto.h> diff --git a/board/work-microwave/work_92105/work_92105_spl.c b/board/work-microwave/work_92105/work_92105_spl.c index d9401145f27..3f91221ce8b 100644 --- a/board/work-microwave/work_92105/work_92105_spl.c +++ b/board/work-microwave/work_92105/work_92105_spl.c @@ -6,7 +6,6 @@ * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr> */ -#include <common.h> #include <asm/io.h> #include <asm/arch/sys_proto.h> #include <asm/arch/cpu.h> diff --git a/board/xen/xenguest_arm64/xenguest_arm64.c b/board/xen/xenguest_arm64/xenguest_arm64.c index 1d2946f4fde..4c3b9c9e278 100644 --- a/board/xen/xenguest_arm64/xenguest_arm64.c +++ b/board/xen/xenguest_arm64/xenguest_arm64.c @@ -7,7 +7,6 @@ * (C) 2020 EPAM Systems Inc */ -#include <common.h> #include <log.h> #include <cpu_func.h> #include <dm.h> diff --git a/board/xilinx/Kconfig b/board/xilinx/Kconfig index 5c4ad8f1df9..c7df4ab5781 100644 --- a/board/xilinx/Kconfig +++ b/board/xilinx/Kconfig @@ -42,7 +42,7 @@ endif config XILINX_OF_BOARD_DTB_ADDR hex "Default DTB pickup address" - default 0x1000 if ARCH_VERSAL || ARCH_VERSAL_NET + default 0x1000 if ARCH_VERSAL || ARCH_VERSAL_NET || ARCH_VERSAL2 default 0x8000 if MICROBLAZE default 0x100000 if ARCH_ZYNQ || ARCH_ZYNQMP default 0x23000000 if TARGET_XILINX_MBV @@ -52,10 +52,10 @@ config XILINX_OF_BOARD_DTB_ADDR config BOOT_SCRIPT_OFFSET hex "Boot script offset" - depends on ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET || MICROBLAZE || TARGET_XILINX_MBV + depends on ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET || ARCH_VERSAL2 || MICROBLAZE || TARGET_XILINX_MBV default 0xFC0000 if ARCH_ZYNQ || MICROBLAZE default 0x3E80000 if ARCH_ZYNQMP - default 0x7F80000 if ARCH_VERSAL || ARCH_VERSAL_NET + default 0x7F80000 if ARCH_VERSAL || ARCH_VERSAL_NET || ARCH_VERSAL2 default 0 if TARGET_XILINX_MBV help Specifies distro boot script offset in NAND/QSPI/NOR flash. diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index b47d2d23f91..0b43407b9e9 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -6,7 +6,6 @@ * Michal Simek <michal.simek@amd.com> */ -#include <common.h> #include <efi.h> #include <efi_loader.h> #include <env.h> @@ -702,11 +701,6 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size) #define MAX_RAND_SIZE 8 int ft_board_setup(void *blob, struct bd_info *bd) { - size_t n = MAX_RAND_SIZE; - struct udevice *dev; - u8 buf[MAX_RAND_SIZE]; - int nodeoffset, ret; - static const struct node_info nodes[] = { { "arm,pl353-nand-r2p1", MTD_DEV_TYPE_NAND, }, }; @@ -714,41 +708,6 @@ int ft_board_setup(void *blob, struct bd_info *bd) if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS) && IS_ENABLED(CONFIG_NAND_ZYNQ)) fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes)); - if (uclass_get_device(UCLASS_RNG, 0, &dev) || !dev) { - debug("No RNG device\n"); - return 0; - } - - if (dm_rng_read(dev, buf, n)) { - debug("Reading RNG failed\n"); - return 0; - } - - if (!blob) { - debug("No FDT memory address configured. Please configure\n" - "the FDT address via \"fdt addr <address>\" command.\n" - "Aborting!\n"); - return 0; - } - - ret = fdt_check_header(blob); - if (ret < 0) { - debug("fdt_chosen: %s\n", fdt_strerror(ret)); - return ret; - } - - nodeoffset = fdt_find_or_add_subnode(blob, 0, "chosen"); - if (nodeoffset < 0) { - debug("Reading chosen node failed\n"); - return nodeoffset; - } - - ret = fdt_setprop(blob, nodeoffset, "kaslr-seed", buf, sizeof(buf)); - if (ret < 0) { - debug("Unable to set kaslr-seed on chosen node: %s\n", fdt_strerror(ret)); - return ret; - } - return 0; } #endif diff --git a/board/xilinx/common/cpu-info.c b/board/xilinx/common/cpu-info.c index bfe7f5b7e38..765bb24d937 100644 --- a/board/xilinx/common/cpu-info.c +++ b/board/xilinx/common/cpu-info.c @@ -4,7 +4,6 @@ * Michal Simek <michal.simek@amd.com> */ -#include <common.h> #include <init.h> #include <soc.h> diff --git a/board/xilinx/common/fru.c b/board/xilinx/common/fru.c index 12b21317496..8cf307e33f2 100644 --- a/board/xilinx/common/fru.c +++ b/board/xilinx/common/fru.c @@ -3,7 +3,6 @@ * (C) Copyright 2019 - 2020 Xilinx, Inc. */ -#include <common.h> #include <command.h> #include <fdtdec.h> #include <malloc.h> diff --git a/board/xilinx/common/fru_ops.c b/board/xilinx/common/fru_ops.c index 167252c240c..610293bccf7 100644 --- a/board/xilinx/common/fru_ops.c +++ b/board/xilinx/common/fru_ops.c @@ -4,13 +4,13 @@ * (C) Copyright 2022 - 2023, Advanced Micro Devices, Inc. */ -#include <common.h> #include <cpu_func.h> #include <env.h> #include <fdtdec.h> #include <log.h> #include <malloc.h> #include <net.h> +#include <linux/errno.h> #include <asm/io.h> #include <asm/arch/hardware.h> diff --git a/board/xilinx/versal-net/board.c b/board/xilinx/versal-net/board.c index da03024e162..88e10fa7a7f 100644 --- a/board/xilinx/versal-net/board.c +++ b/board/xilinx/versal-net/board.c @@ -6,7 +6,6 @@ * Michal Simek <michal.simek@amd.com> */ -#include <common.h> #include <cpu_func.h> #include <fdtdec.h> #include <init.h> diff --git a/board/xilinx/versal-net/cmds.c b/board/xilinx/versal-net/cmds.c index b18a71fe52c..e8b669f0fd4 100644 --- a/board/xilinx/versal-net/cmds.c +++ b/board/xilinx/versal-net/cmds.c @@ -7,10 +7,10 @@ #include <cpu_func.h> #include <command.h> -#include <common.h> #include <log.h> #include <memalign.h> #include <versalpl.h> +#include <vsprintf.h> #include <zynqmp_firmware.h> /** @@ -71,10 +71,9 @@ static int do_versalnet_load_pdi(struct cmd_tbl *cmdtp, int flag, int argc, return cmd_process_error(cmdtp, ret); } -static char versalnet_help_text[] = +U_BOOT_LONGHELP(versalnet, "loadpdi addr len - Load pdi image\n" - "load pdi image at ddr address 'addr' with pdi image size 'len'\n" -; + "load pdi image at ddr address 'addr' with pdi image size 'len'\n"); U_BOOT_CMD_WITH_SUBCMDS(versalnet, "Versal NET sub-system", versalnet_help_text, U_BOOT_SUBCMD_MKENT(loadpdi, 3, 1, diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index 4f6d56119db..39474674cca 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -5,7 +5,6 @@ */ #include <command.h> -#include <common.h> #include <cpu_func.h> #include <env.h> #include <fdtdec.h> @@ -151,14 +150,29 @@ static int boot_targets_setup(void) break; case QSPI_MODE_24BIT: puts("QSPI_MODE_24\n"); + if (uclass_get_device_by_name(UCLASS_SPI, + "spi@f1030000", &dev)) { + debug("QSPI driver for QSPI device is not present\n"); + break; + } mode = "xspi0"; break; case QSPI_MODE_32BIT: puts("QSPI_MODE_32\n"); + if (uclass_get_device_by_name(UCLASS_SPI, + "spi@f1030000", &dev)) { + debug("QSPI driver for QSPI device is not present\n"); + break; + } mode = "xspi0"; break; case OSPI_MODE: puts("OSPI_MODE\n"); + if (uclass_get_device_by_name(UCLASS_SPI, + "spi@f1010000", &dev)) { + debug("OSPI driver for OSPI device is not present\n"); + break; + } mode = "xspi0"; break; case EMMC_MODE: diff --git a/board/xilinx/versal/cmds.c b/board/xilinx/versal/cmds.c index 2a74e49aede..c78793573e8 100644 --- a/board/xilinx/versal/cmds.c +++ b/board/xilinx/versal/cmds.c @@ -6,10 +6,10 @@ #include <cpu_func.h> #include <command.h> -#include <common.h> #include <log.h> #include <memalign.h> #include <versalpl.h> +#include <vsprintf.h> #include <zynqmp_firmware.h> static int do_versal_load_pdi(struct cmd_tbl *cmdtp, int flag, int argc, diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index 6c365910011..b9a91110ff7 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -4,7 +4,7 @@ * (C) Copyright 2013 - 2018 Xilinx, Inc. */ -#include <common.h> +#include <config.h> #include <debug_uart.h> #include <dfu.h> #include <init.h> diff --git a/board/xilinx/zynq/bootimg.c b/board/xilinx/zynq/bootimg.c index 2f55078dd76..79bec3a4cfb 100644 --- a/board/xilinx/zynq/bootimg.c +++ b/board/xilinx/zynq/bootimg.c @@ -3,7 +3,6 @@ * Copyright (C) 2018 Xilinx, Inc. */ -#include <common.h> #include <log.h> #include <part.h> #include <asm/global_data.h> diff --git a/board/xilinx/zynq/cmds.c b/board/xilinx/zynq/cmds.c index d7c7b2f2295..05ecb75406b 100644 --- a/board/xilinx/zynq/cmds.c +++ b/board/xilinx/zynq/cmds.c @@ -3,7 +3,6 @@ * Copyright (C) 2018 Xilinx, Inc. */ -#include <common.h> #include <command.h> #include <log.h> #include <asm/global_data.h> diff --git a/board/xilinx/zynqmp/Kconfig b/board/xilinx/zynqmp/Kconfig deleted file mode 100644 index ffa2f0215d4..00000000000 --- a/board/xilinx/zynqmp/Kconfig +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2018, Xilinx, Inc. -# -# SPDX-License-Identifier: GPL-2.0 - -if ARCH_ZYNQMP - -config CMD_ZYNQMP - bool "Enable ZynqMP specific commands" - depends on ZYNQMP_FIRMWARE - default y - help - Enable ZynqMP specific commands like "zynqmp secure" - which is used for zynqmp secure image verification. - The secure image is a xilinx specific BOOT.BIN with - either authentication or encryption or both encryption - and authentication feature enabled while generating - BOOT.BIN using Xilinx bootgen tool. - -endif diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile index 204e4fadf0e..9ab50eca400 100644 --- a/board/xilinx/zynqmp/Makefile +++ b/board/xilinx/zynqmp/Makefile @@ -40,10 +40,6 @@ $(obj)/pm_cfg_obj.o: $(shell cd $(srctree); readlink -f $(CONFIG_ZYNQMP_SPL_PM_C endif endif -ifndef CONFIG_SPL_BUILD -obj-$(CONFIG_CMD_ZYNQMP) += cmds.o -endif - # Suppress "warning: function declaration isn't a prototype" CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c deleted file mode 100644 index 9524688f27d..00000000000 --- a/board/xilinx/zynqmp/cmds.c +++ /dev/null @@ -1,430 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * (C) Copyright 2018 Xilinx, Inc. - * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>> - */ - -#include <common.h> -#include <command.h> -#include <cpu_func.h> -#include <env.h> -#include <malloc.h> -#include <memalign.h> -#include <zynqmp_firmware.h> -#include <asm/arch/hardware.h> -#include <asm/arch/sys_proto.h> -#include <asm/io.h> -#include <mach/zynqmp_aes.h> - -static int do_zynqmp_verify_secure(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - u64 src_addr, addr; - u32 len, src_lo, src_hi; - u8 *key_ptr = NULL; - int ret; - u32 key_lo = 0; - u32 key_hi = 0; - u32 ret_payload[PAYLOAD_ARG_CNT]; - - if (argc < 4) - return CMD_RET_USAGE; - - src_addr = simple_strtoull(argv[2], NULL, 16); - len = hextoul(argv[3], NULL); - - if (argc == 5) - key_ptr = (uint8_t *)(uintptr_t)simple_strtoull(argv[4], - NULL, 16); - - if ((ulong)src_addr != ALIGN((ulong)src_addr, - CONFIG_SYS_CACHELINE_SIZE)) { - printf("Failed: source address not aligned:%lx\n", - (ulong)src_addr); - return -EINVAL; - } - - src_lo = lower_32_bits((ulong)src_addr); - src_hi = upper_32_bits((ulong)src_addr); - flush_dcache_range((ulong)src_addr, (ulong)(src_addr + len)); - - if (key_ptr) { - key_lo = lower_32_bits((ulong)key_ptr); - key_hi = upper_32_bits((ulong)key_ptr); - flush_dcache_range((ulong)key_ptr, - (ulong)(key_ptr + KEY_PTR_LEN)); - } - - ret = xilinx_pm_request(PM_SECURE_IMAGE, src_lo, src_hi, - key_lo, key_hi, ret_payload); - if (ret) { - printf("Failed: secure op status:0x%x\n", ret); - } else { - addr = (u64)ret_payload[1] << 32 | ret_payload[2]; - printf("Verified image at 0x%llx\n", addr); - env_set_hex("zynqmp_verified_img_addr", addr); - } - - return ret; -} - -static int do_zynqmp_mmio_read(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - u32 read_val, addr; - int ret; - - if (argc != cmdtp->maxargs) - return CMD_RET_USAGE; - - addr = hextoul(argv[2], NULL); - - ret = zynqmp_mmio_read(addr, &read_val); - if (!ret) - printf("mmio read value at 0x%x = 0x%x\n", - addr, read_val); - else - printf("Failed: mmio read\n"); - - return ret; -} - -static int do_zynqmp_mmio_write(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - u32 addr, mask, val; - int ret; - - if (argc != cmdtp->maxargs) - return CMD_RET_USAGE; - - addr = hextoul(argv[2], NULL); - mask = hextoul(argv[3], NULL); - val = hextoul(argv[4], NULL); - - ret = zynqmp_mmio_write(addr, mask, val); - if (ret != 0) - printf("Failed: mmio write\n"); - - return ret; -} - -static int do_zynqmp_aes(struct cmd_tbl *cmdtp, int flag, int argc, - char * const argv[]) -{ - ALLOC_CACHE_ALIGN_BUFFER(struct zynqmp_aes, aes, 1); - - if (zynqmp_firmware_version() <= PMUFW_V1_0) { - puts("ERR: PMUFW v1.0 or less is detected\n"); - puts("ERR: Encrypt/Decrypt feature is not supported\n"); - puts("ERR: Please upgrade PMUFW\n"); - return CMD_RET_FAILURE; - } - - if (argc < cmdtp->maxargs - 1) - return CMD_RET_USAGE; - - aes->srcaddr = hextoul(argv[2], NULL); - aes->ivaddr = hextoul(argv[3], NULL); - aes->len = hextoul(argv[4], NULL); - aes->op = hextoul(argv[5], NULL); - aes->keysrc = hextoul(argv[6], NULL); - aes->dstaddr = hextoul(argv[7], NULL); - - if (aes->keysrc == 0) { - if (argc < cmdtp->maxargs) - return CMD_RET_USAGE; - - aes->keyaddr = hextoul(argv[8], NULL); - } - - return zynqmp_aes_operation(aes); -} - -#ifdef CONFIG_DEFINE_TCM_OCM_MMAP -static int do_zynqmp_tcm_init(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - u8 mode; - - if (argc != cmdtp->maxargs) - return CMD_RET_USAGE; - - if (strcmp(argv[2], "lockstep") && strcmp(argv[2], "split")) { - printf("mode param should be lockstep or split\n"); - return CMD_RET_FAILURE; - } - - mode = hextoul(argv[2], NULL); - if (mode != TCM_LOCK && mode != TCM_SPLIT) { - printf("Mode should be either 0(lock)/1(split)\n"); - return CMD_RET_FAILURE; - } - - dcache_disable(); - tcm_init(mode); - dcache_enable(); - - return CMD_RET_SUCCESS; -} -#endif - -static int do_zynqmp_pmufw(struct cmd_tbl *cmdtp, int flag, int argc, - char * const argv[]) -{ - u32 addr, size; - - if (argc != cmdtp->maxargs) - return CMD_RET_USAGE; - - if (!strncmp(argv[2], "node", 4)) { - u32 id; - int ret; - - if (!strncmp(argv[3], "close", 5)) - return zynqmp_pmufw_config_close(); - - id = dectoul(argv[3], NULL); - if (!id) { - printf("Incorrect ID passed\n"); - return CMD_RET_USAGE; - } - - printf("Enable permission for node ID %d\n", id); - - ret = zynqmp_pmufw_node(id); - if (ret == -ENODEV) - ret = 0; - - return ret; - } - - addr = hextoul(argv[2], NULL); - size = hextoul(argv[3], NULL); - - zynqmp_pmufw_load_config_object((const void *)(uintptr_t)addr, - (size_t)size); - - return 0; -} - -static int do_zynqmp_rsa(struct cmd_tbl *cmdtp, int flag, int argc, - char * const argv[]) -{ - u64 srcaddr, mod, exp; - u32 srclen, rsaop, size, ret_payload[PAYLOAD_ARG_CNT]; - int ret; - - if (argc != cmdtp->maxargs) - return CMD_RET_USAGE; - - if (zynqmp_firmware_version() <= PMUFW_V1_0) { - puts("ERR: PMUFW v1.0 or less is detected\n"); - puts("ERR: Encrypt/Decrypt feature is not supported\n"); - puts("ERR: Please upgrade PMUFW\n"); - return CMD_RET_FAILURE; - } - - srcaddr = hextoul(argv[2], NULL); - srclen = hextoul(argv[3], NULL); - if (srclen != RSA_KEY_SIZE) { - puts("ERR: srclen should be equal to 0x200(512 bytes)\n"); - return CMD_RET_USAGE; - } - - mod = hextoul(argv[4], NULL); - exp = hextoul(argv[5], NULL); - rsaop = hextoul(argv[6], NULL); - if (!(rsaop == 0 || rsaop == 1)) { - puts("ERR: rsaop should be either 0 or 1\n"); - return CMD_RET_USAGE; - } - - memcpy((void *)srcaddr + srclen, (void *)mod, MODULUS_LEN); - - /* - * For encryption we load public exponent (key size 4096-bits), - * for decryption we load private exponent (32-bits) - */ - if (rsaop) { - memcpy((void *)srcaddr + srclen + MODULUS_LEN, - (void *)exp, PUB_EXPO_LEN); - size = srclen + MODULUS_LEN + PUB_EXPO_LEN; - } else { - memcpy((void *)srcaddr + srclen + MODULUS_LEN, - (void *)exp, PRIV_EXPO_LEN); - size = srclen + MODULUS_LEN + PRIV_EXPO_LEN; - } - - flush_dcache_range((ulong)srcaddr, - (ulong)(srcaddr) + roundup(size, ARCH_DMA_MINALIGN)); - - ret = xilinx_pm_request(PM_SECURE_RSA, upper_32_bits((ulong)srcaddr), - lower_32_bits((ulong)srcaddr), srclen, rsaop, - ret_payload); - if (ret || ret_payload[1]) { - printf("Failed: RSA status:0x%x, errcode:0x%x\n", - ret, ret_payload[1]); - return CMD_RET_FAILURE; - } - - return CMD_RET_SUCCESS; -} - -static int do_zynqmp_sha3(struct cmd_tbl *cmdtp, int flag, - int argc, char * const argv[]) -{ - u64 srcaddr, hashaddr; - u32 srclen, ret_payload[PAYLOAD_ARG_CNT]; - int ret; - - if (argc > cmdtp->maxargs || argc < (cmdtp->maxargs - 1)) - return CMD_RET_USAGE; - - if (zynqmp_firmware_version() <= PMUFW_V1_0) { - puts("ERR: PMUFW v1.0 or less is detected\n"); - puts("ERR: Encrypt/Decrypt feature is not supported\n"); - puts("ERR: Please upgrade PMUFW\n"); - return CMD_RET_FAILURE; - } - - srcaddr = hextoul(argv[2], NULL); - srclen = hextoul(argv[3], NULL); - - if (argc == 5) { - hashaddr = hextoul(argv[4], NULL); - flush_dcache_range(hashaddr, - hashaddr + roundup(ZYNQMP_SHA3_SIZE, - ARCH_DMA_MINALIGN)); - } else { - hashaddr = srcaddr; - } - - /* Check srcaddr or srclen != 0 */ - if (!srcaddr || !srclen) { - puts("ERR: srcaddr & srclen should not be 0\n"); - return CMD_RET_USAGE; - } - - flush_dcache_range(srcaddr, - srcaddr + roundup(srclen, ARCH_DMA_MINALIGN)); - - ret = xilinx_pm_request(PM_SECURE_SHA, 0, 0, 0, - ZYNQMP_SHA3_INIT, ret_payload); - if (ret || ret_payload[1]) { - printf("Failed: SHA INIT status:0x%x, errcode:0x%x\n", - ret, ret_payload[1]); - return CMD_RET_FAILURE; - } - - ret = xilinx_pm_request(PM_SECURE_SHA, upper_32_bits((ulong)srcaddr), - lower_32_bits((ulong)srcaddr), - srclen, ZYNQMP_SHA3_UPDATE, ret_payload); - if (ret || ret_payload[1]) { - printf("Failed: SHA UPDATE status:0x%x, errcode:0x%x\n", - ret, ret_payload[1]); - return CMD_RET_FAILURE; - } - - ret = xilinx_pm_request(PM_SECURE_SHA, upper_32_bits((ulong)hashaddr), - lower_32_bits((ulong)hashaddr), - ZYNQMP_SHA3_SIZE, ZYNQMP_SHA3_FINAL, - ret_payload); - if (ret || ret_payload[1]) { - printf("Failed: SHA FINAL status:0x%x, errcode:0x%x\n", - ret, ret_payload[1]); - return CMD_RET_FAILURE; - } - - return CMD_RET_SUCCESS; -} - -static struct cmd_tbl cmd_zynqmp_sub[] = { - U_BOOT_CMD_MKENT(secure, 5, 0, do_zynqmp_verify_secure, "", ""), - U_BOOT_CMD_MKENT(pmufw, 4, 0, do_zynqmp_pmufw, "", ""), - U_BOOT_CMD_MKENT(mmio_read, 3, 0, do_zynqmp_mmio_read, "", ""), - U_BOOT_CMD_MKENT(mmio_write, 5, 0, do_zynqmp_mmio_write, "", ""), - U_BOOT_CMD_MKENT(aes, 9, 0, do_zynqmp_aes, "", ""), - U_BOOT_CMD_MKENT(rsa, 7, 0, do_zynqmp_rsa, "", ""), - U_BOOT_CMD_MKENT(sha3, 5, 0, do_zynqmp_sha3, "", ""), -#ifdef CONFIG_DEFINE_TCM_OCM_MMAP - U_BOOT_CMD_MKENT(tcminit, 3, 0, do_zynqmp_tcm_init, "", ""), -#endif -}; - -/** - * do_zynqmp - Handle the "zynqmp" command-line command - * @cmdtp: Command data struct pointer - * @flag: Command flag - * @argc: Command-line argument count - * @argv: Array of command-line arguments - * - * Processes the zynqmp specific commands - * - * Return: return 0 on success and CMD_RET_USAGE incase of misuse and error - */ -static int do_zynqmp(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - struct cmd_tbl *c; - int ret = CMD_RET_USAGE; - - if (argc < 2) - return CMD_RET_USAGE; - - c = find_cmd_tbl(argv[1], &cmd_zynqmp_sub[0], - ARRAY_SIZE(cmd_zynqmp_sub)); - if (c) - ret = c->cmd(c, flag, argc, argv); - - return cmd_process_error(c, ret); -} - -/***************************************************/ -U_BOOT_LONGHELP(zynqmp, - "secure src len [key_addr] - verifies secure images of $len bytes\n" - " long at address $src. Optional key_addr\n" - " can be specified if user key needs to\n" - " be used for decryption\n" - "zynqmp mmio_read address - read from address\n" - "zynqmp mmio_write address mask value - write value after masking to\n" - " address\n" - "zynqmp aes srcaddr ivaddr len aesop keysrc dstaddr [keyaddr] -\n" - " Encrypts or decrypts blob of data at src address and puts it\n" - " back to dstaddr using key and iv at keyaddr and ivaddr\n" - " respectively. keysrc value specifies from which source key\n" - " has to be used, it can be User/Device/PUF key. A value of 0\n" - " for KUP(user key),1 for DeviceKey and 2 for PUF key. The\n" - " aesop value specifies the operation which can be 0 for\n" - " decrypt and 1 for encrypt operation\n" -#ifdef CONFIG_DEFINE_TCM_OCM_MMAP - "zynqmp tcminit mode - Initialize the TCM with zeros. TCM needs to be\n" - " initialized before accessing to avoid ECC\n" - " errors. mode specifies in which mode TCM has\n" - " to be initialized. Supported modes will be\n" - " lock(0)/split(1)\n" -#endif - "zynqmp pmufw address size - load PMU FW configuration object\n" - "zynqmp pmufw node <id> - load PMU FW configuration object, <id> in dec\n" - "zynqmp pmufw node close - disable config object loading\n" - " node: keyword, id: NODE_ID in decimal format\n" - "zynqmp rsa srcaddr srclen mod exp rsaop -\n" - " Performs RSA encryption and RSA decryption on blob of data\n" - " at srcaddr and puts it back in srcaddr using modulus and\n" - " public or private exponent\n" - " srclen : must be key size(4096 bits)\n" - " exp : private key exponent for RSA decryption(4096 bits)\n" - " public key exponent for RSA encryption(32 bits)\n" - " rsaop : 0 for RSA Decryption, 1 for RSA Encryption\n" - "zynqmp sha3 srcaddr srclen [key_addr] -\n" - " Generates sha3 hash value for data blob at srcaddr and puts\n" - " 48 bytes hash value into srcaddr\n" - " Optional key_addr can be specified for saving sha3 hash value\n" - " Note: srcaddr/srclen should not be 0\n" - ); - -U_BOOT_CMD( - zynqmp, 9, 1, do_zynqmp, - "ZynqMP sub-system", - zynqmp_help_text -); diff --git a/board/xilinx/zynqmp/zynqmp-sm-k24-revA/psu_init_gpl.c b/board/xilinx/zynqmp/zynqmp-sm-k24-revA/psu_init_gpl.c index 166e61431ba..274203ffaa3 100644 --- a/board/xilinx/zynqmp/zynqmp-sm-k24-revA/psu_init_gpl.c +++ b/board/xilinx/zynqmp/zynqmp-sm-k24-revA/psu_init_gpl.c @@ -528,8 +528,8 @@ static unsigned long psu_mio_init_data(void) psu_mask_write(0xFF180124, 0x000000FEU, 0x00000002U); psu_mask_write(0xFF180128, 0x000000FEU, 0x00000002U); psu_mask_write(0xFF18012C, 0x000000FEU, 0x00000002U); - psu_mask_write(0xFF180130, 0x000000FEU, 0x000000C0U); - psu_mask_write(0xFF180134, 0x000000FEU, 0x000000C0U); + psu_mask_write(0xFF180130, 0x000000FEU, 0x00000000U); + psu_mask_write(0xFF180134, 0x000000FEU, 0x00000000U); psu_mask_write(0xFF180204, 0xFFFFFFFFU, 0x50000000U); psu_mask_write(0xFF180208, 0xFFFFFFFFU, 0x00B02020U); psu_mask_write(0xFF18020C, 0x00003FFFU, 0x00000FC0U); @@ -569,21 +569,16 @@ static unsigned long psu_peripherals_init_data(void) psu_mask_write(0xFD1A0100, 0x0001807CU, 0x00000000U); psu_mask_write(0xFF5E0238, 0x001A0000U, 0x00000000U); psu_mask_write(0xFF5E023C, 0x0093C018U, 0x00000000U); - psu_mask_write(0xFF5E0230, 0x00000008U, 0x00000000U); + psu_mask_write(0xFF5E0230, 0x00000002U, 0x00000000U); psu_mask_write(0xFF5E0238, 0x00000001U, 0x00000000U); psu_mask_write(0xFF180390, 0x00000004U, 0x00000004U); psu_mask_write(0xFF5E023C, 0x00000400U, 0x00000000U); - psu_mask_write(0xFF5E0238, 0x00000040U, 0x00000000U); - psu_mask_write(0xFF180310, 0x00008000U, 0x00000000U); - psu_mask_write(0xFF180320, 0x33840000U, 0x02840000U); - psu_mask_write(0xFF18031C, 0x7FFE0000U, 0x64500000U); - psu_mask_write(0xFF180358, 0x00000008U, 0x00000008U); - psu_mask_write(0xFF180324, 0x03C00000U, 0x00000000U); + psu_mask_write(0xFF5E0238, 0x00000080U, 0x00000000U); psu_mask_write(0xFF5E0238, 0x00000400U, 0x00000000U); psu_mask_write(0xFF5E0238, 0x00008000U, 0x00000000U); psu_mask_write(0xFF5E0238, 0x00000010U, 0x00000000U); psu_mask_write(0xFF5E0238, 0x00007800U, 0x00000000U); - psu_mask_write(0xFF5E0238, 0x00000004U, 0x00000000U); + psu_mask_write(0xFF5E0238, 0x00000006U, 0x00000000U); psu_mask_write(0xFF5E0238, 0x00040000U, 0x00000000U); psu_mask_write(0xFF4B0024, 0x000000FFU, 0x000000FFU); psu_mask_write(0xFFCA5000, 0x00001FFFU, 0x00000000U); @@ -591,13 +586,15 @@ static unsigned long psu_peripherals_init_data(void) psu_mask_write(0xFFA60040, 0x80000000U, 0x80000000U); psu_mask_write(0xFF260020, 0xFFFFFFFFU, 0x05F5DD18U); psu_mask_write(0xFF260000, 0x00000001U, 0x00000001U); - psu_mask_write(0xFF5E0250, 0x00000F0FU, 0x00000202U); + psu_mask_write(0xFF0A0284, 0x03FFFFFFU, 0x01000000U); + psu_mask_write(0xFF0A0288, 0x03FFFFFFU, 0x01000000U); + psu_mask_write(0xFF0A0014, 0x03FF03FFU, 0x02FF0100U); mask_delay(1); - psu_mask_write(0xFF5E0250, 0x00000F0FU, 0x00000002U); + psu_mask_write(0xFF0A0014, 0x03FF03FFU, 0x02FF0000U); mask_delay(5); - psu_mask_write(0xFF5E0250, 0x00000F0FU, 0x00000202U); + psu_mask_write(0xFF0A0014, 0x03FF03FFU, 0x02FF0100U); return 1; } diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index f370fb7347a..b4c15b041cc 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -4,7 +4,7 @@ * Michal Simek <michal.simek@amd.com> */ -#include <common.h> +#include <config.h> #include <command.h> #include <cpu_func.h> #include <debug_uart.h> @@ -285,6 +285,18 @@ int dram_init(void) #if !CONFIG_IS_ENABLED(SYSRESET) void reset_cpu(void) { + if (!IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE)) { + log_warning("reset failed: ZYNQMP_FIRMWARE disabled"); + return; + } + + /* In case of !CONFIG_ZYNQMP_FIRMWARE the call to 'xilinx_pm_request()' + * will be removed by the compiler due to the early return. + * If CONFIG_ZYNQMP_FIRMWARE is defined in SPL 'xilinx_pm_request()' + * will send command over IPI and requires pmufw to be present. + */ + xilinx_pm_request(PM_RESET_ASSERT, ZYNQMP_PM_RESET_SOFT, + PM_RESET_ACTION_ASSERT, 0, 0, NULL); } #endif @@ -519,6 +531,10 @@ int board_late_init(void) usb_ether_init(); #endif + multiboot = multi_boot(); + if (multiboot >= 0) + env_set_hex("multiboot", multiboot); + if (!(gd->flags & GD_FLG_ENV_DEFAULT)) { debug("Saved variables - Skipping\n"); return 0; @@ -531,10 +547,6 @@ int board_late_init(void) if (ret) return ret; - multiboot = multi_boot(); - if (multiboot >= 0) - env_set_hex("multiboot", multiboot); - if (IS_ENABLED(CONFIG_DISTRO_DEFAULTS)) { ret = boot_targets_setup(); if (ret) diff --git a/board/xilinx/zynqmp/zynqmp_kria.env b/board/xilinx/zynqmp/zynqmp_kria.env index 846eceb0118..69e333c5388 100644 --- a/board/xilinx/zynqmp/zynqmp_kria.env +++ b/board/xilinx/zynqmp/zynqmp_kria.env @@ -65,6 +65,7 @@ kd240_setup=i2c dev 1 && run usb_hub_init;zynqmp pmufw node 33; zynqmp pmufw nod tpm_setup=tpm autostart; board_setup=\ +zynqmp mmio_write 0xFFCA0010 0xfff 0; \ if test ${card1_name} = SCK-KV-G; then run kv260_setup; fi;\ if test ${card1_name} = SCK-KR-G; then run kr260_setup; fi;\ if test ${card1_name} = SCK-KD-G; then run kd240_setup; fi;\ diff --git a/board/xilinx/zynqmp_r5/board.c b/board/xilinx/zynqmp_r5/board.c index 5c5a2e93863..0c62b0013c4 100644 --- a/board/xilinx/zynqmp_r5/board.c +++ b/board/xilinx/zynqmp_r5/board.c @@ -3,9 +3,9 @@ * (C) Copyright 2018 Xilinx, Inc. (Michal Simek) */ -#include <common.h> #include <fdtdec.h> #include <init.h> +#include <linux/errno.h> int board_init(void) { diff --git a/board/zyxel/nsa310s/nsa310s.c b/board/zyxel/nsa310s/nsa310s.c index b3ea6608914..d018b573824 100644 --- a/board/zyxel/nsa310s/nsa310s.c +++ b/board/zyxel/nsa310s/nsa310s.c @@ -4,7 +4,6 @@ * Copyright (C) 2015 Gerald Kerma <dreagle@doukki.net> */ -#include <common.h> #include <init.h> #include <netdev.h> #include <asm/arch/cpu.h> diff --git a/board/zyxel/nsa325/nsa325.c b/board/zyxel/nsa325/nsa325.c index f5f63ee5d3b..38340b33c8b 100644 --- a/board/zyxel/nsa325/nsa325.c +++ b/board/zyxel/nsa325/nsa325.c @@ -14,7 +14,6 @@ * Marvell Semiconductor <www.marvell.com> */ -#include <common.h> #include <asm/arch/soc.h> #include <asm/arch/mpp.h> #include <netdev.h> |