summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.azure-pipelines.yml1
-rw-r--r--.gitlab-ci.yml3
-rw-r--r--Makefile5
-rw-r--r--arch/arm/Kconfig10
-rw-r--r--arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi8
-rw-r--r--arch/arm/dts/mt7981-emmc-rfb.dts2
-rw-r--r--arch/arm/dts/mt7981-rfb.dts2
-rw-r--r--arch/arm/dts/mt7981-sd-rfb.dts2
-rw-r--r--arch/arm/dts/mt7986-u-boot.dtsi2
-rw-r--r--arch/arm/dts/zynqmp-binman-som.dts19
-rw-r--r--arch/arm/dts/zynqmp-binman.dts39
-rw-r--r--arch/arm/dts/zynqmp-sck-kd-g-revA.dtso4
-rw-r--r--arch/arm/dts/zynqmp-sck-kr-g-revA.dtso5
-rw-r--r--arch/arm/dts/zynqmp-sck-kv-g-revA.dtso4
-rw-r--r--arch/arm/dts/zynqmp-sck-kv-g-revB.dtso4
-rw-r--r--arch/arm/lib/relocate.S2
-rw-r--r--arch/arm/mach-k3/Kconfig24
-rw-r--r--arch/arm/mach-k3/am62ax/am62a7_init.c26
-rw-r--r--arch/arm/mach-k3/am62px/am62p5_init.c26
-rw-r--r--arch/arm/mach-zynq/Kconfig3
-rw-r--r--arch/arm/mach-zynqmp-r5/Kconfig3
-rw-r--r--arch/arm/mach-zynqmp/Kconfig3
-rw-r--r--arch/sandbox/dts/test.dts37
-rw-r--r--board/armltd/vexpress64/Kconfig2
-rw-r--r--board/armltd/vexpress64/Makefile5
-rw-r--r--board/armltd/vexpress64/vexpress64.c4
-rw-r--r--board/comvetia/lxr2/lxr2.env1
-rw-r--r--board/keymile/scripts/develop-common.txt1
-rw-r--r--board/keymile/scripts/ramfs-common.txt1
-rw-r--r--board/keymile/secu1/socfpga_secu.env1
-rw-r--r--board/phytec/phycore_am64x/Kconfig25
-rw-r--r--board/phytec/phycore_am64x/phycore-am64x.c105
-rw-r--r--board/samsung/e850-96/e850-96.c7
-rw-r--r--board/samsung/e850-96/e850-96.env37
-rw-r--r--board/samsung/e850-96/fw.c45
-rw-r--r--board/storopack/smegw01/smegw01.env15
-rw-r--r--board/ti/am62px/am62px.env6
-rw-r--r--board/ti/am62px/rm-cfg.yaml82
-rw-r--r--board/ti/am62px/tifs-rm-cfg.yaml72
-rw-r--r--board/ti/am62x/am62x.env6
-rw-r--r--board/ti/am64x/am64x.env6
-rw-r--r--board/xilinx/zynqmp/zynqmp.c2
-rw-r--r--board/xilinx/zynqmp/zynqmp_kria.env1
-rw-r--r--cmd/Kconfig36
-rw-r--r--cmd/fpga.c65
-rw-r--r--cmd/setexpr.c54
-rw-r--r--common/Kconfig14
-rw-r--r--common/autoboot.c5
-rw-r--r--common/bloblist.c18
-rw-r--r--common/cli_hush.c8
-rw-r--r--common/spl/Kconfig1
-rw-r--r--configs/am335x_guardian_defconfig1
-rw-r--r--configs/am62ax_evm_a53_defconfig4
-rw-r--r--configs/am62ax_evm_r5_defconfig6
-rw-r--r--configs/am62px_evm_a53_defconfig4
-rw-r--r--configs/am62px_evm_r5_defconfig6
-rw-r--r--configs/am62x_beagleplay_a53_defconfig2
-rw-r--r--configs/am62x_beagleplay_r5_defconfig3
-rw-r--r--configs/am62x_evm_a53_defconfig2
-rw-r--r--configs/am62x_evm_r5_defconfig3
-rw-r--r--configs/am64x_evm_a53_defconfig3
-rw-r--r--configs/am64x_evm_r5_defconfig3
-rw-r--r--configs/am65x_evm_a53_defconfig3
-rw-r--r--configs/am65x_evm_r5_defconfig4
-rw-r--r--configs/am65x_evm_r5_usbdfu_defconfig4
-rw-r--r--configs/am65x_evm_r5_usbmsc_defconfig4
-rw-r--r--configs/amd_versal2_virt_defconfig15
-rw-r--r--configs/bk4r1_defconfig1
-rw-r--r--configs/brppt2_defconfig1
-rw-r--r--configs/capricorn_cxg3_defconfig1
-rw-r--r--configs/display5_defconfig1
-rw-r--r--configs/draco-etamin_defconfig1
-rw-r--r--configs/draco-rastaban_defconfig1
-rw-r--r--configs/draco-thuban_defconfig1
-rw-r--r--configs/e850-96_defconfig23
-rw-r--r--configs/ge_b1x5v2_defconfig1
-rw-r--r--configs/ge_bx50v3_defconfig1
-rw-r--r--configs/imx6q_bosch_acc_defconfig1
-rw-r--r--configs/imx6qdl_icore_mmc_defconfig1
-rw-r--r--configs/imx8mm-mx8menlo_defconfig1
-rw-r--r--configs/imx8mm_data_modul_edm_sbc_defconfig1
-rw-r--r--configs/imx8mp_data_modul_edm_sbc_defconfig1
-rw-r--r--configs/imx8mp_dhcom_drc02_defconfig1
-rw-r--r--configs/imx8mp_dhcom_pdk2_defconfig1
-rw-r--r--configs/imx8mp_dhcom_pdk3_defconfig1
-rw-r--r--configs/imx8mp_dhcom_picoitx_defconfig1
-rw-r--r--configs/iot2050_defconfig2
-rw-r--r--configs/j7200_evm_a72_defconfig3
-rw-r--r--configs/j7200_evm_r5_defconfig3
-rw-r--r--configs/j721e_beagleboneai64_a72_defconfig3
-rw-r--r--configs/j721e_beagleboneai64_r5_defconfig3
-rw-r--r--configs/j721e_evm_a72_defconfig5
-rw-r--r--configs/j721e_evm_r5_defconfig4
-rw-r--r--configs/j721s2_evm_a72_defconfig3
-rw-r--r--configs/j721s2_evm_r5_defconfig4
-rw-r--r--configs/j722s_evm_a53_defconfig4
-rw-r--r--configs/j722s_evm_r5_defconfig3
-rw-r--r--configs/j784s4_evm_a72_defconfig3
-rw-r--r--configs/j784s4_evm_r5_defconfig2
-rw-r--r--configs/kmcent2_defconfig1
-rw-r--r--configs/kmcoge5ne_defconfig1
-rw-r--r--configs/kmeter1_defconfig1
-rw-r--r--configs/kmopti2_defconfig1
-rw-r--r--configs/kmsupx5_defconfig1
-rw-r--r--configs/kmtepr2_defconfig1
-rw-r--r--configs/lxr2_defconfig1
-rw-r--r--configs/m53menlo_defconfig1
-rw-r--r--configs/microblaze-generic_defconfig2
-rw-r--r--configs/mx53ppd_defconfig1
-rw-r--r--configs/pg_wcom_expu1_defconfig1
-rw-r--r--configs/pg_wcom_expu1_update_defconfig1
-rw-r--r--configs/pg_wcom_seli8_defconfig1
-rw-r--r--configs/pg_wcom_seli8_update_defconfig1
-rw-r--r--configs/phycore_am62ax_a53_defconfig3
-rw-r--r--configs/phycore_am62ax_r5_defconfig3
-rw-r--r--configs/phycore_am62x_r5_defconfig3
-rw-r--r--configs/phycore_am64x_r5_defconfig5
-rw-r--r--configs/pxm2_defconfig1
-rw-r--r--configs/rut_defconfig1
-rw-r--r--configs/smegw01_defconfig1
-rw-r--r--configs/socfpga_secu1_defconfig1
-rw-r--r--configs/stm32mp13_dhcor_defconfig1
-rw-r--r--configs/stm32mp15_dhcom_basic_defconfig1
-rw-r--r--configs/stm32mp15_dhcor_basic_defconfig1
-rw-r--r--configs/tuge1_defconfig1
-rw-r--r--configs/tuxx1_defconfig1
-rw-r--r--configs/verdin-am62_a53_defconfig1
-rw-r--r--configs/verdin-am62_r5_defconfig3
-rw-r--r--configs/vexpress_fvp_bloblist_defconfig5
-rw-r--r--configs/xilinx_versal_mini_ospi_defconfig2
-rw-r--r--configs/xilinx_versal_net_virt_defconfig13
-rw-r--r--configs/xilinx_versal_virt_defconfig14
-rw-r--r--configs/xilinx_zynq_virt_defconfig9
-rw-r--r--configs/xilinx_zynqmp_kria_defconfig17
-rw-r--r--configs/xilinx_zynqmp_virt_defconfig20
-rw-r--r--doc/board/armltd/vexpress64.rst16
-rw-r--r--doc/develop/release_cycle.rst4
-rw-r--r--doc/develop/tests_writing.rst52
-rw-r--r--doc/device-tree-bindings/leds/common.txt23
-rw-r--r--doc/usage/cmd/ut.rst145
-rw-r--r--drivers/bootcount/Kconfig3
-rw-r--r--drivers/fpga/fpga.c14
-rw-r--r--drivers/led/led-uclass.c70
-rw-r--r--drivers/net/designware.c12
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mt7988.c3
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mtk-common.c6
-rw-r--r--drivers/remoteproc/Kconfig11
-rw-r--r--drivers/remoteproc/Makefile1
-rw-r--r--drivers/remoteproc/ti_k3_m4_rproc.c371
-rw-r--r--drivers/remoteproc/ti_k3_r5f_rproc.c2
-rw-r--r--drivers/rtc/emul_rtc.c2
-rw-r--r--drivers/spi/cadence_ospi_versal.c12
-rw-r--r--drivers/spi/cadence_qspi.h2
-rw-r--r--drivers/timer/sandbox_timer.c5
-rw-r--r--env/fat.c14
-rw-r--r--include/bloblist.h2
-rw-r--r--include/configs/am335x_guardian.h5
-rw-r--r--include/configs/bk4r1.h2
-rw-r--r--include/configs/brppt2.h1
-rw-r--r--include/configs/display5.h1
-rw-r--r--include/configs/ge_b1x5v2.h8
-rw-r--r--include/configs/ge_bx50v3.h8
-rw-r--r--include/configs/imx6-engicam.h1
-rw-r--r--include/configs/imx6q-bosch-acc.h3
-rw-r--r--include/configs/imx8mm-mx8menlo.h8
-rw-r--r--include/configs/imx8mm_data_modul_edm_sbc.h1
-rw-r--r--include/configs/imx8mp_data_modul_edm_sbc.h1
-rw-r--r--include/configs/imx8mp_dhcom_pdk2.h1
-rw-r--r--include/configs/m53menlo.h7
-rw-r--r--include/configs/mx53ppd.h8
-rw-r--r--include/configs/siemens-am33x-common.h1
-rw-r--r--include/configs/siemens-env-common.h1
-rw-r--r--include/configs/snapper9g45.h3
-rw-r--r--include/configs/vexpress_aemv8.h6
-rw-r--r--include/configs/xilinx_zynqmp.h1
-rw-r--r--include/env/pg-wcom/common.env1
-rw-r--r--include/env/phytec/k3_mmc.env1
-rw-r--r--include/env/phytec/k3_net.env2
-rw-r--r--include/env/phytec/k3_spi.env2
-rw-r--r--include/env_default.h3
-rw-r--r--include/fpga.h6
-rw-r--r--include/led.h8
-rw-r--r--include/test/fdt_overlay.h19
-rw-r--r--include/test/optee.h4
-rw-r--r--include/test/overlay.h15
-rw-r--r--include/test/suites.h43
-rw-r--r--include/test/test.h28
-rw-r--r--include/time.h15
-rw-r--r--test/Kconfig23
-rw-r--r--test/Makefile3
-rw-r--r--test/boot/bootdev.c1
-rw-r--r--test/boot/bootflow.c1
-rw-r--r--test/boot/bootm.c1
-rw-r--r--test/boot/bootmeth.c1
-rw-r--r--test/boot/bootstd_common.c29
-rw-r--r--test/boot/bootstd_common.h10
-rw-r--r--test/boot/expo.c1
-rw-r--r--test/boot/image.c1
-rw-r--r--test/boot/measurement.c1
-rw-r--r--test/boot/upl.c1
-rw-r--r--test/boot/vbe_simple.c4
-rw-r--r--test/cmd/addrmap.c1
-rw-r--r--test/cmd/bdinfo.c1
-rw-r--r--test/cmd/exit.c1
-rw-r--r--test/cmd/fdt.c1
-rw-r--r--test/cmd/font.c1
-rw-r--r--test/cmd/loadm.c1
-rw-r--r--test/cmd/mbr.c1
-rw-r--r--test/cmd/pci_mps.c1
-rw-r--r--test/cmd/seama.c1
-rw-r--r--test/cmd/setexpr.c47
-rw-r--r--test/cmd_ut.c243
-rw-r--r--test/common/bloblist.c1
-rw-r--r--test/dm/Kconfig2
-rw-r--r--test/dm/led.c22
-rw-r--r--test/dm/mux-cmd.c6
-rw-r--r--test/dm/ofnode.c2
-rw-r--r--test/env/Kconfig1
-rw-r--r--test/env/cmd_ut_env.c1
-rw-r--r--test/fdt_overlay/Kconfig (renamed from test/overlay/Kconfig)4
-rw-r--r--test/fdt_overlay/Makefile (renamed from test/overlay/Makefile)2
-rw-r--r--test/fdt_overlay/cmd_ut_fdt_overlay.c (renamed from test/overlay/cmd_ut_overlay.c)221
-rw-r--r--test/fdt_overlay/test-fdt-base.dts (renamed from test/overlay/test-fdt-base.dts)0
-rw-r--r--test/fdt_overlay/test-fdt-overlay-stacked.dtso (renamed from test/overlay/test-fdt-overlay-stacked.dtso)0
-rw-r--r--test/fdt_overlay/test-fdt-overlay.dtso (renamed from test/overlay/test-fdt-overlay.dtso)0
-rw-r--r--test/log/cont_test.c1
-rw-r--r--test/log/nolog_test.c1
-rw-r--r--test/log/pr_cont_test.c1
-rw-r--r--test/log/syslog_test.c1
-rw-r--r--test/log/syslog_test_ndebug.c1
-rw-r--r--test/optee/Kconfig2
-rw-r--r--test/optee/Makefile2
-rw-r--r--test/optee/optee.c (renamed from test/optee/cmd_ut_optee.c)105
-rw-r--r--test/py/tests/test_suite.py34
-rw-r--r--test/py/tests/test_usb.py2
-rw-r--r--test/test-main.c41
-rw-r--r--tools/image-host.c11
-rw-r--r--tools/mkenvimage.c2
-rw-r--r--tools/proftool.c3
-rw-r--r--tools/ublimage.c1
240 files changed, 1946 insertions, 1015 deletions
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 9fc9c4e74fd..1f2766eae16 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -89,6 +89,7 @@ stages:
options: $(container_option)
steps:
- script: |
+ set -e
virtualenv -p /usr/bin/python3 /tmp/venvhtml
. /tmp/venvhtml/bin/activate
pip install -r doc/sphinx/requirements.txt
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dfb8dffc71e..e339c25f5e1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -549,9 +549,6 @@ coreboot test.py:
dependencies: []
tags: [ 'lab' ]
script:
- - if [[ -z "${SJG_LAB}" ]]; then
- exit 0;
- fi
# Environment:
# SRC - source tree
# OUT - output directory for builds
diff --git a/Makefile b/Makefile
index 33bb86343c5..d4fedd87fe6 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
VERSION = 2025
PATCHLEVEL = 04
SUBLEVEL =
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc2
NAME =
# *DOCUMENTATION*
@@ -893,9 +893,6 @@ ifdef CONFIG_POST
libs-y += post/
endif
libs-$(CONFIG_$(PHASE_)UNIT_TEST) += test/
-libs-$(CONFIG_UT_ENV) += test/env/
-libs-$(CONFIG_UT_OPTEE) += test/optee/
-libs-$(CONFIG_UT_OVERLAY) += test/overlay/
libs-y += $(if $(wildcard $(srctree)/board/$(BOARDDIR)/Makefile),board/$(BOARDDIR)/)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f504d7d0760..da6f1174934 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -108,6 +108,9 @@ config LNX_KRNL_IMG_TEXT_OFFSET_BASE
The value subtracted from CONFIG_TEXT_BASE to calculate the
TEXT_OFFSET value written to the Linux kernel image header.
+config NVIC
+ bool
+
config GICV2
bool
@@ -117,6 +120,7 @@ config GICV3
config DRIVER_GICV2
bool "ARM GICV2 driver"
select IRQ
+ depends on !NVIC
help
ARM GICV2 driver.
Basic support for parsing the GICV2 node and generate ACPI tables.
@@ -124,6 +128,7 @@ config DRIVER_GICV2
config GIC_V3_ITS
bool "ARM GICV3 ITS"
select IRQ
+ depends on !NVIC
help
ARM GICV3 Interrupt translation service (ITS).
Basic support for programming locality specific peripheral
@@ -134,6 +139,7 @@ config GIC_V3_ITS
config GICV3_SUPPORT_GIC600
bool "ARM GICV3 GIC600 SUPPORT"
+ depends on !NVIC
help
ARM GIC-600 IP complies with ARM GICv3 architecture, but among others,
implements a power control register in the Redistributor frame.This
@@ -193,6 +199,7 @@ config SPL_SYS_DCACHE_OFF
config SYS_ARM_CACHE_CP15
bool "CP15 based cache enabling support"
+ depends on !CPU_V7M
help
Select this if your processor suports enabling caches by using
CP15 registers.
@@ -200,6 +207,7 @@ config SYS_ARM_CACHE_CP15
config SYS_ARM_MMU
bool "MMU-based Paged Memory Management Support"
select SYS_ARM_CACHE_CP15
+ depends on !CPU_V7M
help
Select if you want MMU-based virtualised addressing space
support via paged memory management.
@@ -350,6 +358,7 @@ config CPU_V7M
select SYS_CACHE_SHIFT_5
select SYS_THUMB_BUILD
select THUMB2_KERNEL
+ select NVIC
config CPU_V7R
bool
@@ -2193,6 +2202,7 @@ config SERIAL_TAG
config STATIC_MACH_TYPE
bool "Statically define the Machine ID number"
default y if TARGET_DS109 || TARGET_DS414 || DEFAULT_DEVICE_TREE = "sun7i-a20-icnova-swac"
+ depends on SUPPORT_PASSING_ATAGS
help
When booting via ATAGs, enable this option if we know the correct
machine ID number to use at compile time. Some systems will be
diff --git a/arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi b/arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi
index 8f3c3a185ae..c68a48678a2 100644
--- a/arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi
+++ b/arch/arm/dts/k3-am642-phyboard-electra-rdk-u-boot.dtsi
@@ -72,6 +72,14 @@
bootph-all;
};
+&main_i2c0 {
+ bootph-all;
+};
+
+&main_i2c0_pins_default {
+ bootph-all;
+};
+
&main_mmc1_pins_default {
bootph-all;
};
diff --git a/arch/arm/dts/mt7981-emmc-rfb.dts b/arch/arm/dts/mt7981-emmc-rfb.dts
index 67f178bc232..ebfcee5a2ea 100644
--- a/arch/arm/dts/mt7981-emmc-rfb.dts
+++ b/arch/arm/dts/mt7981-emmc-rfb.dts
@@ -47,7 +47,7 @@
status = "okay";
mediatek,gmac-id = <0>;
phy-mode = "2500base-x";
- mediatek,switch = "mt7531";
+ mediatek,switch = "auto";
reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
fixed-link {
diff --git a/arch/arm/dts/mt7981-rfb.dts b/arch/arm/dts/mt7981-rfb.dts
index 08e1b76b473..17e6b5af7a2 100644
--- a/arch/arm/dts/mt7981-rfb.dts
+++ b/arch/arm/dts/mt7981-rfb.dts
@@ -38,7 +38,7 @@
status = "okay";
mediatek,gmac-id = <0>;
phy-mode = "2500base-x";
- mediatek,switch = "mt7531";
+ mediatek,switch = "auto";
reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
fixed-link {
diff --git a/arch/arm/dts/mt7981-sd-rfb.dts b/arch/arm/dts/mt7981-sd-rfb.dts
index 2f43e65ac5b..672124657ca 100644
--- a/arch/arm/dts/mt7981-sd-rfb.dts
+++ b/arch/arm/dts/mt7981-sd-rfb.dts
@@ -47,7 +47,7 @@
status = "okay";
mediatek,gmac-id = <0>;
phy-mode = "2500base-x";
- mediatek,switch = "mt7531";
+ mediatek,switch = "auto";
reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
fixed-link {
diff --git a/arch/arm/dts/mt7986-u-boot.dtsi b/arch/arm/dts/mt7986-u-boot.dtsi
index 096b97371b8..71e83304c74 100644
--- a/arch/arm/dts/mt7986-u-boot.dtsi
+++ b/arch/arm/dts/mt7986-u-boot.dtsi
@@ -28,6 +28,6 @@
bootph-all;
};
-&pinctrl {
+&pio {
bootph-all;
};
diff --git a/arch/arm/dts/zynqmp-binman-som.dts b/arch/arm/dts/zynqmp-binman-som.dts
index 3d9d8476c98..d5b63ef604b 100644
--- a/arch/arm/dts/zynqmp-binman-som.dts
+++ b/arch/arm/dts/zynqmp-binman-som.dts
@@ -13,6 +13,8 @@
/ {
binman: binman {
multiple-images;
+
+#ifdef CONFIG_SPL
fit-dtb.blob {
filename = "fit-dtb.blob";
pad-byte = <0>;
@@ -146,8 +148,11 @@
arch = "arm64";
compression = "none";
os = "tee";
- load = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
- entry = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
+ load = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+ entry = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+ hash {
+ algo = "md5";
+ };
tee-os {
optional;
};
@@ -157,7 +162,9 @@
type = "flat_dt";
arch = "arm64";
compression = "none";
- load = <0x0 0x100000>;
+#if CONFIG_XILINX_OF_BOARD_DTB_ADDR
+ load = /bits/ 64 <CONFIG_XILINX_OF_BOARD_DTB_ADDR>;
+#endif
hash {
algo = "md5";
};
@@ -171,8 +178,13 @@
default = "conf-1";
conf-1 {
description = "Multi DTB with TF-A/TEE";
+#if CONFIG_BL31_LOAD_ADDR
firmware = "atf";
loadables = "tee", "uboot", "fdt";
+#else
+ firmware = "uboot";
+ loadables = "fdt";
+#endif
};
};
};
@@ -221,5 +233,6 @@
};
};
#endif
+#endif
};
};
diff --git a/arch/arm/dts/zynqmp-binman.dts b/arch/arm/dts/zynqmp-binman.dts
index 675f6bf51eb..252c2ad552b 100644
--- a/arch/arm/dts/zynqmp-binman.dts
+++ b/arch/arm/dts/zynqmp-binman.dts
@@ -14,6 +14,7 @@
binman: binman {
multiple-images;
+#ifdef CONFIG_SPL
/* u-boot.itb generation in a static way */
itb {
filename = "u-boot.itb";
@@ -60,8 +61,11 @@
arch = "arm64";
compression = "none";
os = "tee";
- load = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
- entry = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
+ load = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+ entry = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+ hash {
+ algo = "md5";
+ };
tee-os {
optional;
};
@@ -71,8 +75,10 @@
type = "flat_dt";
arch = "arm64";
compression = "none";
- load = <0x0 0x100000>;
- hash-1 {
+#if CONFIG_XILINX_OF_BOARD_DTB_ADDR
+ load = /bits/ 64 <CONFIG_XILINX_OF_BOARD_DTB_ADDR>;
+#endif
+ hash {
algo = "md5";
};
};
@@ -81,9 +87,15 @@
default = "@conf-DEFAULT-SEQ";
@conf-SEQ {
description = "NAME";
+#if CONFIG_BL31_LOAD_ADDR
firmware = "atf";
loadables = "tee", "uboot";
fdt = "fdt-SEQ";
+#else
+ firmware = "uboot";
+ loadables = "fdt";
+#endif
+
};
};
};
@@ -134,8 +146,11 @@
arch = "arm64";
compression = "none";
os = "tee";
- load = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
- entry = /bits/ 64 <CONFIG_BL31_LOAD_ADDR>;
+ load = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+ entry = /bits/ 64 <CONFIG_BL32_LOAD_ADDR>;
+ hash {
+ algo = "md5";
+ };
tee-os {
optional;
};
@@ -145,15 +160,16 @@
type = "flat_dt";
arch = "arm64";
compression = "none";
- load = <0x0 0x100000>;
+#if CONFIG_XILINX_OF_BOARD_DTB_ADDR
+ load = /bits/ 64 <CONFIG_XILINX_OF_BOARD_DTB_ADDR>;
+#endif
+ hash {
+ algo = "md5";
+ };
uboot-fdt-blob {
filename = "u-boot.dtb";
type = "blob-ext";
};
- hash-1 {
- algo = "md5";
- };
-
};
};
configurations {
@@ -202,5 +218,6 @@
};
};
#endif
+#endif
};
};
diff --git a/arch/arm/dts/zynqmp-sck-kd-g-revA.dtso b/arch/arm/dts/zynqmp-sck-kd-g-revA.dtso
index d56e863ce1c..02be5e1e868 100644
--- a/arch/arm/dts/zynqmp-sck-kd-g-revA.dtso
+++ b/arch/arm/dts/zynqmp-sck-kd-g-revA.dtso
@@ -22,6 +22,10 @@
"xlnx,zynqmp-sk-kd240", "xlnx,zynqmp";
model = "ZynqMP KD240 revA/B/1";
+ aliases {
+ ethernet0 = "/axi/ethernet@ff0c0000"; /* &gem1 */
+ };
+
ina260-u3 {
compatible = "iio-hwmon";
io-channels = <&u3 0>, <&u3 1>, <&u3 2>;
diff --git a/arch/arm/dts/zynqmp-sck-kr-g-revA.dtso b/arch/arm/dts/zynqmp-sck-kr-g-revA.dtso
index 9d0c0c2885d..fbacfa984d7 100644
--- a/arch/arm/dts/zynqmp-sck-kr-g-revA.dtso
+++ b/arch/arm/dts/zynqmp-sck-kr-g-revA.dtso
@@ -20,6 +20,11 @@
"xlnx,zynqmp-sk-kr260", "xlnx,zynqmp";
model = "ZynqMP KR260 revA";
+ aliases {
+ ethernet0 = "/axi/ethernet@ff0b0000"; /* &gem0 */
+ ethernet1 = "/axi/ethernet@ff0c0000"; /* &gem1 */
+ };
+
ina260-u14 {
compatible = "iio-hwmon";
io-channels = <&u14 0>, <&u14 1>, <&u14 2>;
diff --git a/arch/arm/dts/zynqmp-sck-kv-g-revA.dtso b/arch/arm/dts/zynqmp-sck-kv-g-revA.dtso
index a98a888d138..3c36eb52e96 100644
--- a/arch/arm/dts/zynqmp-sck-kv-g-revA.dtso
+++ b/arch/arm/dts/zynqmp-sck-kv-g-revA.dtso
@@ -28,6 +28,10 @@
"xlnx,zynqmp-sk-kv260", "xlnx,zynqmp";
model = "ZynqMP KV260 revA";
+ aliases {
+ ethernet0 = "/axi/ethernet@ff0e0000"; /* &gem3 */
+ };
+
ina260-u14 {
compatible = "iio-hwmon";
io-channels = <&u14 0>, <&u14 1>, <&u14 2>;
diff --git a/arch/arm/dts/zynqmp-sck-kv-g-revB.dtso b/arch/arm/dts/zynqmp-sck-kv-g-revB.dtso
index 7490efea98b..078d98e8ff3 100644
--- a/arch/arm/dts/zynqmp-sck-kv-g-revB.dtso
+++ b/arch/arm/dts/zynqmp-sck-kv-g-revB.dtso
@@ -23,6 +23,10 @@
"xlnx,zynqmp-sk-kv260", "xlnx,zynqmp";
model = "ZynqMP KV260 revB";
+ aliases {
+ ethernet0 = "/axi/ethernet@ff0e0000"; /* &gem3 */
+ };
+
ina260-u14 {
compatible = "iio-hwmon";
io-channels = <&u14 0>, <&u14 1>, <&u14 2>;
diff --git a/arch/arm/lib/relocate.S b/arch/arm/lib/relocate.S
index 345e282e3e6..bffadfecba1 100644
--- a/arch/arm/lib/relocate.S
+++ b/arch/arm/lib/relocate.S
@@ -83,8 +83,6 @@ relocate_base:
add r1, r3 /* r1 <- Run &__image_copy_start */
subs r4, r0, r1 /* r4 <- Run to copy offset */
beq relocate_done /* skip relocation */
- ldr r1, _image_copy_start_ofs
- add r1, r3 /* r1 <- Run &__image_copy_start */
ldr r2, _image_copy_end_ofs
add r2, r3 /* r2 <- Run &__image_copy_end */
copy_loop:
diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
index a3ac490f677..1f8cb8e3822 100644
--- a/arch/arm/mach-k3/Kconfig
+++ b/arch/arm/mach-k3/Kconfig
@@ -159,6 +159,30 @@ config K3_X509_SWRV
config NR_DRAM_BANKS
default 2
+config K3_REMOTEPROC_R5F
+ bool "Enable K3 Remoteproc driver for R5F"
+ depends on ARM64
+ imply REMOTEPROC_TI_K3_R5F
+ default y if (SOC_K3_AM62A7 || SOC_K3_AM654 || SOC_K3_J721E || SOC_K3_J784S4 || SOC_K3_J721S2 || SOC_K3_J722S || SOC_K3_AM62P5 || SOC_K3_AM642)
+
+config K3_REMOTEPROC_DSP
+ bool "Enable K3 Remoteproc driver for DSP"
+ depends on ARM64
+ imply REMOTEPROC_TI_K3_DSP
+ default y if (SOC_K3_AM62A7 || SOC_K3_J721E || SOC_K3_J784S4 || SOC_K3_J721S2 || SOC_K3_J722S)
+
+config K3_REMOTEPROC_M4F
+ bool "Enable K3 Remoteproc driver for M4F"
+ depends on ARM64
+ imply REMOTEPROC_TI_K3_M4F
+ default y if (SOC_K3_AM625 || SOC_K3_AM642)
+
+config K3_REMOTEPROC_PRU
+ bool "Enable K3 Remoteproc driver for PRU"
+ depends on ARM64
+ imply REMOTEPROC_TI_PRU
+ default y if (SOC_K3_AM642 || SOC_K3_AM654)
+
if CPU_V7R
source "arch/arm/mach-k3/r5/Kconfig"
endif
diff --git a/arch/arm/mach-k3/am62ax/am62a7_init.c b/arch/arm/mach-k3/am62ax/am62a7_init.c
index 78153c97a58..698e6d5c587 100644
--- a/arch/arm/mach-k3/am62ax/am62a7_init.c
+++ b/arch/arm/mach-k3/am62ax/am62a7_init.c
@@ -15,6 +15,9 @@
#include "../sysfw-loader.h"
#include "../common.h"
+#define CTRLMMR_MCU_RST_CTRL 0x04518170
+#define RST_CTRL_ESM_ERROR_RST_EN_Z_MASK 0xFFFDFFFF
+
struct fwl_data cbass_main_fwls[] = {
{ "FSS_DAT_REG3", 7, 8 },
};
@@ -70,6 +73,15 @@ static void ctrl_mmr_unlock(void)
mmr_unlock(PADCFG_MMR1_BASE, 1);
}
+static __maybe_unused void enable_mcu_esm_reset(void)
+{
+ /* Set CTRLMMR_MCU_RST_CTRL:MCU_ESM_ERROR_RST_EN_Z to '0' (low active) */
+ u32 stat = readl(CTRLMMR_MCU_RST_CTRL);
+
+ stat &= RST_CTRL_ESM_ERROR_RST_EN_Z_MASK;
+ writel(stat, CTRLMMR_MCU_RST_CTRL);
+}
+
void board_init_f(ulong dummy)
{
struct udevice *dev;
@@ -160,6 +172,20 @@ void board_init_f(ulong dummy)
/* Output System Firmware version info */
k3_sysfw_print_ver();
+ if (IS_ENABLED(CONFIG_ESM_K3)) {
+ /* Probe/configure ESM0 */
+ ret = uclass_get_device_by_name(UCLASS_MISC, "esm@420000", &dev);
+ if (ret)
+ printf("esm main init failed: %d\n", ret);
+
+ /* Probe/configure MCUESM */
+ ret = uclass_get_device_by_name(UCLASS_MISC, "esm@4100000", &dev);
+ if (ret)
+ printf("esm mcu init failed: %d\n", ret);
+
+ enable_mcu_esm_reset();
+ }
+
#if defined(CONFIG_K3_AM62A_DDRSS)
ret = uclass_get_device(UCLASS_RAM, 0, &dev);
if (ret)
diff --git a/arch/arm/mach-k3/am62px/am62p5_init.c b/arch/arm/mach-k3/am62px/am62p5_init.c
index 7a24cf39c7b..14a46fa28d2 100644
--- a/arch/arm/mach-k3/am62px/am62p5_init.c
+++ b/arch/arm/mach-k3/am62px/am62p5_init.c
@@ -19,6 +19,9 @@
/* TISCI DEV ID for A53 Clock */
#define AM62PX_DEV_A53SS0_CORE_0_DEV_ID 135
+#define CTRLMMR_MCU_RST_CTRL 0x04518170
+#define RST_CTRL_ESM_ERROR_RST_EN_Z_MASK 0xFFFDFFFF
+
struct fwl_data cbass_main_fwls[] = {
{ "FSS_DAT_REG3", 7, 8 },
};
@@ -127,6 +130,15 @@ static void fixup_a53_cpu_freq_by_speed_grade(void)
}
#endif
+static __maybe_unused void enable_mcu_esm_reset(void)
+{
+ /* Set CTRLMMR_MCU_RST_CTRL:MCU_ESM_ERROR_RST_EN_Z to '0' (low active) */
+ u32 stat = readl(CTRLMMR_MCU_RST_CTRL);
+
+ stat &= RST_CTRL_ESM_ERROR_RST_EN_Z_MASK;
+ writel(stat, CTRLMMR_MCU_RST_CTRL);
+}
+
void board_init_f(ulong dummy)
{
struct udevice *dev;
@@ -218,6 +230,20 @@ void board_init_f(ulong dummy)
panic("DRAM init failed: %d\n", ret);
}
+ if (IS_ENABLED(CONFIG_ESM_K3)) {
+ /* Probe/configure ESM0 */
+ ret = uclass_get_device_by_name(UCLASS_MISC, "esm@420000", &dev);
+ if (ret)
+ printf("esm main init failed: %d\n", ret);
+
+ /* Probe/configure MCUESM */
+ ret = uclass_get_device_by_name(UCLASS_MISC, "esm@4100000", &dev);
+ if (ret)
+ printf("esm mcu init failed: %d\n", ret);
+
+ enable_mcu_esm_reset();
+ }
+
spl_enable_cache();
setup_qos();
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
index 265e9ce588a..376d1bc7131 100644
--- a/arch/arm/mach-zynq/Kconfig
+++ b/arch/arm/mach-zynq/Kconfig
@@ -43,9 +43,6 @@ config SYS_VENDOR
config SYS_SOC
default "zynq"
-config SYS_MALLOC_F_LEN
- default 0x800
-
config SYS_MALLOC_LEN
default 0x1400000
diff --git a/arch/arm/mach-zynqmp-r5/Kconfig b/arch/arm/mach-zynqmp-r5/Kconfig
index b2ba896e9b4..45d8c053577 100644
--- a/arch/arm/mach-zynqmp-r5/Kconfig
+++ b/arch/arm/mach-zynqmp-r5/Kconfig
@@ -19,7 +19,4 @@ config CPU_FREQ_HZ
help
The value, in Hz, that the CPU clock is running at.
-config SYS_MALLOC_F_LEN
- default 0x600
-
endif
diff --git a/arch/arm/mach-zynqmp/Kconfig b/arch/arm/mach-zynqmp/Kconfig
index 92d61e84319..151cfada436 100644
--- a/arch/arm/mach-zynqmp/Kconfig
+++ b/arch/arm/mach-zynqmp/Kconfig
@@ -93,9 +93,6 @@ config SPL_ZYNQMP_DRAM_BANK2_LEN
help
Size in bytes of the DRAM ECC bank2. A null size takes no action.
-config SYS_MALLOC_F_LEN
- default 0x600
-
config DEFINE_TCM_OCM_MMAP
bool "Define TCM and OCM memory in MMU Table"
default y if MP
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index ae52b375ccb..b8f3012873e 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -13,6 +13,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/sandbox-gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/sandbox-pinmux.h>
#include <dt-bindings/mux/mux.h>
@@ -820,7 +821,7 @@
gpio-controller;
#gpio-cells = <1>;
gpio-bank-name = "a";
- sandbox,gpio-count = <20>;
+ sandbox,gpio-count = <25>;
hog_input_active_low {
gpio-hog;
input;
@@ -1010,6 +1011,40 @@
/* label intentionally omitted */
default-state = "off";
};
+
+ led-20 {
+ gpios = <&gpio_a 20 0>;
+ /* label intentionally omitted */
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
+ function-enumerator = <20>;
+ };
+
+ led-21 {
+ gpios = <&gpio_a 21 0>;
+ /* label intentionally omitted */
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led-22 {
+ gpios = <&gpio_a 22 0>;
+ /* label intentionally omitted */
+ function = LED_FUNCTION_STATUS;
+ };
+
+ led-23 {
+ gpios = <&gpio_a 23 0>;
+ /* label intentionally omitted */
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led-24 {
+ gpios = <&gpio_a 24 0>;
+ label = "sandbox:function";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ };
};
wdt-gpio-toggle {
diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig
index 584b5455e97..7e8709444fe 100644
--- a/board/armltd/vexpress64/Kconfig
+++ b/board/armltd/vexpress64/Kconfig
@@ -28,7 +28,7 @@ choice
config TARGET_VEXPRESS64_BASE_FVP
bool "Support Versatile Express ARMv8a FVP BASE model"
select VEXPRESS64_BASE_MODEL
- imply OF_HAS_PRIOR_STAGE
+ imply OF_HAS_PRIOR_STAGE if !BLOBLIST
config TARGET_VEXPRESS64_BASER_FVP
bool "Support Versatile Express ARMv8r64 FVP BASE model"
diff --git a/board/armltd/vexpress64/Makefile b/board/armltd/vexpress64/Makefile
index 1878fbed4ec..b0dd1d0af87 100644
--- a/board/armltd/vexpress64/Makefile
+++ b/board/armltd/vexpress64/Makefile
@@ -3,5 +3,8 @@
# (C) Copyright 2000-2004
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-obj-y := vexpress64.o lowlevel_init.o
+obj-y := vexpress64.o
+
+obj-$(CONFIG_OF_HAS_PRIOR_STAGE) += lowlevel_init.o
+
obj-$(CONFIG_TARGET_VEXPRESS64_JUNO) += pcie.o
diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
index b5ede58757d..0b75c1358f0 100644
--- a/board/armltd/vexpress64/vexpress64.c
+++ b/board/armltd/vexpress64/vexpress64.c
@@ -100,7 +100,9 @@ int dram_init_banksize(void)
* Push the variable into the .data section so that it
* does not get cleared later.
*/
+#ifdef CONFIG_OF_HAS_PRIOR_STAGE
unsigned long __section(".data") prior_stage_fdt_address[2];
+#endif
#ifdef CONFIG_OF_BOARD
@@ -151,6 +153,7 @@ static phys_addr_t find_dtb_in_nor_flash(const char *partname)
}
#endif
+#ifdef CONFIG_OF_HAS_PRIOR_STAGE
/*
* Filter for a valid DTB, as TF-A happens to provide a pointer to some
* data structure using the DTB format, which we cannot use.
@@ -201,6 +204,7 @@ int board_fdt_blob_setup(void **fdtp)
return -ENXIO;
}
#endif
+#endif
/* Actual reset is done via PSCI. */
void reset_cpu(void)
diff --git a/board/comvetia/lxr2/lxr2.env b/board/comvetia/lxr2/lxr2.env
index ec213800222..26ad4f18c68 100644
--- a/board/comvetia/lxr2/lxr2.env
+++ b/board/comvetia/lxr2/lxr2.env
@@ -2,7 +2,6 @@ addcons=setenv bootargs ${bootargs} console=${console},${baudrate}
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off
addmisc=setenv bootargs ${bootargs} ${miscargs}
addmtd=run mtdnand;run mtdspi;setenv bootargs ${bootargs} ${mtdparts}
-altbootcmd=run swupdate
bootcmd=run nandboot;run swupdate
bootcount=2
bootlimit=3
diff --git a/board/keymile/scripts/develop-common.txt b/board/keymile/scripts/develop-common.txt
index 1bdff2f908f..cfc69357e43 100644
--- a/board/keymile/scripts/develop-common.txt
+++ b/board/keymile/scripts/develop-common.txt
@@ -1,4 +1,3 @@
-altbootcmd=run ${subbootcmds}
bootcmd=run ${subbootcmds}
configure=run set_uimage; run set_tftppath; km_setboardid && run try_import_nfs_path && saveenv && reset
subbootcmds=tftpfdt tftpkernel nfsargs add_default boot
diff --git a/board/keymile/scripts/ramfs-common.txt b/board/keymile/scripts/ramfs-common.txt
index 0a4a9c80b7e..c86e6267bdc 100644
--- a/board/keymile/scripts/ramfs-common.txt
+++ b/board/keymile/scripts/ramfs-common.txt
@@ -1,6 +1,5 @@
addramfs=setenv bootargs "${bootargs} phram.phram=rootfs${boot_bank},${rootfsaddr},${rootfssize}"
boot_bank=-1
-altbootcmd=run ${subbootcmds}
bootcmd=run ${subbootcmds}
subbootcmds=save_and_reset_once tftpfdt tftpkernel setrootfsaddr tftpramfs flashargs add_default addpanic addramfs boot
save_and_reset_once=setenv save_and_reset_once true && saveenv && reset
diff --git a/board/keymile/secu1/socfpga_secu.env b/board/keymile/secu1/socfpga_secu.env
index 147c4170ef5..60999882958 100644
--- a/board/keymile/secu1/socfpga_secu.env
+++ b/board/keymile/secu1/socfpga_secu.env
@@ -1,4 +1,3 @@
-altbootcmd=run bootcmd;
bootlimit=6
bootnum=1
bootretry=CONFIG_BOOT_RETRY_TIME
diff --git a/board/phytec/phycore_am64x/Kconfig b/board/phytec/phycore_am64x/Kconfig
index 829526c3295..a709b71ba4d 100644
--- a/board/phytec/phycore_am64x/Kconfig
+++ b/board/phytec/phycore_am64x/Kconfig
@@ -35,3 +35,28 @@ config SYS_CONFIG_NAME
source "board/phytec/common/Kconfig"
endif
+
+config PHYCORE_AM64X_RAM_SIZE_FIX
+ bool "Set phyCORE-AM64x 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-AM64x RAM size"
+ depends on PHYCORE_AM64X_RAM_SIZE_FIX
+ default PHYCORE_AM64X_RAM_SIZE_2GB
+
+config PHYCORE_AM64X_RAM_SIZE_1GB
+ bool "1GB RAM"
+ help
+ Set RAM size fix to 1GB for phyCORE-AM64x.
+
+config PHYCORE_AM64X_RAM_SIZE_2GB
+ bool "2GB RAM"
+ help
+ Set RAM size fix to 2GB for phyCORE-AM64x.
+
+endchoice
diff --git a/board/phytec/phycore_am64x/phycore-am64x.c b/board/phytec/phycore_am64x/phycore-am64x.c
index 8f3b22657c7..f14c87f5c72 100644
--- a/board/phytec/phycore_am64x/phycore-am64x.c
+++ b/board/phytec/phycore_am64x/phycore-am64x.c
@@ -11,9 +11,12 @@
#include <env.h>
#include <env_internal.h>
#include <spl.h>
+#include <asm/arch/k3-ddr.h>
#include <fdt_support.h>
#include <asm/arch/hardware.h>
+#include "../common/am6_som_detection.h"
+
DECLARE_GLOBAL_DATA_PTR;
int board_init(void)
@@ -21,15 +24,113 @@ int board_init(void)
return 0;
}
+static u8 phytec_get_am64_ddr_size_default(void)
+{
+ int ret;
+ struct phytec_eeprom_data data;
+
+ if (IS_ENABLED(CONFIG_PHYCORE_AM64X_RAM_SIZE_FIX)) {
+ if (IS_ENABLED(CONFIG_PHYCORE_AM64X_RAM_SIZE_1GB))
+ return EEPROM_RAM_SIZE_1GB;
+ else if (IS_ENABLED(CONFIG_PHYCORE_AM64X_RAM_SIZE_2GB))
+ return EEPROM_RAM_SIZE_2GB;
+ }
+
+ 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_am64_ddr_size_default();
+
+ switch (ram_size) {
+ case EEPROM_RAM_SIZE_1GB:
+ gd->ram_size = 0x40000000;
+ break;
+ case EEPROM_RAM_SIZE_2GB:
+ gd->ram_size = 0x80000000;
+ break;
+ default:
+ gd->ram_size = 0x80000000;
+ }
+
+ return 0;
}
int dram_init_banksize(void)
{
- return fdtdec_setup_memory_banksize();
+ u8 ram_size;
+
+ memset(gd->bd->bi_dram, 0, sizeof(gd->bd->bi_dram[0]) * CONFIG_NR_DRAM_BANKS);
+
+ if (!IS_ENABLED(CONFIG_CPU_V7R))
+ return fdtdec_setup_memory_banksize();
+
+ ram_size = phytec_get_am64_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;
+
+ 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 do_board_detect(void)
+{
+ void *fdt = (void *)gd->fdt_blob;
+ int bank;
+
+ u64 start[CONFIG_NR_DRAM_BANKS];
+ u64 size[CONFIG_NR_DRAM_BANKS];
+
+ 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;
+ }
+
+ return fdt_fixup_memory_banks(fdt, start, size, CONFIG_NR_DRAM_BANKS);
+}
+#endif
+
+#if IS_ENABLED(CONFIG_XPL_BUILD)
+void spl_perform_fixups(struct spl_image_info *spl_image)
+{
+ if (IS_ENABLED(CONFIG_K3_DDRSS) && IS_ENABLED(CONFIG_K3_INLINE_ECC))
+ fixup_ddr_driver_for_ecc(spl_image);
+ else
+ fixup_memory_node(spl_image);
}
+#endif
#define CTRLMMR_USB0_PHY_CTRL 0x43004008
#define CORE_VOLTAGE 0x80000000
diff --git a/board/samsung/e850-96/e850-96.c b/board/samsung/e850-96/e850-96.c
index c5cef6f19d2..0bef68d2fb2 100644
--- a/board/samsung/e850-96/e850-96.c
+++ b/board/samsung/e850-96/e850-96.c
@@ -19,6 +19,11 @@ int dram_init_banksize(void)
int board_init(void)
{
- load_ldfw();
+ int err;
+
+ err = load_ldfw();
+ if (err)
+ printf("ERROR: LDFW loading failed (%d)\n", err);
+
return 0;
}
diff --git a/board/samsung/e850-96/e850-96.env b/board/samsung/e850-96/e850-96.env
index f36f90be950..5ac76bcef02 100644
--- a/board/samsung/e850-96/e850-96.env
+++ b/board/samsung/e850-96/e850-96.env
@@ -1,26 +1,11 @@
-partitions=
- uuid_disk=${uuid_gpt_disk};
- name=efs,start=512K,size=20M,uuid=${uuid_gpt_efs};
- name=env,size=16K,uuid=${uuid_gpt_env};
- name=kernel,size=30M,uuid=${uuid_gpt_kernel};
- name=ramdisk,size=26M,uuid=${uuid_gpt_ramdisk};
- name=dtbo,size=1M,uuid=${uuid_gpt_dtbo};
- name=ldfw,size=4016K,uuid=${uuid_gpt_ldfw};
- name=keystorage,size=8K,uuid=${uuid_gpt_keystorage};
- name=tzsw,size=1M,uuid=${uuid_gpt_tzsw};
- name=harx,size=2M,uuid=${uuid_gpt_harx};
- name=harx_rkp,size=2M,uuid=${uuid_gpt_harx_rkp};
- name=logo,size=40M,uuid=${uuid_gpt_logo};
- name=super,size=3600M,uuid=${uuid_gpt_super};
- name=cache,size=300M,uuid=${uuid_gpt_cache};
- name=modem,size=100M,uuid=${uuid_gpt_modem};
- name=boot,size=100M,uuid=${uuid_gpt_boot};
- name=persist,size=30M,uuid=${uuid_gpt_persist};
- name=recovery,size=40M,uuid=${uuid_gpt_recovery};
- name=misc,size=40M,uuid=${uuid_gpt_misc};
- name=mnv,size=20M,uuid=${uuid_gpt_mnv};
- name=frp,size=512K,uuid=${uuid_gpt_frp};
- name=vbmeta,size=64K,uuid=${uuid_gpt_vbmeta};
- name=metadata,size=16M,uuid=${uuid_gpt_metadata};
- name=dtb,size=1M,uuid=${uuid_gpt_dtb};
- name=userdata,size=-,uuid=${uuid_gpt_userdata}
+kernel_addr_r=0x80000000
+kernel_comp_addr_r=0x88000000
+kernel_comp_size=0x4000000
+fdt_addr_r=0x8c000000
+scriptaddr=0x8c100000
+pxefile_addr_r=0x8c200000
+ramdisk_addr_r=0x8c300000
+fdtfile=CONFIG_DEFAULT_FDT_FILE
+
+partitions=name=esp,start=512K,size=128M,bootable,type=system;
+partitions+=name=rootfs,size=-,bootable,type=linux
diff --git a/board/samsung/e850-96/fw.c b/board/samsung/e850-96/fw.c
index 82a0b224c67..8f64e759b43 100644
--- a/board/samsung/e850-96/fw.c
+++ b/board/samsung/e850-96/fw.c
@@ -7,14 +7,16 @@
*/
#include <part.h>
+#include <fs.h>
#include <linux/arm-smccc.h>
#include "fw.h"
#define EMMC_IFACE "mmc"
#define EMMC_DEV_NUM 0
+#define LDFW_RAW_PART "ldfw"
+#define LDFW_FAT_PART "esp"
+#define LDFW_FAT_PATH "/EFI/firmware/ldfw.bin"
-/* LDFW constants */
-#define LDFW_PART_NAME "ldfw"
#define LDFW_NWD_ADDR 0x88000000
#define LDFW_MAGIC 0x10adab1e
#define SMC_CMD_LOAD_LDFW -0x500
@@ -36,7 +38,33 @@ struct ldfw_header {
char fw_name[16];
};
-static int read_fw(const char *part_name, void *buf)
+/* Load LDFW binary as a file from FAT partition */
+static int read_fw_from_fat(const char *part_name, const char *path, void *buf)
+{
+ char dev_part_str[8];
+ loff_t len_read;
+ int err;
+
+ snprintf(dev_part_str, sizeof(dev_part_str), "%d#%s", EMMC_DEV_NUM,
+ LDFW_FAT_PART);
+
+ err = fs_set_blk_dev(EMMC_IFACE, dev_part_str, FS_TYPE_FAT);
+ if (err) {
+ debug("%s: Can't set block device\n", __func__);
+ return -ENODEV;
+ }
+
+ err = fs_read(path, (ulong)buf, 0, 0, &len_read);
+ if (err) {
+ debug("%s: Can't read LDFW file\n", __func__);
+ return -EIO;
+ }
+
+ return 0;
+}
+
+/* Load LDFW binary from raw partition on block device into RAM buffer */
+static int read_fw_from_raw(const char *part_name, void *buf)
{
struct blk_desc *blk_desc;
struct disk_partition part;
@@ -73,10 +101,13 @@ int load_ldfw(void)
u64 size = 0;
int err, i;
- /* Load LDFW from the block device partition into RAM buffer */
- err = read_fw(LDFW_PART_NAME, buf);
- if (err)
- return err;
+ /* First try to read LDFW from EFI partition, then from the raw one */
+ err = read_fw_from_fat(LDFW_FAT_PART, LDFW_FAT_PATH, buf);
+ if (err) {
+ err = read_fw_from_raw(LDFW_RAW_PART, buf);
+ if (err)
+ return err;
+ }
/* Validate LDFW by magic number in its header */
hdr = buf;
diff --git a/board/storopack/smegw01/smegw01.env b/board/storopack/smegw01/smegw01.env
index 93de8669109..c0d408e4a20 100644
--- a/board/storopack/smegw01/smegw01.env
+++ b/board/storopack/smegw01/smegw01.env
@@ -12,21 +12,6 @@
setenv bootmenu_${emmc_priority} eMMC=run boot_emmc; \
setenv bootmenu_${sd_priority} SD=run boot_sd;
#endif
-
-altbootcmd=
- echo Performing rollback...;
- if test "${mmcpart_committed}" = 1; then
- setenv mmcpart 2;
- setenv mmcpart_committed 2;
- else
- setenv mmcpart 1;
- setenv mmcpart_committed 1;
- fi;
- setenv bootcount 0;
- setenv upgrade_available;
- setenv ustate 3;
- saveenv;
- run bootcmd;
boot_emmc=setenv mmcdev_wanted 1; run persist_mmcdev; run bootcmd;
boot_sd=setenv mmcdev_wanted 0; run persist_mmcdev; run bootcmd;
bootcmd=
diff --git a/board/ti/am62px/am62px.env b/board/ti/am62px/am62px.env
index 7ef54079aa8..2b2c938b2e1 100644
--- a/board/ti/am62px/am62px.env
+++ b/board/ti/am62px/am62px.env
@@ -1,6 +1,12 @@
#include <env/ti/ti_common.env>
#include <env/ti/mmc.env>
+#if CONFIG_CMD_REMOTEPROC
+#include <env/ti/k3_rproc.env>
+#endif
+
+rproc_fw_binaries= 0 /lib/firmware/am62p-mcu-r5f0_0-fw
+
name_kern=Image
console=ttyS2,115200n8
args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
diff --git a/board/ti/am62px/rm-cfg.yaml b/board/ti/am62px/rm-cfg.yaml
index caa2f7a5a83..dc445a4b72f 100644
--- a/board/ti/am62px/rm-cfg.yaml
+++ b/board/ti/am62px/rm-cfg.yaml
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0+
-# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+# Copyright (C) 2022-2025 Texas Instruments Incorporated - https://www.ti.com/
#
# Resource management configuration for AM62P
#
@@ -244,7 +244,7 @@ rm-cfg:
subhdr:
magic: 0x7B25
size: 8
- resasg_entries_size: 984
+ resasg_entries_size: 1048
reserved: 0
resasg_entries:
-
@@ -476,13 +476,13 @@ rm-cfg:
host_id: 12
reserved: 0
-
- start_resource: 45
+ start_resource: 44
num_resource: 35
type: 1802
host_id: 35
reserved: 0
-
- start_resource: 45
+ start_resource: 44
num_resource: 35
type: 1802
host_id: 36
@@ -494,31 +494,31 @@ rm-cfg:
host_id: 30
reserved: 0
-
- start_resource: 14
+ start_resource: 13
num_resource: 512
type: 1805
host_id: 12
reserved: 0
-
- start_resource: 526
+ start_resource: 525
num_resource: 256
type: 1805
host_id: 35
reserved: 0
-
- start_resource: 526
+ start_resource: 525
num_resource: 256
type: 1805
host_id: 36
reserved: 0
-
- start_resource: 782
+ start_resource: 781
num_resource: 128
type: 1805
host_id: 30
reserved: 0
-
- start_resource: 910
+ start_resource: 909
num_resource: 626
type: 1805
host_id: 128
@@ -645,17 +645,29 @@ rm-cfg:
reserved: 0
-
start_resource: 19
- num_resource: 64
+ num_resource: 32
type: 1937
host_id: 12
reserved: 0
-
start_resource: 19
- num_resource: 64
+ num_resource: 32
type: 1937
host_id: 36
reserved: 0
-
+ start_resource: 51
+ num_resource: 32
+ type: 1937
+ host_id: 12
+ reserved: 0
+ -
+ start_resource: 51
+ num_resource: 32
+ type: 1937
+ host_id: 30
+ reserved: 0
+ -
start_resource: 83
num_resource: 8
type: 1938
@@ -699,17 +711,29 @@ rm-cfg:
reserved: 0
-
start_resource: 118
- num_resource: 16
+ num_resource: 6
type: 1943
host_id: 12
reserved: 0
-
start_resource: 118
- num_resource: 16
+ num_resource: 6
type: 1943
host_id: 36
reserved: 0
-
+ start_resource: 124
+ num_resource: 10
+ type: 1943
+ host_id: 12
+ reserved: 0
+ -
+ start_resource: 124
+ num_resource: 10
+ type: 1943
+ host_id: 30
+ reserved: 0
+ -
start_resource: 134
num_resource: 8
type: 1944
@@ -765,17 +789,29 @@ rm-cfg:
reserved: 0
-
start_resource: 19
- num_resource: 8
+ num_resource: 4
type: 1956
host_id: 12
reserved: 0
-
start_resource: 19
- num_resource: 8
+ num_resource: 4
type: 1956
host_id: 36
reserved: 0
-
+ start_resource: 23
+ num_resource: 4
+ type: 1956
+ host_id: 12
+ reserved: 0
+ -
+ start_resource: 23
+ num_resource: 4
+ type: 1956
+ host_id: 30
+ reserved: 0
+ -
start_resource: 27
num_resource: 1
type: 1957
@@ -861,17 +897,29 @@ rm-cfg:
reserved: 0
-
start_resource: 19
- num_resource: 16
+ num_resource: 6
type: 1964
host_id: 12
reserved: 0
-
start_resource: 19
- num_resource: 16
+ num_resource: 6
type: 1964
host_id: 36
reserved: 0
-
+ start_resource: 25
+ num_resource: 10
+ type: 1964
+ host_id: 12
+ reserved: 0
+ -
+ start_resource: 25
+ num_resource: 10
+ type: 1964
+ host_id: 30
+ reserved: 0
+ -
start_resource: 20
num_resource: 1
type: 1965
diff --git a/board/ti/am62px/tifs-rm-cfg.yaml b/board/ti/am62px/tifs-rm-cfg.yaml
index a80a2750467..80269748057 100644
--- a/board/ti/am62px/tifs-rm-cfg.yaml
+++ b/board/ti/am62px/tifs-rm-cfg.yaml
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0+
-# Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+# Copyright (C) 2022-2025 Texas Instruments Incorporated - https://www.ti.com/
#
# Resource management configuration for AM62P
#
@@ -244,7 +244,7 @@ tifs-rm-cfg:
subhdr:
magic: 0x7B25
size: 8
- resasg_entries_size: 840
+ resasg_entries_size: 904
reserved: 0
resasg_entries:
-
@@ -423,13 +423,13 @@ tifs-rm-cfg:
reserved: 0
-
start_resource: 44
- num_resource: 36
+ num_resource: 35
type: 1802
host_id: 35
reserved: 0
-
start_resource: 44
- num_resource: 36
+ num_resource: 35
type: 1802
host_id: 36
reserved: 0
@@ -555,17 +555,29 @@ tifs-rm-cfg:
reserved: 0
-
start_resource: 19
- num_resource: 64
+ num_resource: 32
type: 1937
host_id: 12
reserved: 0
-
start_resource: 19
- num_resource: 64
+ num_resource: 32
type: 1937
host_id: 36
reserved: 0
-
+ start_resource: 51
+ num_resource: 32
+ type: 1937
+ host_id: 12
+ reserved: 0
+ -
+ start_resource: 51
+ num_resource: 32
+ type: 1937
+ host_id: 30
+ reserved: 0
+ -
start_resource: 83
num_resource: 8
type: 1938
@@ -609,17 +621,29 @@ tifs-rm-cfg:
reserved: 0
-
start_resource: 118
- num_resource: 16
+ num_resource: 6
type: 1943
host_id: 12
reserved: 0
-
start_resource: 118
- num_resource: 16
+ num_resource: 6
type: 1943
host_id: 36
reserved: 0
-
+ start_resource: 124
+ num_resource: 10
+ type: 1943
+ host_id: 12
+ reserved: 0
+ -
+ start_resource: 124
+ num_resource: 10
+ type: 1943
+ host_id: 30
+ reserved: 0
+ -
start_resource: 134
num_resource: 8
type: 1944
@@ -675,17 +699,29 @@ tifs-rm-cfg:
reserved: 0
-
start_resource: 19
- num_resource: 8
+ num_resource: 4
type: 1956
host_id: 12
reserved: 0
-
start_resource: 19
- num_resource: 8
+ num_resource: 4
type: 1956
host_id: 36
reserved: 0
-
+ start_resource: 23
+ num_resource: 4
+ type: 1956
+ host_id: 12
+ reserved: 0
+ -
+ start_resource: 23
+ num_resource: 4
+ type: 1956
+ host_id: 30
+ reserved: 0
+ -
start_resource: 27
num_resource: 1
type: 1957
@@ -771,17 +807,29 @@ tifs-rm-cfg:
reserved: 0
-
start_resource: 19
- num_resource: 16
+ num_resource: 6
type: 1964
host_id: 12
reserved: 0
-
start_resource: 19
- num_resource: 16
+ num_resource: 6
type: 1964
host_id: 36
reserved: 0
-
+ start_resource: 25
+ num_resource: 10
+ type: 1964
+ host_id: 12
+ reserved: 0
+ -
+ start_resource: 25
+ num_resource: 10
+ type: 1964
+ host_id: 30
+ reserved: 0
+ -
start_resource: 20
num_resource: 1
type: 1965
diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env
index 078cc4b5ac9..60b5fd5e6ca 100644
--- a/board/ti/am62x/am62x.env
+++ b/board/ti/am62x/am62x.env
@@ -2,6 +2,12 @@
#include <env/ti/mmc.env>
#include <env/ti/k3_dfu.env>
+#if CONFIG_CMD_REMOTEPROC
+#include <env/ti/k3_rproc.env>
+#endif
+
+rproc_fw_binaries= 0 /lib/firmware/am62-mcu-m4f0_0-fw
+
name_kern=Image
console=ttyS2,115200n8
args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
diff --git a/board/ti/am64x/am64x.env b/board/ti/am64x/am64x.env
index 8ad805a613c..c8ab57b807c 100644
--- a/board/ti/am64x/am64x.env
+++ b/board/ti/am64x/am64x.env
@@ -2,6 +2,12 @@
#include <env/ti/mmc.env>
#include <env/ti/k3_dfu.env>
+#if CONFIG_CMD_REMOTEPROC
+#include <env/ti/k3_rproc.env>
+#endif
+
+rproc_fw_binaries= 0 /lib/firmware/am64-mcu-m4f0_0-fw 1 /lib/firmware/am64-main-r5f0_0-fw 2 /lib/firmware/am64-main-r5f0_1-fw 3 /lib/firmware/am64-main-r5f1_0-fw 4 /lib/firmware/am64-main-r5f1_1-fw
+
name_kern=Image
console=ttyS2,115200n8
args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 8cdd9d86009..820fb252a3f 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -488,7 +488,7 @@ static int boot_targets_setup(void)
if (bootseq >= 0) {
bootseq_len = snprintf(NULL, 0, "%i", bootseq);
debug("Bootseq len: %x\n", bootseq_len);
- env_set_hex("bootseq", bootseq);
+ env_set_ulong("bootseq", (unsigned long)bootseq);
}
/*
diff --git a/board/xilinx/zynqmp/zynqmp_kria.env b/board/xilinx/zynqmp/zynqmp_kria.env
index b0c2ac6f2e8..75b604a1f76 100644
--- a/board/xilinx/zynqmp/zynqmp_kria.env
+++ b/board/xilinx/zynqmp/zynqmp_kria.env
@@ -43,6 +43,7 @@ script_size_f=0x80000
scriptaddr=0x20000000
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
preboot=setenv boot_targets; setenv modeboot; run board_setup
+usb_pgood_delay=1000
# SOM specific boot methods
usb_boot_devices='usb0 usb1 usb2 usb3 usb4'
diff --git a/cmd/Kconfig b/cmd/Kconfig
index e62817bd977..2f275bd156d 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1178,16 +1178,30 @@ config CMD_FPGA
help
FPGA support.
-config CMD_FPGA_LOADBP
- bool "fpga loadbp - load partial bitstream (Xilinx only)"
+config CMD_FPGA_LOADB
+ bool "fpga loadb - load bitstream file"
+ default y
+ depends on CMD_FPGA && FPGA_XILINX
+ help
+ Supports loading an FPGA device from a bitstream file (.BIT)
+
+config CMD_FPGA_LOADP
+ bool "fpga loadp - load partial bitstream"
depends on CMD_FPGA
help
- Supports loading an FPGA device from a bitstream buffer containing
- a partial bitstream.
+ Supports loading an FPGA device from a bitstream buffer (.BIN)
+ containing a partial bitstream.
+
+config CMD_FPGA_LOADBP
+ bool "fpga loadbp - load partial bitstream file"
+ depends on CMD_FPGA && FPGA_XILINX
+ help
+ Supports loading an FPGA device from a bitstream file (.BIT)
+ containing a partial bitstream.
config CMD_FPGA_LOADFS
- bool "fpga loadfs - load bitstream from FAT filesystem (Xilinx only)"
- depends on CMD_FPGA
+ bool "fpga loadfs - load bitstream from FAT filesystem"
+ depends on CMD_FPGA && FPGA_XILINX
help
Supports loading an FPGA device from a FAT filesystem.
@@ -1197,16 +1211,9 @@ config CMD_FPGA_LOADMK
help
Supports loading an FPGA device from a image generated by mkimage.
-config CMD_FPGA_LOADP
- bool "fpga loadp - load partial bitstream"
- depends on CMD_FPGA
- help
- Supports loading an FPGA device from a bitstream buffer containing
- a partial bitstream.
-
config CMD_FPGA_LOAD_SECURE
bool "fpga loads - loads secure bitstreams"
- depends on CMD_FPGA
+ depends on CMD_FPGA && FPGA_XILINX
select FPGA_LOAD_SECURE
help
Enables the fpga loads command which is used to load secure
@@ -1595,6 +1602,7 @@ config CMD_READ
config CMD_REMOTEPROC
bool "remoteproc"
depends on REMOTEPROC
+ default y if ARCH_K3
help
Support for Remote Processor control
diff --git a/cmd/fpga.c b/cmd/fpga.c
index 93f14098ccb..9dc7b63db5d 100644
--- a/cmd/fpga.c
+++ b/cmd/fpga.c
@@ -67,7 +67,8 @@ static int do_fpga_check_params(long *dev, long *fpga_data, size_t *data_size,
}
#if defined(CONFIG_CMD_FPGA_LOAD_SECURE)
-int do_fpga_loads(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
+static int do_fpga_loads(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
size_t data_size = 0;
long fpga_data, dev;
@@ -180,6 +181,7 @@ static int do_fpga_load(struct cmd_tbl *cmdtp, int flag, int argc,
return fpga_load(dev, (void *)fpga_data, data_size, BIT_FULL, 0);
}
+#if defined(CONFIG_CMD_FPGA_LOADB)
static int do_fpga_loadb(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
@@ -194,7 +196,7 @@ static int do_fpga_loadb(struct cmd_tbl *cmdtp, int flag, int argc,
return fpga_loadbitstream(dev, (void *)fpga_data, data_size, BIT_FULL);
}
-
+#endif
#if defined(CONFIG_CMD_FPGA_LOADP)
static int do_fpga_loadp(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
@@ -356,7 +358,9 @@ static struct cmd_tbl fpga_commands[] = {
U_BOOT_CMD_MKENT(info, 1, 1, do_fpga_info, "", ""),
U_BOOT_CMD_MKENT(dump, 3, 1, do_fpga_dump, "", ""),
U_BOOT_CMD_MKENT(load, 3, 1, do_fpga_load, "", ""),
+#if defined(CONFIG_CMD_FPGA_LOADB)
U_BOOT_CMD_MKENT(loadb, 3, 1, do_fpga_loadb, "", ""),
+#endif
#if defined(CONFIG_CMD_FPGA_LOADP)
U_BOOT_CMD_MKENT(loadp, 3, 1, do_fpga_loadp, "", ""),
#endif
@@ -408,49 +412,40 @@ U_BOOT_CMD(fpga, 9, 1, do_fpga_wrapper,
#else
U_BOOT_CMD(fpga, 6, 1, do_fpga_wrapper,
#endif
- "loadable FPGA image support",
- "[operation type] [device number] [image address] [image size]\n"
- "fpga operations:\n"
- " dump\t[dev] [address] [size]\tLoad device to memory buffer\n"
- " info\t[dev]\t\t\tlist known device information\n"
- " load\t[dev] [address] [size]\tLoad device from memory buffer\n"
+ "loadable FPGA image support",
+ "info [dev] List known device information\n"
+ "fpga dump <dev> <address> <size> Load device to memory buffer\n"
+ "fpga load <dev> <address> <size> Load device from memory buffer\n"
+#if defined(CONFIG_CMD_FPGA_LOADP)
+ "fpga loadb <dev> <address> <size> Load device from bitstream buffer\n"
+#endif
#if defined(CONFIG_CMD_FPGA_LOADP)
- " loadp\t[dev] [address] [size]\t"
- "Load device from memory buffer with partial bitstream\n"
+ "fpga loadp <dev> <address> <size> Load device from memory buffer\n"
+ " with partial bitstream\n"
#endif
- " loadb\t[dev] [address] [size]\t"
- "Load device from bitstream buffer (Xilinx only)\n"
#if defined(CONFIG_CMD_FPGA_LOADBP)
- " loadbp\t[dev] [address] [size]\t"
- "Load device from bitstream buffer with partial bitstream"
- "(Xilinx only)\n"
+ "fpga loadbp <dev> <address> <size> Load device from bitstream buffer\n"
+ " with partial bitstream\n"
#endif
#if defined(CONFIG_CMD_FPGA_LOADFS)
- "Load device from filesystem (FAT by default) (Xilinx only)\n"
- " loadfs [dev] [address] [image size] [blocksize] <interface>\n"
- " [<dev[:part]>] <filename>\n"
+ "fpga loadfs <dev> <address> <size> <blocksize> <interface> [<dev[:part]>] <filename>\n"
+ " Load device from filesystem (FAT by default)\n"
#endif
#if defined(CONFIG_CMD_FPGA_LOADMK)
- " loadmk [dev] [address]\tLoad device generated with mkimage"
+ "fpga loadmk <dev> <address> Load device generated with mkimage\n"
#if defined(CONFIG_FIT)
- "\n"
- "\tFor loadmk operating on FIT format uImage address must include\n"
- "\tsubimage unit name in the form of addr:<subimg_uname>"
+ " NOTE: loadmk operating on FIT must include subimage unit\n"
+ " name in the form of addr:<subimg_uname>\n"
#endif
#endif
#if defined(CONFIG_CMD_FPGA_LOAD_SECURE)
- "Load encrypted bitstream (Xilinx only)\n"
- " loads [dev] [address] [size] [auth-OCM-0/DDR-1/noauth-2]\n"
- " [enc-devkey(0)/userkey(1)/nenc(2) [Userkey address]\n"
- "Loads the secure bistreams(authenticated/encrypted/both\n"
- "authenticated and encrypted) of [size] from [address].\n"
- "The auth-OCM/DDR flag specifies to perform authentication\n"
- "in OCM or in DDR. 0 for OCM, 1 for DDR, 2 for no authentication.\n"
- "The enc flag specifies which key to be used for decryption\n"
- "0-device key, 1-user key, 2-no encryption.\n"
- "The optional Userkey address specifies from which address key\n"
- "has to be used for decryption if user key is selected.\n"
- "NOTE: the secure bitstream has to be created using Xilinx\n"
- "bootgen tool only.\n"
+ "fpga loads <dev> <address> <size> <authflag> <encflag> [Userkey address]\n"
+ " Load device from memory buffer with secure bistream\n"
+ " (authenticated/encrypted/both)\n"
+ " -authflag: 0 for OCM, 1 for DDR, 2 for no authentication\n"
+ " (specifies where to perform authentication)\n"
+ " -encflag: 0 for device key, 1 for user key, 2 for no encryption\n"
+ " -Userkey address: address where user key is stored\n"
+ " NOTE: secure bitstream has to be created using Xilinx bootgen tool\n"
#endif
);
diff --git a/cmd/setexpr.c b/cmd/setexpr.c
index e111b8ba98a..c45fa85c887 100644
--- a/cmd/setexpr.c
+++ b/cmd/setexpr.c
@@ -35,9 +35,37 @@ struct expr_arg {
};
};
+/**
+ * arg_set_str() - copy string to expression argument
+ *
+ * The string is truncated to 64 KiB plus NUL terminator.
+ *
+ * @p: pointer to string
+ * @argp: pointer to expression argument
+ * Return: 0 on success, -ENOMEM if out of memory
+ */
+static int arg_set_str(void *p, struct expr_arg *argp)
+{
+ int len;
+ char *str;
+
+ /* Maximum string length of 64 KiB plus NUL terminator */
+ len = strnlen((char *)p, SZ_64K) + 1;
+ str = malloc(len);
+ if (!str) {
+ printf("Out of memory\n");
+ return -ENOMEM;
+ }
+ memcpy(str, p, len);
+ str[len - 1] = '\0';
+ argp->sval = str;
+ return 0;
+}
+
static int get_arg(char *s, int w, struct expr_arg *argp)
{
struct expr_arg arg;
+ int ret;
/*
* If the parameter starts with a '*' then assume it is a pointer to
@@ -47,8 +75,6 @@ static int get_arg(char *s, int w, struct expr_arg *argp)
ulong *p;
ulong addr;
ulong val;
- int len;
- char *str;
addr = hextoul(&s[1], NULL);
switch (w) {
@@ -66,18 +92,10 @@ static int get_arg(char *s, int w, struct expr_arg *argp)
break;
case CMD_DATA_SIZE_STR:
p = map_sysmem(addr, SZ_64K);
-
- /* Maximum string length of 64KB plus terminator */
- len = strnlen((char *)p, SZ_64K) + 1;
- str = malloc(len);
- if (!str) {
- printf("Out of memory\n");
- return -ENOMEM;
- }
- memcpy(str, p, len);
- str[len - 1] = '\0';
+ ret = arg_set_str(p, &arg);
unmap_sysmem(p);
- arg.sval = str;
+ if (ret)
+ return ret;
break;
case 4:
p = map_sysmem(addr, sizeof(u32));
@@ -93,9 +111,13 @@ static int get_arg(char *s, int w, struct expr_arg *argp)
break;
}
} else {
- if (w == CMD_DATA_SIZE_STR)
- return -EINVAL;
- arg.ival = hextoul(s, NULL);
+ if (w == CMD_DATA_SIZE_STR) {
+ ret = arg_set_str(s, &arg);
+ if (ret)
+ return ret;
+ } else {
+ arg.ival = hextoul(s, NULL);
+ }
}
*argp = arg;
diff --git a/common/Kconfig b/common/Kconfig
index 7685914fa6f..7b2db46ef06 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1055,8 +1055,8 @@ choice
config BLOBLIST_FIXED
bool "Place bloblist at a fixed address in memory"
help
- Select this to used a fixed memory address for the bloblist. If the
- bloblist exists at this address from a previous phase, it used as is.
+ Select this to use a fixed memory address for the bloblist. If the
+ bloblist exists at this address from a previous phase, it is used as is.
If not it is created at this address in U-Boot.
config BLOBLIST_ALLOC
@@ -1066,6 +1066,12 @@ config BLOBLIST_ALLOC
specify a fixed address on systems where this is unknown or can
change at runtime.
+config BLOBLIST_PASSAGE
+ bool "Use bloblist in-place"
+ help
+ Use a bloblist in the incoming standard passage. The size is detected
+ automatically so CONFIG_BLOBLIST_SIZE can be 0.
+
endchoice
config BLOBLIST_ADDR
@@ -1080,17 +1086,17 @@ config BLOBLIST_ADDR
config BLOBLIST_SIZE
hex "Size of bloblist"
+ default 0x0 if BLOBLIST_PASSAGE
default 0x400
help
Sets the size of the bloblist in bytes. This must include all
overhead (alignment, bloblist header, record header). The bloblist
is set up in the first part of U-Boot to run (TPL, SPL or U-Boot
- proper), and this sane bloblist is used for subsequent phases.
+ proper), and this same bloblist is used for subsequent phases.
config BLOBLIST_SIZE_RELOC
hex "Size of bloblist after relocation"
default BLOBLIST_SIZE if BLOBLIST_FIXED || BLOBLIST_ALLOC
- default 0x0 if BLOBLIST_PASSAGE
default 0x20000 if (ARM && EFI_LOADER && GENERATE_ACPI_TABLE)
help
Sets the size of the bloblist in bytes after relocation. Since U-Boot
diff --git a/common/autoboot.c b/common/autoboot.c
index 898a57bc92b..0a254498d40 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -186,10 +186,15 @@ static int passwd_abort_sha256(uint64_t etime)
ret = hash_parse_string(algo_name, sha_env_str, sha_env);
if (ret) {
printf("Hash %s not supported!\n", algo_name);
+ free(presskey);
return 0;
}
sha = malloc_cache_aligned(SHA256_SUM_LEN);
+ if (!sha) {
+ free(presskey);
+ return -ENOMEM;
+ }
size = SHA256_SUM_LEN;
/*
* We don't know how long the stop-string is, so we need to
diff --git a/common/bloblist.c b/common/bloblist.c
index ab48a3cdb98..31ba0311090 100644
--- a/common/bloblist.c
+++ b/common/bloblist.c
@@ -488,6 +488,9 @@ int bloblist_reloc(void *to, uint to_size)
{
struct bloblist_hdr *hdr;
+ if (!to_size)
+ return 0;
+
if (to_size < gd->bloblist->total_size)
return -ENOSPC;
@@ -518,13 +521,6 @@ int bloblist_init(void)
* at a fixed address.
*/
bool from_addr = fixed && !xpl_is_first_phase();
- /*
- * If U-Boot is in the first phase that an arch custom routine should
- * install the bloblist passed from previous loader to this fixed
- * address.
- */
- bool from_boot_arg = fixed && xpl_is_first_phase();
-
if (xpl_prev_phase() == PHASE_TPL && !IS_ENABLED(CONFIG_TPL_BLOBLIST))
from_addr = false;
if (fixed)
@@ -532,7 +528,13 @@ int bloblist_init(void)
CONFIG_BLOBLIST_ADDR);
size = CONFIG_BLOBLIST_SIZE;
- if (from_boot_arg)
+
+ /*
+ * If the current boot stage is the first phase of U-Boot, then an
+ * architecture-specific routine should be used to handle the bloblist
+ * passed from the previous boot loader
+ */
+ if (xpl_is_first_phase() && !IS_ENABLED(CONFIG_BLOBLIST_ALLOC))
ret = xferlist_from_boot_arg(addr, size);
else if (from_addr)
ret = bloblist_check(addr, size);
diff --git a/common/cli_hush.c b/common/cli_hush.c
index a6a8edce1f4..9f437ae5f47 100644
--- a/common/cli_hush.c
+++ b/common/cli_hush.c
@@ -3626,7 +3626,13 @@ static char *make_string(char **inp, int *nonnull)
noeval = 1;
for (n = 0; inp[n]; n++) {
p = insert_var_value_sub(inp[n], noeval);
- str = xrealloc(str, (len + strlen(p) + (2 * nonnull[n])));
+ char *new_str = xrealloc(str, (len + strlen(p) + (2 * nonnull[n])));
+ if (!new_str) {
+ free(str);
+ if (p != inp[n]) free(p);
+ return NULL;
+ }
+ str = new_str;
if (n) {
strcat(str, " ");
} else {
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 94e118f8465..7d6780936d1 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -1287,6 +1287,7 @@ config SPL_RAM_DEVICE
config SPL_REMOTEPROC
bool "Support REMOTEPROCS"
+ default y if (CPU_V7R && ARCH_K3)
help
Enable support for REMOTEPROCs in SPL. This permits to load
a remote processor firmware in SPL.
diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig
index 4059d07b5c8..c550e5e121e 100644
--- a/configs/am335x_guardian_defconfig
+++ b/configs/am335x_guardian_defconfig
@@ -77,6 +77,7 @@ CONFIG_SPL_DM=y
CONFIG_REGMAP=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_AM33XX_NVMEM=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="setenv boot_syslinux_conf \"extlinux/extlinux-rollback.conf\"; run distro_bootcmd; setenv boot_syslinux_conf \"extlinux/extlinux.conf\"; run bootcmd_ubifs0;"
CONFIG_CLK=y
CONFIG_CLK_CCF=y
CONFIG_CLK_TI_AM3_DPLL=y
diff --git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig
index bf6e9639901..315d66073af 100644
--- a/configs/am62ax_evm_a53_defconfig
+++ b/configs/am62ax_evm_a53_defconfig
@@ -41,7 +41,6 @@ CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_CMD_MMC=y
CONFIG_MMC_SPEED_MODE_SET=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_UPSTREAM=y
@@ -95,9 +94,6 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_DM_REGULATOR_GPIO=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
-CONFIG_REMOTEPROC_TI_K3_DSP=y
-CONFIG_REMOTEPROC_TI_K3_R5F=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
diff --git a/configs/am62ax_evm_r5_defconfig b/configs/am62ax_evm_r5_defconfig
index 1f7750c4c03..3948ba227fc 100644
--- a/configs/am62ax_evm_r5_defconfig
+++ b/configs/am62ax_evm_r5_defconfig
@@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="k3-am62a7-r5-sk"
CONFIG_DM_RESET=y
CONFIG_SPL_MMC=y
CONFIG_SPL_SERIAL=y
+CONFIG_SPL_DRIVERS_MISC=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL_SYS_MALLOC_F_LEN=0x7145
CONFIG_SPL_TEXT_BASE=0x43c00000
@@ -47,7 +48,6 @@ CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
CONFIG_SPL_THERMAL=y
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_HUSH_PARSER=y
@@ -55,7 +55,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -82,6 +81,8 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_OMAP24XX=y
CONFIG_DM_MAILBOX=y
CONFIG_K3_SEC_PROXY=y
+CONFIG_SPL_MISC=y
+CONFIG_ESM_K3=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ADMA=y
CONFIG_SPL_MMC_SDHCI_ADMA=y
@@ -95,7 +96,6 @@ CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_POWER_DOMAIN=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
diff --git a/configs/am62px_evm_a53_defconfig b/configs/am62px_evm_a53_defconfig
index 30b4a24ee9a..a17b3062bfe 100644
--- a/configs/am62px_evm_a53_defconfig
+++ b/configs/am62px_evm_a53_defconfig
@@ -63,7 +63,6 @@ CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_MTD=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_EFIDEBUG=y
@@ -146,9 +145,6 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_DM_REGULATOR_GPIO=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
-CONFIG_REMOTEPROC_TI_K3_DSP=y
-CONFIG_REMOTEPROC_TI_K3_R5F=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_RTC=y
CONFIG_RTC_EMULATION=y
diff --git a/configs/am62px_evm_r5_defconfig b/configs/am62px_evm_r5_defconfig
index c3adfb8697a..2438d2bb4d1 100644
--- a/configs/am62px_evm_r5_defconfig
+++ b/configs/am62px_evm_r5_defconfig
@@ -16,6 +16,7 @@ CONFIG_DEFAULT_DEVICE_TREE="k3-am62p5-r5-sk"
CONFIG_DM_RESET=y
CONFIG_SPL_MMC=y
CONFIG_SPL_SERIAL=y
+CONFIG_SPL_DRIVERS_MISC=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL_SYS_MALLOC_F_LEN=0x8000
CONFIG_SPL_TEXT_BASE=0x43c00000
@@ -48,7 +49,6 @@ CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
@@ -60,7 +60,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -87,6 +86,8 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_OMAP24XX=y
CONFIG_DM_MAILBOX=y
CONFIG_K3_SEC_PROXY=y
+CONFIG_SPL_MISC=y
+CONFIG_ESM_K3=y
CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ADMA=y
@@ -109,7 +110,6 @@ CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_POWER_DOMAIN=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
diff --git a/configs/am62x_beagleplay_a53_defconfig b/configs/am62x_beagleplay_a53_defconfig
index af54f9670a7..cedd0f75378 100644
--- a/configs/am62x_beagleplay_a53_defconfig
+++ b/configs/am62x_beagleplay_a53_defconfig
@@ -30,7 +30,6 @@ CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
CONFIG_BOOTSTD_FULL=y
-CONFIG_SYS_BOOTM_LEN=0x800000
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
CONFIG_AUTOBOOT_DELAY_STR="d"
@@ -111,7 +110,6 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_DM_REGULATOR_TPS65219=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_RTC=y
CONFIG_RTC_EMULATION=y
diff --git a/configs/am62x_beagleplay_r5_defconfig b/configs/am62x_beagleplay_r5_defconfig
index bbc55417a7e..5a465bff158 100644
--- a/configs/am62x_beagleplay_r5_defconfig
+++ b/configs/am62x_beagleplay_r5_defconfig
@@ -50,14 +50,12 @@ CONFIG_SPL_DM_MAILBOX=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -95,7 +93,6 @@ CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_POWER_DOMAIN=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig
index c77e09db156..d9596cb7224 100644
--- a/configs/am62x_evm_a53_defconfig
+++ b/configs/am62x_evm_a53_defconfig
@@ -33,7 +33,6 @@ CONFIG_SPL_SPI=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
CONFIG_BOOTSTD_FULL=y
-CONFIG_SYS_BOOTM_LEN=0x800000
CONFIG_BOOTCOMMAND="run findfdt; run envboot; bootflow scan -lb"
CONFIG_BOARD_LATE_INIT=y
CONFIG_SPL_MAX_SIZE=0x58000
@@ -120,7 +119,6 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_DM_REGULATOR_GPIO=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_RTC=y
CONFIG_RTC_EMULATION=y
diff --git a/configs/am62x_evm_r5_defconfig b/configs/am62x_evm_r5_defconfig
index b47f2f2d1f3..8eb59400eb2 100644
--- a/configs/am62x_evm_r5_defconfig
+++ b/configs/am62x_evm_r5_defconfig
@@ -53,7 +53,6 @@ CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
@@ -64,7 +63,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -110,7 +108,6 @@ CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_POWER_DOMAIN=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig
index a501f3f567e..3f002aecfa7 100644
--- a/configs/am64x_evm_a53_defconfig
+++ b/configs/am64x_evm_a53_defconfig
@@ -148,9 +148,6 @@ CONFIG_PMIC_TPS65219=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_TPS65219=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
-CONFIG_REMOTEPROC_TI_PRU=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_RTC=y
CONFIG_RTC_EMULATION=y
diff --git a/configs/am64x_evm_r5_defconfig b/configs/am64x_evm_r5_defconfig
index 0ceac16dd20..b222bcd6e43 100644
--- a/configs/am64x_evm_r5_defconfig
+++ b/configs/am64x_evm_r5_defconfig
@@ -59,7 +59,6 @@ CONFIG_SPL_NET_VCI_STRING="AM64X U-Boot R5 SPL"
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
@@ -71,7 +70,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_SETEXPR is not set
@@ -138,7 +136,6 @@ CONFIG_SPL_DM_REGULATOR=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_DM_REGULATOR_GPIO=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig
index e9b736714a5..12c4cb96815 100644
--- a/configs/am65x_evm_a53_defconfig
+++ b/configs/am65x_evm_a53_defconfig
@@ -66,7 +66,6 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_MMC_SPEED_MODE_SET=y
CONFIG_CMD_PCI=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
CONFIG_CMD_TIME=y
CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0"
@@ -144,8 +143,6 @@ CONFIG_TI_SCI_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
-CONFIG_REMOTEPROC_TI_K3_R5F=y
-CONFIG_REMOTEPROC_TI_PRU=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
diff --git a/configs/am65x_evm_r5_defconfig b/configs/am65x_evm_r5_defconfig
index 4bd5e8f63ff..386749ebabd 100644
--- a/configs/am65x_evm_r5_defconfig
+++ b/configs/am65x_evm_r5_defconfig
@@ -24,7 +24,6 @@ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
CONFIG_SPL_BSS_START_ADDR=0x41c7effc
CONFIG_SPL_BSS_MAX_SIZE=0xc00
CONFIG_SPL_STACK_R=y
-CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_SPL_SIZE_LIMIT=0x7ec00
CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x2000
CONFIG_SPL_FS_FAT=y
@@ -54,7 +53,6 @@ CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
@@ -66,7 +64,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -124,7 +121,6 @@ CONFIG_DM_REGULATOR_TPS62360=y
CONFIG_RAM=y
CONFIG_SPL_RAM=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
diff --git a/configs/am65x_evm_r5_usbdfu_defconfig b/configs/am65x_evm_r5_usbdfu_defconfig
index ae57007d898..227de53795b 100644
--- a/configs/am65x_evm_r5_usbdfu_defconfig
+++ b/configs/am65x_evm_r5_usbdfu_defconfig
@@ -22,7 +22,6 @@ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
CONFIG_SPL_BSS_START_ADDR=0x41c7effc
CONFIG_SPL_BSS_MAX_SIZE=0xc00
CONFIG_SPL_STACK_R=y
-CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_SPL_SIZE_LIMIT=0x7ec00
CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x2000
CONFIG_SPL_LIBDISK_SUPPORT=y
@@ -48,7 +47,6 @@ CONFIG_SPL_DM_MAILBOX=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_BOOTZ=y
@@ -56,7 +54,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -105,7 +102,6 @@ CONFIG_DM_REGULATOR_TPS62360=y
CONFIG_RAM=y
CONFIG_SPL_RAM=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SYSRESET=y
diff --git a/configs/am65x_evm_r5_usbmsc_defconfig b/configs/am65x_evm_r5_usbmsc_defconfig
index 3aa17eb77f0..90a857b8b95 100644
--- a/configs/am65x_evm_r5_usbmsc_defconfig
+++ b/configs/am65x_evm_r5_usbmsc_defconfig
@@ -22,7 +22,6 @@ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
CONFIG_SPL_BSS_START_ADDR=0x41c7effc
CONFIG_SPL_BSS_MAX_SIZE=0xc00
CONFIG_SPL_STACK_R=y
-CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_SPL_SIZE_LIMIT=0x7ec00
CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x2000
CONFIG_SPL_FS_FAT=y
@@ -48,14 +47,12 @@ CONFIG_SPL_DM_MAILBOX=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_BOOTZ=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -102,7 +99,6 @@ CONFIG_DM_REGULATOR_TPS62360=y
CONFIG_RAM=y
CONFIG_SPL_RAM=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SYSRESET=y
diff --git a/configs/amd_versal2_virt_defconfig b/configs/amd_versal2_virt_defconfig
index b4aebf3e9fb..8bee002777a 100644
--- a/configs/amd_versal2_virt_defconfig
+++ b/configs/amd_versal2_virt_defconfig
@@ -17,6 +17,7 @@ CONFIG_DEBUG_UART=y
CONFIG_SYS_MEMTEST_START=0x00000000
CONFIG_SYS_MEMTEST_END=0x00001000
CONFIG_REMAKE_ELF=y
+CONFIG_EFI_HTTP_BOOT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_DISTRO_DEFAULTS=y
@@ -30,6 +31,8 @@ CONFIG_SYS_PROMPT="versal2> "
CONFIG_CMD_BOOTMENU=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_NVEDIT_EFI=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_MEMINFO_MAP=y
CONFIG_CMD_MEMTEST=y
CONFIG_SYS_ALT_MEMTEST=y
CONFIG_CMD_SHA1SUM=y
@@ -39,15 +42,13 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_MMC_SPEED_MODE_SET=y
+CONFIG_CMD_OPTEE=y
CONFIG_CMD_MTD=y
CONFIG_CMD_SF_TEST=y
CONFIG_CMD_SPI=y
CONFIG_CMD_UFS=y
CONFIG_CMD_USB=y
-CONFIG_BOOTP_MAY_FAIL=y
-CONFIG_BOOTP_BOOTFILESIZE=y
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_NFS=y
+CONFIG_WGET_HTTPS=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EFIDEBUG=y
CONFIG_CMD_TIME=y
@@ -67,9 +68,7 @@ CONFIG_DTB_RESELECT=y
CONFIG_MULTI_DTB_FIT=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_NETCONSOLE=y
-CONFIG_IP_DEFRAG=y
-CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
+CONFIG_NET_LWIP=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_TFTP_BLOCKSIZE=4096
CONFIG_SIMPLE_PM_BUS=y
@@ -152,5 +151,7 @@ CONFIG_UFS_AMD_VERSAL2=y
CONFIG_VIRTIO_MMIO=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_BLK=y
+CONFIG_MBEDTLS_LIB=y
CONFIG_TPM=y
# CONFIG_OPTEE_LIB is not set
+CONFIG_TOOLS_MKFWUMDATA=y
diff --git a/configs/bk4r1_defconfig b/configs/bk4r1_defconfig
index 3ed587a1060..2b72ec91632 100644
--- a/configs/bk4r1_defconfig
+++ b/configs/bk4r1_defconfig
@@ -59,6 +59,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ARP_TIMEOUT=500
CONFIG_NETCONSOLE=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="led 5 on; boot"
CONFIG_VYBRID_GPIO=y
CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
diff --git a/configs/brppt2_defconfig b/configs/brppt2_defconfig
index f02aef24048..d468465a9cc 100644
--- a/configs/brppt2_defconfig
+++ b/configs/brppt2_defconfig
@@ -76,6 +76,7 @@ CONFIG_SPL_DM_SEQ_ALIAS=y
# CONFIG_OF_TRANSLATE is not set
# CONFIG_SPL_BLK is not set
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="setenv b_mode 0; run b_default;"
CONFIG_SYS_I2C_MXC=y
CONFIG_MMC_BROKEN_CD=y
# CONFIG_SPL_DM_MMC is not set
diff --git a/configs/capricorn_cxg3_defconfig b/configs/capricorn_cxg3_defconfig
index 4832a795e50..10e0cbd9ad2 100644
--- a/configs/capricorn_cxg3_defconfig
+++ b/configs/capricorn_cxg3_defconfig
@@ -95,6 +95,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SPL_CLK=y
CONFIG_CLK_IMX8=y
CONFIG_CPU=y
diff --git a/configs/display5_defconfig b/configs/display5_defconfig
index 765920bd5d1..55f9bbaa1cf 100644
--- a/configs/display5_defconfig
+++ b/configs/display5_defconfig
@@ -96,6 +96,7 @@ CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_BOUNCE_BUFFER=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run recovery"
CONFIG_SPL_SYS_I2C_LEGACY=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_I2C_DEFAULT_BUS_NUMBER=0x2
diff --git a/configs/draco-etamin_defconfig b/configs/draco-etamin_defconfig
index f650dbca660..6c175dd73b9 100644
--- a/configs/draco-etamin_defconfig
+++ b/configs/draco-etamin_defconfig
@@ -79,6 +79,7 @@ CONFIG_SPL_DM=y
# CONFIG_SPL_BLK is not set
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_CLK=y
CONFIG_CLK_TI_CTRL=y
CONFIG_DFU_NAND=y
diff --git a/configs/draco-rastaban_defconfig b/configs/draco-rastaban_defconfig
index 511956ec844..521a090e376 100644
--- a/configs/draco-rastaban_defconfig
+++ b/configs/draco-rastaban_defconfig
@@ -76,6 +76,7 @@ CONFIG_SPL_DM=y
# CONFIG_SPL_BLK is not set
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_CLK=y
CONFIG_CLK_TI_CTRL=y
CONFIG_DFU_NAND=y
diff --git a/configs/draco-thuban_defconfig b/configs/draco-thuban_defconfig
index 1b2ce3b0104..2c16db237f8 100644
--- a/configs/draco-thuban_defconfig
+++ b/configs/draco-thuban_defconfig
@@ -76,6 +76,7 @@ CONFIG_SPL_DM=y
# CONFIG_SPL_BLK is not set
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_CLK=y
CONFIG_CLK_TI_CTRL=y
CONFIG_DFU_NAND=y
diff --git a/configs/e850-96_defconfig b/configs/e850-96_defconfig
index c36196c510c..5facd418260 100644
--- a/configs/e850-96_defconfig
+++ b/configs/e850-96_defconfig
@@ -8,23 +8,40 @@ CONFIG_SYS_MALLOC_F_LEN=0x4000
CONFIG_ARCH_EXYNOS9=y
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xf8c00000
+CONFIG_ENV_SIZE=0x10000
+CONFIG_ENV_OFFSET=0x0
CONFIG_DEFAULT_DEVICE_TREE="exynos/exynos850-e850-96"
CONFIG_SYS_LOAD_ADDR=0x80000000
+CONFIG_ENV_OFFSET_REDUND=0x10000
# CONFIG_PSCI_RESET is not set
+CONFIG_EFI_SET_TIME=y
CONFIG_ANDROID_BOOT_IMAGE=y
-# CONFIG_AUTOBOOT is not set
+CONFIG_BOOTSTD_FULL=y
+CONFIG_DEFAULT_FDT_FILE="exynos850-e850-96.dtb"
# CONFIG_DISPLAY_CPUINFO is not set
-CONFIG_HUSH_PARSER=y
+CONFIG_CMD_BOOTEFI_SELFTEST=y
CONFIG_CMD_ABOOTIMG=y
+CONFIG_CMD_NVEDIT_EFI=y
CONFIG_CMD_CLK=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_PART=y
+CONFIG_CMD_EFIDEBUG=y
+# CONFIG_CMD_DATE is not set
+CONFIG_CMD_RTC=y
CONFIG_CMD_TIME=y
CONFIG_CMD_RNG=y
+CONFIG_PARTITION_TYPE_GUID=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_MMC_ENV_PART=2
CONFIG_NO_NET=y
CONFIG_CLK_EXYNOS850=y
+CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_DW=y
+CONFIG_DM_RTC=y
+CONFIG_RTC_EMULATION=y
CONFIG_SOC_SAMSUNG=y
CONFIG_EXYNOS_PMU=y
CONFIG_EXYNOS_USI=y
diff --git a/configs/ge_b1x5v2_defconfig b/configs/ge_b1x5v2_defconfig
index 215858c789b..fec4b67aee2 100644
--- a/configs/ge_b1x5v2_defconfig
+++ b/configs/ge_b1x5v2_defconfig
@@ -78,6 +78,7 @@ CONFIG_BOUNCE_BUFFER=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_DM_BOOTCOUNT_SPI_FLASH=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; run hasfirstboot || setenv mmcpart 0; if test ${mmcpart} != 0; then setenv bootcause REVERT; run swappartitions loadimage doboot; fi; run failbootcmd"
CONFIG_DM_PCA953X=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MXC=y
diff --git a/configs/ge_bx50v3_defconfig b/configs/ge_bx50v3_defconfig
index c24513f6ab1..676b5bc8a28 100644
--- a/configs/ge_bx50v3_defconfig
+++ b/configs/ge_bx50v3_defconfig
@@ -52,6 +52,7 @@ CONFIG_BOUNCE_BUFFER=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_DM_BOOTCOUNT_I2C_EEPROM=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run doquiet; setenv partnum 1; run hasfirstboot || setenv partnum 2; run hasfirstboot || setenv partnum 0; if test ${partnum} != 0; then run swappartitions loadimage doboot; fi; run failbootcmd"
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MXC=y
CONFIG_I2C_MUX=y
diff --git a/configs/imx6q_bosch_acc_defconfig b/configs/imx6q_bosch_acc_defconfig
index 54758df8c01..017c27479d2 100644
--- a/configs/imx6q_bosch_acc_defconfig
+++ b/configs/imx6q_bosch_acc_defconfig
@@ -86,6 +86,7 @@ CONFIG_SPL_DM=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_DM_BOOTCOUNT_PMIC_PFUZE100=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run handle_ustate; run switch_bootset; run save_env; run bootcmd"
CONFIG_SYS_I2C_MXC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
diff --git a/configs/imx6qdl_icore_mmc_defconfig b/configs/imx6qdl_icore_mmc_defconfig
index fb0787d1beb..269fe271a76 100644
--- a/configs/imx6qdl_icore_mmc_defconfig
+++ b/configs/imx6qdl_icore_mmc_defconfig
@@ -72,6 +72,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_BOUNCE_BUFFER=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run recoveryboot"
CONFIG_SYS_BOOTCOUNT_MAGIC=0x0B01C041
CONFIG_SYS_I2C_MXC=y
CONFIG_FSL_USDHC=y
diff --git a/configs/imx8mm-mx8menlo_defconfig b/configs/imx8mm-mx8menlo_defconfig
index ae9595e82b4..ad310750c77 100644
--- a/configs/imx8mm-mx8menlo_defconfig
+++ b/configs/imx8mm-mx8menlo_defconfig
@@ -102,6 +102,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_TFTP_BLOCKSIZE=4096
CONFIG_SPL_DM=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="mmc partconf 0 mmcpart ; if test ${mmcpart} -eq 1 ; then mmc partconf 0 1 2 0 ; else mmc partconf 0 1 1 0 ; fi ; boot"
CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C40000
CONFIG_SPL_CLK_COMPOSITE_CCF=y
CONFIG_CLK_COMPOSITE_CCF=y
diff --git a/configs/imx8mm_data_modul_edm_sbc_defconfig b/configs/imx8mm_data_modul_edm_sbc_defconfig
index 66cb1331ded..debaa7cb5aa 100644
--- a/configs/imx8mm_data_modul_edm_sbc_defconfig
+++ b/configs/imx8mm_data_modul_edm_sbc_defconfig
@@ -37,3 +37,4 @@ CONFIG_SPL_USB_GADGET=y
CONFIG_SPL_USB_HOST=y
CONFIG_SPL_USB_SDP_SUPPORT=y
CONFIG_SYS_LOAD_ADDR=0x60000000
+CONFIG_BOOTCOUNT_ALTBOOTCMD=run bootcmd
diff --git a/configs/imx8mp_data_modul_edm_sbc_defconfig b/configs/imx8mp_data_modul_edm_sbc_defconfig
index ea8109bf049..5024c093b99 100644
--- a/configs/imx8mp_data_modul_edm_sbc_defconfig
+++ b/configs/imx8mp_data_modul_edm_sbc_defconfig
@@ -52,3 +52,4 @@ CONFIG_USB_HOST_ETHER=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_XHCI_DWC3_OF_SIMPLE=y
CONFIG_USB_XHCI_HCD=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
diff --git a/configs/imx8mp_dhcom_drc02_defconfig b/configs/imx8mp_dhcom_drc02_defconfig
index c43839cecf5..dccf5ffc1e6 100644
--- a/configs/imx8mp_dhcom_drc02_defconfig
+++ b/configs/imx8mp_dhcom_drc02_defconfig
@@ -5,3 +5,4 @@ CONFIG_ARCH_IMX8M=y
CONFIG_DEFAULT_DEVICE_TREE="imx8mp-dhcom-drc02"
CONFIG_DEFAULT_FDT_FILE="imx8mp-dhcom-drc02.dtb"
CONFIG_PREBOOT=""
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd ; reset"
diff --git a/configs/imx8mp_dhcom_pdk2_defconfig b/configs/imx8mp_dhcom_pdk2_defconfig
index aae2e210f44..4f50806573b 100644
--- a/configs/imx8mp_dhcom_pdk2_defconfig
+++ b/configs/imx8mp_dhcom_pdk2_defconfig
@@ -7,3 +7,4 @@ CONFIG_DEFAULT_FDT_FILE="freescale/imx8mp-dhcom-pdk2.dtb"
CONFIG_PREBOOT=""
CONFIG_OF_UPSTREAM=y
CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd ; reset"
diff --git a/configs/imx8mp_dhcom_pdk3_defconfig b/configs/imx8mp_dhcom_pdk3_defconfig
index f40bf269d97..d505ddfd09d 100644
--- a/configs/imx8mp_dhcom_pdk3_defconfig
+++ b/configs/imx8mp_dhcom_pdk3_defconfig
@@ -14,3 +14,4 @@ CONFIG_PCIE_DW_IMX=y
CONFIG_PHY_IMX8M_PCIE=y
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX_PCA954x=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd ; reset"
diff --git a/configs/imx8mp_dhcom_picoitx_defconfig b/configs/imx8mp_dhcom_picoitx_defconfig
index 99cd5f279dc..d98ca9e434f 100644
--- a/configs/imx8mp_dhcom_picoitx_defconfig
+++ b/configs/imx8mp_dhcom_picoitx_defconfig
@@ -5,3 +5,4 @@ CONFIG_ARCH_IMX8M=y
CONFIG_DEFAULT_DEVICE_TREE="imx8mp-dhcom-picoitx"
CONFIG_DEFAULT_FDT_FILE="imx8mp-dhcom-picoitx.dtb"
CONFIG_PREBOOT=""
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd ; reset"
diff --git a/configs/iot2050_defconfig b/configs/iot2050_defconfig
index 2d5f18e5bd4..72d4b8e3695 100644
--- a/configs/iot2050_defconfig
+++ b/configs/iot2050_defconfig
@@ -70,7 +70,6 @@ CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_PCI=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
CONFIG_CMD_WDT=y
# CONFIG_CMD_SETEXPR is not set
@@ -131,7 +130,6 @@ CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_SCI_POWER_DOMAIN=y
-CONFIG_REMOTEPROC_TI_K3_R5F=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig
index e1ef6e86d49..4760f7509f5 100644
--- a/configs/j7200_evm_a72_defconfig
+++ b/configs/j7200_evm_a72_defconfig
@@ -67,7 +67,6 @@ CONFIG_SPL_YMODEM_SUPPORT=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MTD=y
CONFIG_CMD_PCI=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_UFS=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus"
@@ -144,6 +143,7 @@ CONFIG_SPI_FLASH_S28HX_T=y
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_SPI_FLASH_MTD=y
CONFIG_MULTIPLEXER=y
+CONFIG_MUX_MMIO=y
CONFIG_PHY_TI_DP83869=y
CONFIG_PHY_FIXED=y
CONFIG_TI_AM65_CPSW_NUSS=y
@@ -166,7 +166,6 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_RAM=y
CONFIG_SPL_RAM=y
-CONFIG_REMOTEPROC_TI_K3_R5F=y
CONFIG_RESET_TI_SCI=y
CONFIG_SCSI=y
CONFIG_DM_SERIAL=y
diff --git a/configs/j7200_evm_r5_defconfig b/configs/j7200_evm_r5_defconfig
index 265ae2e8e07..ae5849baf13 100644
--- a/configs/j7200_evm_r5_defconfig
+++ b/configs/j7200_evm_r5_defconfig
@@ -57,7 +57,6 @@ CONFIG_SPL_NOR_SUPPORT=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
@@ -68,7 +67,6 @@ CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -138,7 +136,6 @@ CONFIG_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR=y
CONFIG_DM_REGULATOR_TPS65941=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
diff --git a/configs/j721e_beagleboneai64_a72_defconfig b/configs/j721e_beagleboneai64_a72_defconfig
index a5d95975fb4..fad01c27104 100644
--- a/configs/j721e_beagleboneai64_a72_defconfig
+++ b/configs/j721e_beagleboneai64_a72_defconfig
@@ -67,7 +67,6 @@ CONFIG_CMD_GPIO_READ=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_EFIDEBUG=y
@@ -144,8 +143,6 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_RAM=y
CONFIG_SPL_RAM=y
-CONFIG_REMOTEPROC_TI_K3_DSP=y
-CONFIG_REMOTEPROC_TI_K3_R5F=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_RTC=y
CONFIG_RTC_EMULATION=y
diff --git a/configs/j721e_beagleboneai64_r5_defconfig b/configs/j721e_beagleboneai64_r5_defconfig
index 77e44963fd4..086ad99ff6d 100644
--- a/configs/j721e_beagleboneai64_r5_defconfig
+++ b/configs/j721e_beagleboneai64_r5_defconfig
@@ -52,13 +52,11 @@ CONFIG_SPL_DM_MAILBOX=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -111,7 +109,6 @@ CONFIG_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR=y
CONFIG_DM_REGULATOR_TPS65941=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
index 3928430f166..71e6c2061b3 100644
--- a/configs/j721e_evm_a72_defconfig
+++ b/configs/j721e_evm_a72_defconfig
@@ -68,7 +68,6 @@ CONFIG_CMD_NVEDIT_EFI=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MTD=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_UFS=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
@@ -151,7 +150,7 @@ CONFIG_SPI_FLASH_MT35XU=y
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_SPI_FLASH_MTD=y
CONFIG_MULTIPLEXER=y
-CONFIG_SPL_MUX_MMIO=y
+CONFIG_MUX_MMIO=y
CONFIG_PHY_TI_DP83867=y
CONFIG_PHY_FIXED=y
CONFIG_TI_AM65_CPSW_NUSS=y
@@ -171,8 +170,6 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_RAM=y
CONFIG_SPL_RAM=y
-CONFIG_REMOTEPROC_TI_K3_DSP=y
-CONFIG_REMOTEPROC_TI_K3_R5F=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_RTC=y
CONFIG_RTC_EMULATION=y
diff --git a/configs/j721e_evm_r5_defconfig b/configs/j721e_evm_r5_defconfig
index 42000cc5dc5..c8324d4c068 100644
--- a/configs/j721e_evm_r5_defconfig
+++ b/configs/j721e_evm_r5_defconfig
@@ -26,7 +26,6 @@ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
CONFIG_SPL_BSS_START_ADDR=0x41cf59f0
CONFIG_SPL_BSS_MAX_SIZE=0xa000
CONFIG_SPL_STACK_R=y
-CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_SPL_SIZE_LIMIT=0xf59f0
CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x4000
CONFIG_SPL_FS_FAT=y
@@ -62,7 +61,6 @@ CONFIG_SPL_NOR_SUPPORT=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
@@ -73,7 +71,6 @@ CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -149,7 +146,6 @@ CONFIG_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR=y
CONFIG_DM_REGULATOR_TPS65941=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
diff --git a/configs/j721s2_evm_a72_defconfig b/configs/j721s2_evm_a72_defconfig
index ab943ebfab2..5e84abf8f21 100644
--- a/configs/j721s2_evm_a72_defconfig
+++ b/configs/j721s2_evm_a72_defconfig
@@ -64,7 +64,6 @@ CONFIG_SPL_THERMAL=y
CONFIG_SPL_YMODEM_SUPPORT=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MTD=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_UFS=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus"
@@ -161,8 +160,6 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_RAM=y
CONFIG_SPL_RAM=y
-CONFIG_REMOTEPROC_TI_K3_DSP=y
-CONFIG_REMOTEPROC_TI_K3_R5F=y
CONFIG_RESET_TI_SCI=y
CONFIG_SCSI=y
CONFIG_DM_SERIAL=y
diff --git a/configs/j721s2_evm_r5_defconfig b/configs/j721s2_evm_r5_defconfig
index 23ae991e2f6..6ea1d712be1 100644
--- a/configs/j721s2_evm_r5_defconfig
+++ b/configs/j721s2_evm_r5_defconfig
@@ -26,7 +26,6 @@ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
CONFIG_SPL_BSS_START_ADDR=0x41c76000
CONFIG_SPL_BSS_MAX_SIZE=0xa000
CONFIG_SPL_STACK_R=y
-CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_SPL_SIZE_LIMIT=0x80000
CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x4000
CONFIG_SPL_FS_FAT=y
@@ -63,7 +62,6 @@ CONFIG_SPL_NOR_SUPPORT=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
@@ -75,7 +73,6 @@ CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -149,7 +146,6 @@ CONFIG_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR=y
CONFIG_DM_REGULATOR_TPS65941=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
diff --git a/configs/j722s_evm_a53_defconfig b/configs/j722s_evm_a53_defconfig
index 667d633c899..2062eca0bf9 100644
--- a/configs/j722s_evm_a53_defconfig
+++ b/configs/j722s_evm_a53_defconfig
@@ -55,7 +55,6 @@ CONFIG_SPL_THERMAL=y
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_CMD_CLK=y
CONFIG_CMD_MTD=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_MTDPARTS=y
CONFIG_CMD_UBI=y
@@ -131,9 +130,6 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_DM_REGULATOR_GPIO=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
-CONFIG_REMOTEPROC_TI_K3_DSP=y
-CONFIG_REMOTEPROC_TI_K3_R5F=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
diff --git a/configs/j722s_evm_r5_defconfig b/configs/j722s_evm_r5_defconfig
index a78a66d33a7..d51b21d6d0a 100644
--- a/configs/j722s_evm_r5_defconfig
+++ b/configs/j722s_evm_r5_defconfig
@@ -49,7 +49,6 @@ CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
@@ -61,7 +60,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -113,7 +111,6 @@ CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_POWER_DOMAIN=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
diff --git a/configs/j784s4_evm_a72_defconfig b/configs/j784s4_evm_a72_defconfig
index f058e3b1c00..1ac2430d7d1 100644
--- a/configs/j784s4_evm_a72_defconfig
+++ b/configs/j784s4_evm_a72_defconfig
@@ -61,7 +61,6 @@ CONFIG_CMD_BOOTEFI_SELFTEST=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_NVEDIT_EFI=y
CONFIG_CMD_MTD=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
CONFIG_CMD_EFIDEBUG=y
CONFIG_OF_CONTROL=y
@@ -140,8 +139,6 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_RAM=y
CONFIG_SPL_RAM=y
-CONFIG_REMOTEPROC_TI_K3_DSP=y
-CONFIG_REMOTEPROC_TI_K3_R5F=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_RTC=y
CONFIG_RTC_EMULATION=y
diff --git a/configs/j784s4_evm_r5_defconfig b/configs/j784s4_evm_r5_defconfig
index b991ffb73be..a307055c5d0 100644
--- a/configs/j784s4_evm_r5_defconfig
+++ b/configs/j784s4_evm_r5_defconfig
@@ -55,7 +55,6 @@ CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
@@ -128,7 +127,6 @@ CONFIG_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR_TPS6287X=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_SERIAL=y
CONFIG_SOC_DEVICE=y
diff --git a/configs/kmcent2_defconfig b/configs/kmcent2_defconfig
index 4e37df2e614..76e98c9b2a4 100644
--- a/configs/kmcent2_defconfig
+++ b/configs/kmcent2_defconfig
@@ -60,6 +60,7 @@ CONFIG_ENV_ADDR_REDUND=0xebf00000
CONFIG_USE_ETHPRIME=y
CONFIG_ETHPRIME="fm1-mac5"
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BOOTCOUNT_BE=y
CONFIG_FSL_CAAM=y
CONFIG_DDR_CLK_FREQ=66666666
diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig
index 6b2fc2ec6e7..cf50e2d27d8 100644
--- a/configs/kmcoge5ne_defconfig
+++ b/configs/kmcoge5ne_defconfig
@@ -166,6 +166,7 @@ CONFIG_VERSION_VARIABLE=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_BOOTCOUNT_MEM=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BOOTCOUNT_BE=y
CONFIG_SYS_BR0_PRELIM_BOOL=y
CONFIG_SYS_BR0_PRELIM=0xF0001001
diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig
index 55e87b0215a..7638fc2f5cf 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -145,6 +145,7 @@ CONFIG_VERSION_VARIABLE=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_BOOTCOUNT_MEM=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BOOTCOUNT_BE=y
CONFIG_SYS_BR0_PRELIM_BOOL=y
CONFIG_SYS_BR0_PRELIM=0xF0001001
diff --git a/configs/kmopti2_defconfig b/configs/kmopti2_defconfig
index df419b01c68..1c750455fc6 100644
--- a/configs/kmopti2_defconfig
+++ b/configs/kmopti2_defconfig
@@ -152,6 +152,7 @@ CONFIG_VERSION_VARIABLE=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_BOOTCOUNT_MEM=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BR0_PRELIM_BOOL=y
CONFIG_SYS_BR0_PRELIM=0xF0001001
CONFIG_SYS_OR0_PRELIM=0xF0000E55
diff --git a/configs/kmsupx5_defconfig b/configs/kmsupx5_defconfig
index 1436860f1cc..5dd98175cd3 100644
--- a/configs/kmsupx5_defconfig
+++ b/configs/kmsupx5_defconfig
@@ -137,6 +137,7 @@ CONFIG_VERSION_VARIABLE=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_BOOTCOUNT_MEM=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BOOTCOUNT_BE=y
CONFIG_SYS_BR0_PRELIM_BOOL=y
CONFIG_SYS_BR0_PRELIM=0xF0001001
diff --git a/configs/kmtepr2_defconfig b/configs/kmtepr2_defconfig
index cce7a044aee..2b240b3380d 100644
--- a/configs/kmtepr2_defconfig
+++ b/configs/kmtepr2_defconfig
@@ -151,6 +151,7 @@ CONFIG_VERSION_VARIABLE=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_BOOTCOUNT_MEM=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BR0_PRELIM_BOOL=y
CONFIG_SYS_BR0_PRELIM=0xF0001001
CONFIG_SYS_OR0_PRELIM=0xF0000E55
diff --git a/configs/lxr2_defconfig b/configs/lxr2_defconfig
index 7ab817960a2..b41a6ed93fd 100644
--- a/configs/lxr2_defconfig
+++ b/configs/lxr2_defconfig
@@ -77,6 +77,7 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_ARP_TIMEOUT=200
CONFIG_BOUNCE_BUFFER=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run swupdate"
CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C4000
CONFIG_SYS_BOOTCOUNT_BE=y
CONFIG_DM_I2C=y
diff --git a/configs/m53menlo_defconfig b/configs/m53menlo_defconfig
index 6130cd8e466..ccd1cb7475b 100644
--- a/configs/m53menlo_defconfig
+++ b/configs/m53menlo_defconfig
@@ -79,6 +79,7 @@ CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="m53menlo"
CONFIG_VERSION_VARIABLE=y
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="if test ${mmcpart} -eq 1 ; then setenv mmcpart 2 ; else setenv mmcpart 1 ; fi ; boot"
CONFIG_SYS_BOOTCOUNT_MAGIC=0x0B01C041
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MXC=y
diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig
index 2e618d81544..87756cb26df 100644
--- a/configs/microblaze-generic_defconfig
+++ b/configs/microblaze-generic_defconfig
@@ -42,6 +42,8 @@ CONFIG_CMD_IMLS=y
CONFIG_CMD_SPL=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_MEMINFO_MAP=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_SAVES=y
CONFIG_BOOTP_BOOTFILESIZE=y
diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig
index d91c59ffe46..4ec8516015f 100644
--- a/configs/mx53ppd_defconfig
+++ b/configs/mx53ppd_defconfig
@@ -47,6 +47,7 @@ CONFIG_ARP_TIMEOUT=200
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_DM_BOOTCOUNT_I2C_EEPROM=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run doquiet; setenv partnum 1; run hasfirstboot || setenv partnum 2; run hasfirstboot || setenv partnum 0; if test ${partnum} != 0; then run swappartitions loadimage doboot; fi; run failbootcmd"
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MXC=y
CONFIG_I2C_MUX=y
diff --git a/configs/pg_wcom_expu1_defconfig b/configs/pg_wcom_expu1_defconfig
index 1120191585c..4b82b077ea7 100644
--- a/configs/pg_wcom_expu1_defconfig
+++ b/configs/pg_wcom_expu1_defconfig
@@ -73,6 +73,7 @@ CONFIG_HOSTNAME="EXPU1"
CONFIG_VERSION_VARIABLE=y
# CONFIG_SCSI_AHCI is not set
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BOOTCOUNT_BE=y
CONFIG_DDR_CLK_FREQ=50000000
CONFIG_SYS_FSL_DDR3=y
diff --git a/configs/pg_wcom_expu1_update_defconfig b/configs/pg_wcom_expu1_update_defconfig
index 772aa210fc2..53d54789687 100644
--- a/configs/pg_wcom_expu1_update_defconfig
+++ b/configs/pg_wcom_expu1_update_defconfig
@@ -71,6 +71,7 @@ CONFIG_HOSTNAME="EXPU1"
CONFIG_VERSION_VARIABLE=y
# CONFIG_SCSI_AHCI is not set
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BOOTCOUNT_BE=y
CONFIG_DDR_CLK_FREQ=50000000
CONFIG_SYS_FSL_DDR3=y
diff --git a/configs/pg_wcom_seli8_defconfig b/configs/pg_wcom_seli8_defconfig
index 6cde217a34c..731ca435089 100644
--- a/configs/pg_wcom_seli8_defconfig
+++ b/configs/pg_wcom_seli8_defconfig
@@ -73,6 +73,7 @@ CONFIG_HOSTNAME="SELI8"
CONFIG_VERSION_VARIABLE=y
# CONFIG_SCSI_AHCI is not set
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BOOTCOUNT_BE=y
CONFIG_DDR_CLK_FREQ=50000000
CONFIG_SYS_FSL_DDR3=y
diff --git a/configs/pg_wcom_seli8_update_defconfig b/configs/pg_wcom_seli8_update_defconfig
index e8afc95d607..2598e477ed5 100644
--- a/configs/pg_wcom_seli8_update_defconfig
+++ b/configs/pg_wcom_seli8_update_defconfig
@@ -71,6 +71,7 @@ CONFIG_HOSTNAME="SELI8"
CONFIG_VERSION_VARIABLE=y
# CONFIG_SCSI_AHCI is not set
CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BOOTCOUNT_BE=y
CONFIG_DDR_CLK_FREQ=50000000
CONFIG_SYS_FSL_DDR3=y
diff --git a/configs/phycore_am62ax_a53_defconfig b/configs/phycore_am62ax_a53_defconfig
index 421dd851506..8c4fcc3b144 100644
--- a/configs/phycore_am62ax_a53_defconfig
+++ b/configs/phycore_am62ax_a53_defconfig
@@ -67,7 +67,6 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_MTD=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_CACHE=y
@@ -143,8 +142,6 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_K3_SYSTEM_CONTROLLER=y
CONFIG_REMOTEPROC_TI_K3_ARM64=y
-CONFIG_REMOTEPROC_TI_K3_DSP=y
-CONFIG_REMOTEPROC_TI_K3_R5F=y
CONFIG_RESET_TI_SCI=y
CONFIG_DM_RTC=y
CONFIG_RTC_RV3028=y
diff --git a/configs/phycore_am62ax_r5_defconfig b/configs/phycore_am62ax_r5_defconfig
index a71ebf0dc2c..25d2d9babba 100644
--- a/configs/phycore_am62ax_r5_defconfig
+++ b/configs/phycore_am62ax_r5_defconfig
@@ -49,7 +49,6 @@ CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x80000
CONFIG_SPL_THERMAL=y
@@ -59,7 +58,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -112,7 +110,6 @@ CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_POWER_DOMAIN=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
diff --git a/configs/phycore_am62x_r5_defconfig b/configs/phycore_am62x_r5_defconfig
index 25adca467b5..f157103be4a 100644
--- a/configs/phycore_am62x_r5_defconfig
+++ b/configs/phycore_am62x_r5_defconfig
@@ -55,7 +55,6 @@ CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
@@ -66,7 +65,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_CMD_FAT=y
@@ -114,7 +112,6 @@ CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_POWER_DOMAIN=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
diff --git a/configs/phycore_am64x_r5_defconfig b/configs/phycore_am64x_r5_defconfig
index 6b0fd8d1402..2552479713f 100644
--- a/configs/phycore_am64x_r5_defconfig
+++ b/configs/phycore_am64x_r5_defconfig
@@ -7,6 +7,7 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_SOC_K3_AM642=y
CONFIG_TARGET_PHYCORE_AM64X_R5=y
+CONFIG_PHYTEC_SOM_DETECTION=y
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x7019b800
CONFIG_SF_DEFAULT_SPEED=25000000
@@ -15,6 +16,7 @@ CONFIG_ENV_SIZE=0x20000
CONFIG_DM_GPIO=y
CONFIG_SPL_DM_SPI=y
CONFIG_DEFAULT_DEVICE_TREE="k3-am642-r5-phycore-som-2gb"
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_DM_RESET=y
CONFIG_SPL_MMC=y
CONFIG_SPL_SERIAL=y
@@ -59,7 +61,6 @@ CONFIG_SPL_NET_VCI_STRING="AM64X U-Boot R5 SPL"
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
# CONFIG_SPL_SPI_FLASH_TINY is not set
CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
@@ -71,7 +72,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_SETEXPR is not set
@@ -138,7 +138,6 @@ CONFIG_SPL_DM_REGULATOR=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SPL_DM_REGULATOR_GPIO=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig
index 162b1f1c748..fd2727e48d7 100644
--- a/configs/pxm2_defconfig
+++ b/configs/pxm2_defconfig
@@ -85,6 +85,7 @@ CONFIG_SPL_DM=y
# CONFIG_SPL_BLK is not set
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_DFU_NAND=y
CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000
CONFIG_DM_I2C=y
diff --git a/configs/rut_defconfig b/configs/rut_defconfig
index dd8df542aa3..b2930e8044d 100644
--- a/configs/rut_defconfig
+++ b/configs/rut_defconfig
@@ -86,6 +86,7 @@ CONFIG_SPL_DM=y
# CONFIG_SPL_BLK is not set
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_DFU_NAND=y
CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000
CONFIG_DM_I2C=y
diff --git a/configs/smegw01_defconfig b/configs/smegw01_defconfig
index 6dc95e551e3..ae6c9b60cd5 100644
--- a/configs/smegw01_defconfig
+++ b/configs/smegw01_defconfig
@@ -60,6 +60,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_BOUNCE_BUFFER=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_ENV=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="echo Performing rollback...; if test \"${mmcpart_committed}\" = 1; then setenv mmcpart 2; setenv mmcpart_committed 2; else setenv mmcpart 1; setenv mmcpart_committed 1; fi; setenv bootcount 0; setenv upgrade_available; setenv ustate 3; saveenv; run bootcmd;"
CONFIG_DFU_MMC=y
CONFIG_DM_I2C=y
CONFIG_SUPPORT_EMMC_BOOT=y
diff --git a/configs/socfpga_secu1_defconfig b/configs/socfpga_secu1_defconfig
index dc6d66ade23..84badec60aa 100644
--- a/configs/socfpga_secu1_defconfig
+++ b/configs/socfpga_secu1_defconfig
@@ -74,6 +74,7 @@ CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_DM_BOOTCOUNT_RTC=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd;"
CONFIG_DWAPB_GPIO=y
CONFIG_DM_I2C=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
diff --git a/configs/stm32mp13_dhcor_defconfig b/configs/stm32mp13_dhcor_defconfig
index ff948b904be..4dc3954128d 100644
--- a/configs/stm32mp13_dhcor_defconfig
+++ b/configs/stm32mp13_dhcor_defconfig
@@ -44,3 +44,4 @@ CONFIG_OPTEE=y
CONFIG_USB_ONBOARD_HUB=y
CONFIG_USB_HUB_DEBOUNCE_TIMEOUT=2000
CONFIG_ERRNO_STR=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="
diff --git a/configs/stm32mp15_dhcom_basic_defconfig b/configs/stm32mp15_dhcom_basic_defconfig
index a28f2862048..f89c921925d 100644
--- a/configs/stm32mp15_dhcom_basic_defconfig
+++ b/configs/stm32mp15_dhcom_basic_defconfig
@@ -8,3 +8,4 @@ CONFIG_SYS_MEMTEST_END=0xc4000000
CONFIG_SYS_I2C_EEPROM_BUS=3
CONFIG_OF_LIST="st/stm32mp157c-dhcom-pdk2 st/stm32mp153c-dhcom-drc02 st/stm32mp157c-dhcom-picoitx"
CONFIG_SYS_I2C_EEPROM_ADDR=0x50
+CONFIG_BOOTCOUNT_ALTBOOTCMD="
diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig
index f6f2af6e7a2..bde668761b3 100644
--- a/configs/stm32mp15_dhcor_basic_defconfig
+++ b/configs/stm32mp15_dhcor_basic_defconfig
@@ -8,3 +8,4 @@ CONFIG_OF_LIST="st/stm32mp157a-dhcor-avenger96 st/stm32mp151a-dhcor-testbench st
CONFIG_SYS_I2C_EEPROM_ADDR=0x53
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="
diff --git a/configs/tuge1_defconfig b/configs/tuge1_defconfig
index d1b771993cf..ab0fd12bc48 100644
--- a/configs/tuge1_defconfig
+++ b/configs/tuge1_defconfig
@@ -137,6 +137,7 @@ CONFIG_VERSION_VARIABLE=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_BOOTCOUNT_MEM=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BOOTCOUNT_BE=y
CONFIG_SYS_BR0_PRELIM_BOOL=y
CONFIG_SYS_BR0_PRELIM=0xF0001001
diff --git a/configs/tuxx1_defconfig b/configs/tuxx1_defconfig
index 1dc737e4954..e5a99b24dab 100644
--- a/configs/tuxx1_defconfig
+++ b/configs/tuxx1_defconfig
@@ -151,6 +151,7 @@ CONFIG_VERSION_VARIABLE=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_DM_BOOTCOUNT=y
CONFIG_BOOTCOUNT_MEM=y
+CONFIG_BOOTCOUNT_ALTBOOTCMD="run bootcmd"
CONFIG_SYS_BR0_PRELIM_BOOL=y
CONFIG_SYS_BR0_PRELIM=0xF0001001
CONFIG_SYS_OR0_PRELIM=0xF0000E55
diff --git a/configs/verdin-am62_a53_defconfig b/configs/verdin-am62_a53_defconfig
index e7a88c9788d..ecd3284faaf 100644
--- a/configs/verdin-am62_a53_defconfig
+++ b/configs/verdin-am62_a53_defconfig
@@ -76,7 +76,6 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_READ=y
-CONFIG_CMD_REMOTEPROC=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_BOOTCOUNT=y
diff --git a/configs/verdin-am62_r5_defconfig b/configs/verdin-am62_r5_defconfig
index d4f904ac07d..9ac4b534f6c 100644
--- a/configs/verdin-am62_r5_defconfig
+++ b/configs/verdin-am62_r5_defconfig
@@ -48,14 +48,12 @@ CONFIG_SPL_DM_MAILBOX=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_RAM_DEVICE=y
-CONFIG_SPL_REMOTEPROC=y
CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_REMOTEPROC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_TIME=y
CONFIG_OF_CONTROL=y
@@ -97,7 +95,6 @@ CONFIG_PINCTRL_SINGLE=y
CONFIG_POWER_DOMAIN=y
CONFIG_TI_POWER_DOMAIN=y
CONFIG_K3_SYSTEM_CONTROLLER=y
-CONFIG_REMOTEPROC_TI_K3_ARM64=y
CONFIG_RESET_TI_SCI=y
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y
diff --git a/configs/vexpress_fvp_bloblist_defconfig b/configs/vexpress_fvp_bloblist_defconfig
new file mode 100644
index 00000000000..dcc87db8723
--- /dev/null
+++ b/configs/vexpress_fvp_bloblist_defconfig
@@ -0,0 +1,5 @@
+#include <configs/vexpress_fvp_defconfig>
+
+CONFIG_BLOBLIST=y
+CONFIG_BLOBLIST_PASSAGE=y
+CONFIG_BLOBLIST_SIZE_RELOC=0x10000
diff --git a/configs/xilinx_versal_mini_ospi_defconfig b/configs/xilinx_versal_mini_ospi_defconfig
index 9af3817c82f..e1cdc186fb4 100644
--- a/configs/xilinx_versal_mini_ospi_defconfig
+++ b/configs/xilinx_versal_mini_ospi_defconfig
@@ -7,7 +7,7 @@ CONFIG_SYS_MALLOC_LEN=0x2000
CONFIG_SYS_MALLOC_F_LEN=0x500
CONFIG_NR_DRAM_BANKS=1
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xFFFE0000
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xFFFFFE00
CONFIG_SF_DEFAULT_SPEED=30000000
CONFIG_ENV_SIZE=0x80
# CONFIG_DM_GPIO is not set
diff --git a/configs/xilinx_versal_net_virt_defconfig b/configs/xilinx_versal_net_virt_defconfig
index 30d79ab8c8c..5ef5fd44fd3 100644
--- a/configs/xilinx_versal_net_virt_defconfig
+++ b/configs/xilinx_versal_net_virt_defconfig
@@ -32,6 +32,8 @@ CONFIG_CMD_SMBIOS=y
CONFIG_CMD_BOOTMENU=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_NVEDIT_EFI=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_MEMINFO_MAP=y
CONFIG_CMD_MEMTEST=y
CONFIG_SYS_ALT_MEMTEST=y
CONFIG_CMD_SHA1SUM=y
@@ -44,10 +46,7 @@ CONFIG_MMC_SPEED_MODE_SET=y
CONFIG_CMD_MTD=y
CONFIG_CMD_SF_TEST=y
CONFIG_CMD_USB=y
-CONFIG_BOOTP_MAY_FAIL=y
-CONFIG_BOOTP_BOOTFILESIZE=y
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_NFS=y
+CONFIG_WGET_HTTPS=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EFIDEBUG=y
CONFIG_CMD_TIME=y
@@ -69,9 +68,7 @@ CONFIG_ENV_IS_IN_FAT=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_NETCONSOLE=y
-CONFIG_IP_DEFRAG=y
-CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
+CONFIG_NET_LWIP=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_TFTP_BLOCKSIZE=4096
CONFIG_SIMPLE_PM_BUS=y
@@ -102,6 +99,7 @@ CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_ISSI=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SPI_FLASH_S28HX_T=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_MT35XU=y
CONFIG_SPI_FLASH_SST=y
@@ -152,4 +150,5 @@ CONFIG_USB_FUNCTION_THOR=y
CONFIG_VIRTIO_MMIO=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_BLK=y
+CONFIG_MBEDTLS_LIB=y
CONFIG_TPM=y
diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig
index fb757c1067d..f228eef7c95 100644
--- a/configs/xilinx_versal_virt_defconfig
+++ b/configs/xilinx_versal_virt_defconfig
@@ -38,6 +38,8 @@ CONFIG_CMD_SMBIOS=y
CONFIG_CMD_BOOTMENU=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_NVEDIT_EFI=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_MEMINFO_MAP=y
CONFIG_CMD_MEMTEST=y
CONFIG_SYS_ALT_MEMTEST=y
CONFIG_CMD_SHA1SUM=y
@@ -50,10 +52,7 @@ CONFIG_MMC_SPEED_MODE_SET=y
CONFIG_CMD_MTD=y
CONFIG_CMD_SF_TEST=y
CONFIG_CMD_USB=y
-CONFIG_BOOTP_MAY_FAIL=y
-CONFIG_BOOTP_BOOTFILESIZE=y
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_NFS=y
+CONFIG_WGET_HTTPS=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EFIDEBUG=y
CONFIG_CMD_TIME=y
@@ -73,9 +72,7 @@ CONFIG_ENV_IS_IN_FAT=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_NETCONSOLE=y
-CONFIG_IP_DEFRAG=y
-CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
+CONFIG_NET_LWIP=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_TFTP_BLOCKSIZE=4096
CONFIG_SIMPLE_PM_BUS=y
@@ -112,6 +109,7 @@ CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_ISSI=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SPI_FLASH_S28HX_T=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_MT35XU=y
CONFIG_SPI_FLASH_SST=y
@@ -167,4 +165,6 @@ CONFIG_USB_FUNCTION_THOR=y
CONFIG_VIRTIO_MMIO=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_BLK=y
+CONFIG_MBEDTLS_LIB=y
CONFIG_TPM=y
+CONFIG_TOOLS_MKFWUMDATA=y
diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig
index ed3d1019485..fdf8bb36129 100644
--- a/configs/xilinx_zynq_virt_defconfig
+++ b/configs/xilinx_zynq_virt_defconfig
@@ -56,6 +56,8 @@ CONFIG_CMD_IMLS=y
CONFIG_CMD_THOR_DOWNLOAD=y
CONFIG_THOR_RESET_OFF=y
CONFIG_CMD_GREPENV=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_MEMINFO_MAP=y
CONFIG_CMD_MEMTEST=y
CONFIG_SYS_ALT_MEMTEST=y
CONFIG_CMD_DFU=y
@@ -71,9 +73,6 @@ CONFIG_CMD_MTD=y
CONFIG_CMD_NAND_LOCK_UNLOCK=y
CONFIG_CMD_SF_TEST=y
CONFIG_CMD_USB=y
-CONFIG_BOOTP_MAY_FAIL=y
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_NFS=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EFIDEBUG=y
CONFIG_CMD_TIME=y
@@ -92,8 +91,7 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_NETCONSOLE=y
-CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
+CONFIG_NET_LWIP=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_SIMPLE_PM_BUS=y
@@ -158,4 +156,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x0300
CONFIG_CI_UDC=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_SYS_TIMER_COUNTS_DOWN=y
+CONFIG_MBEDTLS_LIB=y
CONFIG_SPL_GZIP=y
diff --git a/configs/xilinx_zynqmp_kria_defconfig b/configs/xilinx_zynqmp_kria_defconfig
index a68bd522f90..ad46c091c4a 100644
--- a/configs/xilinx_zynqmp_kria_defconfig
+++ b/configs/xilinx_zynqmp_kria_defconfig
@@ -63,6 +63,8 @@ CONFIG_CMD_SMBIOS=y
CONFIG_CMD_BOOTMENU=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_NVEDIT_EFI=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_MEMINFO_MAP=y
CONFIG_CMD_MEMTEST=y
CONFIG_SYS_ALT_MEMTEST=y
CONFIG_CMD_SHA1SUM=y
@@ -82,11 +84,7 @@ CONFIG_CMD_SDRAM=y
CONFIG_CMD_SF_TEST=y
CONFIG_CMD_SPI=y
CONFIG_CMD_USB=y
-CONFIG_CMD_USB_MASS_STORAGE=y
-CONFIG_BOOTP_MAY_FAIL=y
-CONFIG_BOOTP_BOOTFILESIZE=y
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_NFS=y
+CONFIG_WGET_HTTPS=y
CONFIG_CMD_BMP=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EFIDEBUG=y
@@ -118,8 +116,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_ENV_FAT_DEVICE_AND_PART=":auto"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_NETCONSOLE=y
-CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
+CONFIG_NET_LWIP=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_SIMPLE_PM_BUS=y
@@ -129,7 +126,6 @@ CONFIG_SATA_CEVA=y
CONFIG_BUTTON=y
CONFIG_BUTTON_GPIO=y
CONFIG_CLK_ZYNQMP=y
-CONFIG_DFU_TFTP=y
CONFIG_DFU_TIMEOUT=y
CONFIG_DFU_MMC=y
CONFIG_DFU_MTD=y
@@ -138,10 +134,6 @@ CONFIG_DFU_SF=y
CONFIG_SYS_DFU_DATA_BUF_SIZE=0x1800000
CONFIG_DMA=y
CONFIG_XILINX_DPDMA=y
-CONFIG_USB_FUNCTION_FASTBOOT=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
-CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ARM_FFA_TRANSPORT=y
CONFIG_FPGA_XILINX=y
CONFIG_FPGA_ZYNQMPPL=y
@@ -229,5 +221,6 @@ CONFIG_VIRTIO_BLK=y
# CONFIG_BINMAN_FDT is not set
CONFIG_BINMAN_DTB="./arch/arm/dts/zynqmp-binman-som.dtb"
CONFIG_PANIC_HANG=y
+CONFIG_MBEDTLS_LIB=y
CONFIG_TPM=y
CONFIG_SPL_GZIP=y
diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig
index b13079cdf70..036268c79f7 100644
--- a/configs/xilinx_zynqmp_virt_defconfig
+++ b/configs/xilinx_zynqmp_virt_defconfig
@@ -59,10 +59,10 @@ CONFIG_SPL_ATF=y
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
CONFIG_CMD_SMBIOS=y
CONFIG_CMD_BOOTMENU=y
-CONFIG_CMD_THOR_DOWNLOAD=y
-CONFIG_THOR_RESET_OFF=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_NVEDIT_EFI=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_MEMINFO_MAP=y
CONFIG_CMD_MEMTEST=y
CONFIG_SYS_ALT_MEMTEST=y
CONFIG_CMD_SHA1SUM=y
@@ -84,11 +84,7 @@ CONFIG_CMD_SDRAM=y
CONFIG_CMD_SF_TEST=y
CONFIG_CMD_SPI=y
CONFIG_CMD_USB=y
-CONFIG_CMD_USB_MASS_STORAGE=y
-CONFIG_BOOTP_MAY_FAIL=y
-CONFIG_BOOTP_BOOTFILESIZE=y
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_NFS=y
+CONFIG_WGET_HTTPS=y
CONFIG_CMD_BMP=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EFIDEBUG=y
@@ -119,8 +115,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_ENV_FAT_DEVICE_AND_PART=":auto"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_NETCONSOLE=y
-CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
+CONFIG_NET_LWIP=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_SIMPLE_PM_BUS=y
@@ -130,7 +125,6 @@ CONFIG_SATA_CEVA=y
CONFIG_BUTTON=y
CONFIG_BUTTON_GPIO=y
CONFIG_CLK_ZYNQMP=y
-CONFIG_DFU_TFTP=y
CONFIG_DFU_TIMEOUT=y
CONFIG_DFU_MMC=y
CONFIG_DFU_MTD=y
@@ -138,10 +132,6 @@ CONFIG_DFU_NAND=y
CONFIG_DFU_RAM=y
CONFIG_DFU_SF=y
CONFIG_SYS_DFU_DATA_BUF_SIZE=0x1800000
-CONFIG_USB_FUNCTION_FASTBOOT=y
-CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
-CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_ARM_FFA_TRANSPORT=y
CONFIG_FPGA_XILINX=y
CONFIG_FPGA_ZYNQMPPL=y
@@ -245,5 +235,7 @@ CONFIG_VIRTIO_BLK=y
# CONFIG_BINMAN_FDT is not set
CONFIG_BINMAN_DTB="./arch/arm/dts/zynqmp-binman.dtb"
CONFIG_PANIC_HANG=y
+CONFIG_MBEDTLS_LIB=y
CONFIG_TPM=y
CONFIG_SPL_GZIP=y
+CONFIG_TOOLS_MKFWUMDATA=y
diff --git a/doc/board/armltd/vexpress64.rst b/doc/board/armltd/vexpress64.rst
index a7f771d2667..4dadadb53dc 100644
--- a/doc/board/armltd/vexpress64.rst
+++ b/doc/board/armltd/vexpress64.rst
@@ -43,6 +43,22 @@ Juno is an Arm development board with the following features:
More details can be found in the board documentation [3]_.
+Bloblist Support
+----------------
+
+The ``vexpress_fvp_bloblist_defconfig`` configures U-Boot to be compiled for
+Vexpress64 with Bloblist as the primary method for information handoff between
+boot stages. U-Boot offers three methods to set up a bloblist: using a
+predefined bloblist at a specified address, dynamically allocating memory for a
+bloblist, or utilizing a standard passage-provided bloblist with automatic size
+detection.
+
+By default, ``vexpress_fvp_bloblist_defconfig`` uses the standard passage method
+(CONFIG_BLOBLIST_PASSAGE) because TF-A provides a Transfer List in non-secure
+memory that U-Boot can utilise. This Bloblist, which is referred to as a Transfer List in
+TF-A, contains all necessary data for the handoff process, including DT and ACPI
+tables.
+
References
----------
diff --git a/doc/develop/release_cycle.rst b/doc/develop/release_cycle.rst
index 9ecd6b6ab87..03deea2af1a 100644
--- a/doc/develop/release_cycle.rst
+++ b/doc/develop/release_cycle.rst
@@ -55,7 +55,7 @@ Current Status
* The Merge Window for the next release (v2025.04) is **closed**.
-* The next branch is now **closed** until the -rc2 release on Mon 10 February
+* The next branch is now **open** with the -rc2 release on Mon 10 February
2025.
* Release "v2025.04" is scheduled for 07 April 2025.
@@ -70,7 +70,7 @@ For the next scheduled release, release candidates were made on::
* U-Boot v2025.04-rc1 was released on Mon 27 January 2025.
-.. * U-Boot v2025.04-rc2 was released on Mon 10 February 2025.
+* U-Boot v2025.04-rc2 was released on Mon 10 February 2025.
.. * U-Boot v2025.04-rc3 was released on Mon 24 February 2025.
diff --git a/doc/develop/tests_writing.rst b/doc/develop/tests_writing.rst
index 54efb7e1b04..5f3c43d5da2 100644
--- a/doc/develop/tests_writing.rst
+++ b/doc/develop/tests_writing.rst
@@ -261,7 +261,7 @@ with the suite. For example, to add a new mem_search test::
/* Test 'ms' command with 32-bit values */
static int mem_test_ms_new_thing(struct unit_test_state *uts)
{
- /* test code here*/
+ /* test code here */
return 0;
}
@@ -291,32 +291,20 @@ suite. For example::
/* Declare a new wibble test */
#define WIBBLE_TEST(_name, _flags) UNIT_TEST(_name, _flags, wibble_test)
- /* Tetss go here */
-
- /* At the bottom of the file: */
-
- int do_ut_wibble(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
- {
- struct unit_test *tests = UNIT_TEST_SUITE_START(wibble_test);
- const int n_ents = UNIT_TEST_SUITE_COUNT(wibble_test);
-
- return cmd_ut_category("cmd_wibble", "wibble_test_", tests, n_ents, argc, argv);
- }
+ /* Tests go here */
Then add new tests to it as above.
Register this new suite in test/cmd_ut.c by adding to cmd_ut_sub[]::
- /* Within cmd_ut_sub[]... */
-
- U_BOOT_CMD_MKENT(wibble, CONFIG_SYS_MAXARGS, 1, do_ut_wibble, "", ""),
+ /* with the other SUITE_DECL() declarations */
+ SUITE_DECL(wibble);
-and adding new help to ut_help_text[]::
+ /* Within suites[]... */
+ SUITE(wibble, "my test of wibbles");
- "ut wibble - Test the wibble feature\n"
-
-If your feature is conditional on a particular Kconfig, then you can use #ifdef
-to control that.
+If your feature is conditional on a particular Kconfig, you do not need to add
+an #ifdef since the suite will automatically be compiled out in that case.
Finally, add the test to the build by adding to the Makefile in the same
directory::
@@ -326,17 +314,35 @@ directory::
Note that CMDLINE is never enabled in SPL, so this test will only be present in
U-Boot proper. See below for how to do SPL tests.
-As before, you can add an extra Kconfig check if needed::
+You can add an extra Kconfig check if needed::
ifneq ($(CONFIG_$(XPL_)WIBBLE),)
obj-$(CONFIG_$(XPL_)CMDLINE) += wibble.o
endif
+Each suite can have an optional init and uninit function. These are run before
+and after any suite tests, respectively::
+
+ #define WIBBLE_TEST_INIT(_name, _flags) UNIT_TEST_INIT(_name, _flags, wibble_test)
+ #define WIBBLE_TEST_UNINIT(_name, _flags) UNIT_TEST_UNINIT(_name, _flags, wibble_test)
-Example commit: 919e7a8fb64 ("test: Add a simple test for bloblist") [1]
+ static int wibble_test_init(struct unit_test_state *uts)
+ {
+ /* init code here */
+
+ return 0;
+ }
+ WIBBLE_TEST_INIT(wibble_test_init, 0);
-[1] https://gitlab.denx.de/u-boot/u-boot/-/commit/919e7a8fb64
+ static int wibble_test_uninit(struct unit_test_state *uts)
+ {
+ /* uninit code here */
+
+ return 0;
+ }
+ WIBBLE_TEST_INIT(wibble_test_uninit, 0);
+Both functions are included in the totals for each suite.
Making the test run from pytest
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/device-tree-bindings/leds/common.txt b/doc/device-tree-bindings/leds/common.txt
deleted file mode 100644
index 2d88816dd55..00000000000
--- a/doc/device-tree-bindings/leds/common.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Common leds properties.
-
-Optional properties for child nodes:
-- label : The label for this LED. If omitted, the label is
- taken from the node name (excluding the unit address).
-
-- linux,default-trigger : This parameter, if present, is a
- string defining the trigger assigned to the LED. Current triggers are:
- "backlight" - LED will act as a back-light, controlled by the framebuffer
- system
- "default-on" - LED will turn on (but for leds-gpio see "default-state"
- property in Documentation/devicetree/bindings/gpio/led.txt)
- "heartbeat" - LED "double" flashes at a load average based rate
- "ide-disk" - LED indicates disk activity
- "timer" - LED flashes at a fixed, configurable rate
-
-Examples:
-
-system-status {
- label = "Status";
- linux,default-trigger = "heartbeat";
- ...
-};
diff --git a/doc/usage/cmd/ut.rst b/doc/usage/cmd/ut.rst
index e794922c806..1acf3126680 100644
--- a/doc/usage/cmd/ut.rst
+++ b/doc/usage/cmd/ut.rst
@@ -11,34 +11,44 @@ Synopsis
::
- ut [-r<runs>] [-fs] [-I<n>:<one_test>] [<suite> [<test>]]
-
- <runs> Number of times to run each test
- -f Force 'manual' tests to run as well
- <n> Run <one test> after <n> other tests have run
- <one_test> Name of the 'one' test to run
- <suite> Test suite to run, or `all`
- <test> Name of single test to run
+ ut [-r<runs>] [-f] [-I<n>:<one_test>] [-r<n>] [<suite> | 'all' [<test>]]
+ ut [-s] info
Description
-----------
The ut command runs unit tests written in C.
+suite
+ Specifies the suite to run, This can be a single suite, or a comma-separated
+ list
+
+test
+ Speciifes a particular test to run, within a suite, or all suites
+
+-f
+ Forces running of a manual test.
+
+-r <n>
+ Specifies the number of types to run each test
+
+-I <n>:<one_test>
+ Test to run after <n> other tests have run. This is used to find which test
+ causes another test to fail. If the one test fails, testing stops
+ immediately.
+
Typically the command is run on :ref:`arch/sandbox/sandbox:sandbox` since it
includes a near-complete set of emulators, no code-size limits, many CONFIG
options enabled and runs easily in CI without needing QEMU. It is also possible
to run some tests on real boards.
-For a list of available test suites, type `ut info -s`.
-
Each test is normally run once, although those marked with `UTF_DM` are
run with livetree and flattree where possible. To run a test more than once,
use the `-r` flag.
Manual tests are normally skipped by this command. Use `-f` to run them. See
-See :ref:`develop/tests_writing:mixing python and c` for more information on
-manual test.
+:ref:`develop/tests_writing:mixing python and c` for more information on manual
+tests.
When running unit tests, some may have side effects which cause a subsequent
test to break. This can sometimes be seen when using 'ut dm' or similar. To
@@ -50,9 +60,22 @@ the problem.
Generally all tests in the suite are run. To run just a single test from the
suite, provide the <test> argument.
+To specify a list of suites to run, <suites> can also be a comma-separated list.
+
See :ref:`develop/tests_writing:writing c tests` for more information on how to
write unit tests.
+ut all
+~~~~~~
+
+Instead of a suite name 'all' may be used to run all tests.
+
+ut info
+~~~~~~~
+
+This provides information about the total number of suites and tests. Use the
+`-s` flag to show a detailed list of suites.
+
Example
-------
@@ -97,26 +120,84 @@ List available unit-test suites::
Run one of the suites::
- => ut bloblist
- Running 14 bloblist tests
- Test: bloblist_test_align: bloblist.c
- Test: bloblist_test_bad_blob: bloblist.c
- Test: bloblist_test_blob: bloblist.c
- Test: bloblist_test_blob_ensure: bloblist.c
- Test: bloblist_test_blob_maxsize: bloblist.c
- Test: bloblist_test_checksum: bloblist.c
- Test: bloblist_test_cmd_info: bloblist.c
- Test: bloblist_test_cmd_list: bloblist.c
- Test: bloblist_test_grow: bloblist.c
- Test: bloblist_test_init: bloblist.c
- Test: bloblist_test_reloc: bloblist.c
- Test: bloblist_test_resize_fail: bloblist.c
- Test: bloblist_test_resize_last: bloblist.c
- Test: bloblist_test_shrink: bloblist.c
- Failures: 0
+ => ut common
+ Running 14 common tests
+ Test: cli_ch_test: cread.c
+ Test: cread_test: cread.c
+ Test: dm_test_cyclic_running: cyclic.c
+ Test: print_display_buffer: print.c
+ Test: print_do_hex_dump: print.c
+ Test: print_efi_ut: print.c
+ Test: print_guid: print.c
+ Test: print_hexdump_line: print.c
+ Test: print_printf: print.c
+ Test: snprint: print.c
+ Test: test_autoboot: test_autoboot.c
+ Enter password "a" in 1 seconds to stop autoboot
+ Enter password "a" in 1 seconds to stop autoboot
+ Enter password "a" in 1 seconds to stop autoboot
+ Enter password "a" in 1 seconds to stop autoboot
+ Enter password "a" in 1 seconds to stop autoboot
+ Enter password "a" in 1 seconds to stop autoboot
+ Autoboot password unlock not successful
+ Test: test_event_base: event.c
+ Test: test_event_probe: event.c
+ Test: test_event_probe: event.c (flat tree)
+ Test: test_event_simple: event.c
+ Tests run: 14, 2611 ms, average 186 ms, skipped: 2, failures: 0
Run just a single test in a suite::
- => ut bloblist bloblist_test_grow
- Test: bloblist_test_grow: bloblist.c
- Failures: 0
+ => ut fdt_overlay change_int_property
+ Test: fdt_overlay_init: cmd_ut_fdt_overlay.c
+ Test: change_int_property: cmd_ut_fdt_overlay.c
+ Tests run: 2, 0 ms, average 0 ms, failures: 0
+
+Run a selection of three suites::
+
+ => ut bloblist,mem,fdt_overlay
+ Running 14 bloblist tests
+ Test: align: bloblist.c
+ Test: bad_blob: bloblist.c
+ Test: blob: bloblist.c
+ Test: blob_ensure: bloblist.c
+ Test: blob_maxsize: bloblist.c
+ Test: checksum: bloblist.c
+ Test: cmd_info: bloblist.c
+ Test: cmd_list: bloblist.c
+ Test: grow: bloblist.c
+ Test: init: bloblist.c
+ Test: reloc: bloblist.c
+ Test: resize_fail: bloblist.c
+ Test: resize_last: bloblist.c
+ Test: shrink: bloblist.c
+ Tests run: 14, 1 ms, average: 0 ms, failures: 0
+ Running 13 mem tests
+ Test: cp_b: mem_copy.c
+ Test: cp_l: mem_copy.c
+ Test: cp_q: mem_copy.c
+ Test: cp_w: mem_copy.c
+ Test: ms_b: mem_search.c
+ Test: ms_cont: mem_search.c
+ Test: ms_cont_end: mem_search.c
+ Test: ms_l: mem_search.c
+ Test: ms_limit: mem_search.c
+ Test: ms_mult: mem_search.c
+ Test: ms_quiet: mem_search.c
+ Test: ms_s: mem_search.c
+ Test: ms_w: mem_search.c
+ Tests run: 13, 13 ms, average: 1 ms, failures: 0
+ Running 10 fdt_overlay tests
+ Test: fdt_overlay_init: cmd_ut_fdt_overlay.c
+ Test: add_node_by_path: cmd_ut_fdt_overlay.c
+ Test: add_node_by_phandle: cmd_ut_fdt_overlay.c
+ Test: add_str_property: cmd_ut_fdt_overlay.c
+ Test: add_subnode_property: cmd_ut_fdt_overlay.c
+ Test: change_int_property: cmd_ut_fdt_overlay.c
+ Test: change_str_property: cmd_ut_fdt_overlay.c
+ Test: local_phandle: cmd_ut_fdt_overlay.c
+ Test: local_phandles: cmd_ut_fdt_overlay.c
+ Test: stacked: cmd_ut_fdt_overlay.c
+ Tests run: 10, 12 ms, average: 1 ms, failures: 0
+ Suites run: 3, total tests run: 37, 26 ms, average: 0 ms, failures: 0
+ Average test time: 0 ms, worst case 'mem' took 1 ms
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index 0080d2a165c..99b6c7534fd 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -183,6 +183,9 @@ config BOOTCOUNT_BOOTLIMIT
counter being cleared.
If set to 0, do not set a boot limit in the environment.
+config BOOTCOUNT_ALTBOOTCMD
+ string "Alternative boot command when BOOTLIMIT is reached"
+
config SYS_BOOTCOUNT_SINGLEWORD
bool "Use single word to pack boot count and magic value"
depends on BOOTCOUNT_GENERIC
diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
index 1f6782537de..f88267e01b6 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -33,9 +33,9 @@ static void fpga_no_sup(char *fn, char *msg)
/* fpga_get_desc
* map a device number to a descriptor
*/
-const fpga_desc *const fpga_get_desc(int devnum)
+const fpga_desc *fpga_get_desc(int devnum)
{
- fpga_desc *desc = (fpga_desc *)NULL;
+ const fpga_desc *desc = NULL;
if ((devnum >= 0) && (devnum < next_desc)) {
desc = &desc_table[devnum];
@@ -50,8 +50,8 @@ const fpga_desc *const fpga_get_desc(int devnum)
* fpga_validate
* generic parameter checking code
*/
-const fpga_desc *const fpga_validate(int devnum, const void *buf,
- size_t bsize, char *fn)
+const fpga_desc *fpga_validate(int devnum, const void *buf,
+ size_t bsize, char *fn)
{
const fpga_desc *desc = fpga_get_desc(devnum);
@@ -60,7 +60,7 @@ const fpga_desc *const fpga_validate(int devnum, const void *buf,
if (!buf) {
printf("%s: Null buffer.\n", fn);
- return (fpga_desc * const)NULL;
+ return NULL;
}
return desc;
}
@@ -72,7 +72,7 @@ const fpga_desc *const fpga_validate(int devnum, const void *buf,
static int fpga_dev_info(int devnum)
{
int ret_val = FPGA_FAIL; /* assume failure */
- const fpga_desc * const desc = fpga_get_desc(devnum);
+ const fpga_desc *desc = fpga_get_desc(devnum);
if (desc) {
debug("%s: Device Descriptor @ 0x%p\n",
@@ -374,7 +374,7 @@ int fpga_info(int devnum)
#if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE)
int fpga_compatible2flag(int devnum, const char *compatible)
{
- const fpga_desc * const desc = fpga_get_desc(devnum);
+ const fpga_desc *desc = fpga_get_desc(devnum);
if (!desc)
return 0;
diff --git a/drivers/led/led-uclass.c b/drivers/led/led-uclass.c
index 760750568c0..27ef890ed0a 100644
--- a/drivers/led/led-uclass.c
+++ b/drivers/led/led-uclass.c
@@ -13,6 +13,25 @@
#include <dm/lists.h>
#include <dm/root.h>
#include <dm/uclass-internal.h>
+#include <dt-bindings/leds/common.h>
+
+static const char * const led_colors[LED_COLOR_ID_MAX] = {
+ [LED_COLOR_ID_WHITE] = "white",
+ [LED_COLOR_ID_RED] = "red",
+ [LED_COLOR_ID_GREEN] = "green",
+ [LED_COLOR_ID_BLUE] = "blue",
+ [LED_COLOR_ID_AMBER] = "amber",
+ [LED_COLOR_ID_VIOLET] = "violet",
+ [LED_COLOR_ID_YELLOW] = "yellow",
+ [LED_COLOR_ID_IR] = "ir",
+ [LED_COLOR_ID_MULTI] = "multicolor",
+ [LED_COLOR_ID_RGB] = "rgb",
+ [LED_COLOR_ID_PURPLE] = "purple",
+ [LED_COLOR_ID_ORANGE] = "orange",
+ [LED_COLOR_ID_PINK] = "pink",
+ [LED_COLOR_ID_CYAN] = "cyan",
+ [LED_COLOR_ID_LIME] = "lime",
+};
int led_bind_generic(struct udevice *parent, const char *driver_name)
{
@@ -232,11 +251,54 @@ int led_activity_blink(void)
#endif
#endif
-static const char *led_get_label(ofnode node)
+static const char *led_get_function_name(struct udevice *dev)
+{
+ struct led_uc_plat *uc_plat;
+ const char *func;
+ u32 color;
+ u32 enumerator;
+ int ret;
+ int cp;
+
+ if (!dev)
+ return NULL;
+
+ uc_plat = dev_get_uclass_plat(dev);
+ if (!uc_plat)
+ return NULL;
+
+ if (uc_plat->label)
+ return uc_plat->label;
+
+ /* Now try to detect function label name */
+ func = dev_read_string(dev, "function");
+ cp = dev_read_u32(dev, "color", &color);
+ if (cp == 0 || func) {
+ ret = dev_read_u32(dev, "function-enumerator", &enumerator);
+ if (!ret) {
+ snprintf(uc_plat->name, LED_MAX_NAME_SIZE,
+ "%s:%s-%d",
+ cp ? "" : led_colors[color],
+ func ? func : "", enumerator);
+ } else {
+ snprintf(uc_plat->name, LED_MAX_NAME_SIZE,
+ "%s:%s",
+ cp ? "" : led_colors[color],
+ func ? func : "");
+ }
+ uc_plat->label = uc_plat->name;
+ }
+
+ return uc_plat->label;
+}
+
+static const char *led_get_label(struct udevice *dev, ofnode node)
{
const char *label;
label = ofnode_read_string(node, "label");
+ if (!label)
+ label = led_get_function_name(dev);
if (!label && !ofnode_read_string(node, "compatible"))
label = ofnode_get_name(node);
@@ -249,7 +311,7 @@ static int led_post_bind(struct udevice *dev)
const char *default_state;
if (!uc_plat->label)
- uc_plat->label = led_get_label(dev_ofnode(dev));
+ uc_plat->label = led_get_label(dev, dev_ofnode(dev));
uc_plat->default_state = LEDST_COUNT;
@@ -314,14 +376,14 @@ static int led_init(struct uclass *uc)
#ifdef CONFIG_LED_BOOT
ret = ofnode_options_get_by_phandle("boot-led", &led_node);
if (!ret)
- priv->boot_led_label = led_get_label(led_node);
+ priv->boot_led_label = led_get_label(NULL, led_node);
priv->boot_led_period = ofnode_options_read_int("boot-led-period-ms", 250);
#endif
#ifdef CONFIG_LED_ACTIVITY
ret = ofnode_options_get_by_phandle("activity-led", &led_node);
if (!ret)
- priv->activity_led_label = led_get_label(led_node);
+ priv->activity_led_label = led_get_label(NULL, led_node);
priv->activity_led_period = ofnode_options_read_int("activity-led-period-ms",
250);
#endif
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 94d8f1b4c04..0a1fff38727 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -741,6 +741,18 @@ int designware_eth_probe(struct udevice *dev)
puts("Error enabling phy supply\n");
return ret;
}
+#if IS_ENABLED(CONFIG_ARCH_NPCM8XX)
+ int phy_uv;
+
+ phy_uv = dev_read_u32_default(dev, "phy-supply-microvolt", 0);
+ if (phy_uv) {
+ ret = regulator_set_value(phy_supply, phy_uv);
+ if (ret) {
+ puts("Error setting phy voltage\n");
+ return ret;
+ }
+ }
+#endif
}
#endif
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7988.c b/drivers/pinctrl/mediatek/pinctrl-mt7988.c
index 1f384e86f4e..639e2415c63 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7988.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7988.c
@@ -1233,8 +1233,7 @@ static const struct mtk_function_desc mt7988_functions[] = {
};
static const char *const mt7988_pinctrl_register_base_names[] = {
- "gpio_base", "iocfg_tr_base", "iocfg_br_base", "iocfg_rb_base",
- "iocfg_lb_base", "iocfg_tl_base",
+ "gpio", "iocfg_tr", "iocfg_br", "iocfg_rb", "iocfg_lb", "iocfg_tl",
};
static const struct mtk_pinctrl_soc mt7988_data = {
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 3760c4611ce..4aecb84504a 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -816,7 +816,11 @@ int mtk_pinctrl_common_probe(struct udevice *dev,
nbase_names = 1;
for (i = 0; i < nbase_names; i++) {
- addr = devfdt_get_addr_index(dev, i);
+ if (soc->base_names)
+ addr = dev_read_addr_name(dev, soc->base_names[i]);
+ else
+ addr = dev_read_addr_index(dev, i);
+
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
priv->base[i] = (void __iomem *)addr;
diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
index 2790b168b19..3d2831a3e36 100644
--- a/drivers/remoteproc/Kconfig
+++ b/drivers/remoteproc/Kconfig
@@ -55,6 +55,7 @@ config REMOTEPROC_TI_K3_ARM64
depends on DM
depends on ARCH_K3
depends on OF_CONTROL
+ default y if SYS_K3_SPL_ATF
help
Say y here to support TI's ARM64 processor subsystems
on various TI K3 family of SoCs through the remote processor
@@ -70,6 +71,16 @@ config REMOTEPROC_TI_K3_DSP
on various TI K3 family of SoCs through the remote processor
framework.
+config REMOTEPROC_TI_K3_M4F
+ bool "TI K3 M4F remoteproc support"
+ select REMOTEPROC
+ depends on ARCH_K3
+ depends on TI_SCI_PROTOCOL
+ help
+ Say y here to support TI's M4F remote processor subsystems
+ on various TI K3 family of SoCs through the remote processor
+ framework.
+
config REMOTEPROC_TI_K3_R5F
bool "TI K3 R5F remoteproc support"
select REMOTEPROC
diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile
index 3a092b7660e..f81e5009c5e 100644
--- a/drivers/remoteproc/Makefile
+++ b/drivers/remoteproc/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_REMOTEPROC_SANDBOX) += sandbox_testproc.o
obj-$(CONFIG_REMOTEPROC_STM32_COPRO) += stm32_copro.o
obj-$(CONFIG_REMOTEPROC_TI_K3_ARM64) += ti_k3_arm64_rproc.o
obj-$(CONFIG_REMOTEPROC_TI_K3_DSP) += ti_k3_dsp_rproc.o
+obj-$(CONFIG_REMOTEPROC_TI_K3_M4F) += ti_k3_m4_rproc.o
obj-$(CONFIG_REMOTEPROC_TI_K3_R5F) += ti_k3_r5f_rproc.o
obj-$(CONFIG_REMOTEPROC_TI_POWER) += ti_power_proc.o
obj-$(CONFIG_REMOTEPROC_TI_PRU) += pru_rproc.o
diff --git a/drivers/remoteproc/ti_k3_m4_rproc.c b/drivers/remoteproc/ti_k3_m4_rproc.c
new file mode 100644
index 00000000000..31b9de71579
--- /dev/null
+++ b/drivers/remoteproc/ti_k3_m4_rproc.c
@@ -0,0 +1,371 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Texas Instruments' K3 M4 Remoteproc driver
+ *
+ * Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/
+ * Hari Nagalla <hnagalla@ti.com>
+ */
+
+#include <dm.h>
+#include <log.h>
+#include <malloc.h>
+#include <remoteproc.h>
+#include <errno.h>
+#include <clk.h>
+#include <reset.h>
+#include <asm/io.h>
+#include <power-domain.h>
+#include <dm/device_compat.h>
+#include <linux/err.h>
+#include <linux/sizes.h>
+#include <linux/soc/ti/ti_sci_protocol.h>
+#include "ti_sci_proc.h"
+#include <mach/security.h>
+
+/**
+ * struct k3_m4_mem - internal memory structure
+ * @cpu_addr: MPU virtual address of the memory region
+ * @bus_addr: Bus address used to access the memory region
+ * @dev_addr: Device address from remoteproc view
+ * @size: Size of the memory region
+ */
+struct k3_m4_mem {
+ void __iomem *cpu_addr;
+ phys_addr_t bus_addr;
+ phys_addr_t dev_addr;
+ size_t size;
+};
+
+/**
+ * struct k3_m4_mem_data - memory definitions for m4 remote core
+ * @name: name for this memory entry
+ * @dev_addr: device address for the memory entry
+ */
+struct k3_m4_mem_data {
+ const char *name;
+ const u32 dev_addr;
+};
+
+/**
+ * struct k3_m4_boot_data - internal data structure used for boot
+ * @boot_align_addr: Boot vector address alignment granularity
+ */
+struct k3_m4_boot_data {
+ u32 boot_align_addr;
+};
+
+/**
+ * struct k3_m4_privdata - Structure representing Remote processor data.
+ * @m4_rst: m4 rproc reset control data
+ * @tsp: Pointer to TISCI proc contrl handle
+ * @data: Pointer to DSP specific boot data structure
+ * @mem: Array of available memories
+ * @num_mem: Number of available memories
+ */
+struct k3_m4_privdata {
+ struct reset_ctl m4_rst;
+ struct ti_sci_proc tsp;
+ struct k3_m4_boot_data *data;
+ struct k3_m4_mem *mem;
+ int num_mems;
+};
+
+/*
+ * The M4 cores have a local reset that affects only the CPU, and a
+ * generic module reset that powers on the device and allows the M4 internal
+ * memories to be accessed while the local reset is asserted. This function is
+ * used to release the global reset on M4F to allow loading into the M4F
+ * internal RAMs. This helper function is invoked in k3_m4_load() before any
+ * actual firmware loading happens and is undone only in k3_m4_stop(). The local
+ * reset cannot be released on M4 cores until after the firmware images are loaded.
+ */
+static int k3_m4_prepare(struct udevice *dev)
+{
+ struct k3_m4_privdata *m4 = dev_get_priv(dev);
+ int ret;
+
+ ret = ti_sci_proc_power_domain_on(&m4->tsp);
+ if (ret)
+ dev_err(dev, "cannot enable internal RAM loading, ret = %d\n",
+ ret);
+
+ return ret;
+}
+
+/*
+ * This function is the counterpart to k3_m4_prepare() and is used to assert
+ * the global reset on M4 cores. This completes the second step of powering
+ * down the M4 cores. The cores themselves are halted through the local reset
+ * in first step. This function is invoked in k3_m4_stop() after the local
+ * reset is asserted.
+ */
+static int k3_m4_unprepare(struct udevice *dev)
+{
+ struct k3_m4_privdata *m4 = dev_get_priv(dev);
+
+ return ti_sci_proc_power_domain_off(&m4->tsp);
+}
+
+/**
+ * k3_m4_load() - Load up the Remote processor image
+ * @dev: rproc device pointer
+ * @addr: Address at which image is available
+ * @size: size of the image
+ *
+ * Return: 0 if all goes good, else appropriate error message.
+ */
+static int k3_m4_load(struct udevice *dev, ulong addr, ulong size)
+{
+ struct k3_m4_privdata *m4 = dev_get_priv(dev);
+ void *image_addr = (void *)addr;
+ int ret;
+
+ ret = ti_sci_proc_request(&m4->tsp);
+ if (ret)
+ return ret;
+
+ ret = k3_m4_prepare(dev);
+ if (ret) {
+ dev_err(dev, "Prepare failed for core %d\n",
+ m4->tsp.proc_id);
+ goto proc_release;
+ }
+
+ ti_secure_image_post_process(&image_addr, &size);
+
+ ret = rproc_elf_load_image(dev, addr, size);
+ if (ret < 0) {
+ dev_err(dev, "Loading elf failed %d\n", ret);
+ goto unprepare;
+ }
+
+unprepare:
+ if (ret)
+ k3_m4_unprepare(dev);
+proc_release:
+ ti_sci_proc_release(&m4->tsp);
+ return ret;
+}
+
+/**
+ * k3_m4_start() - Start the remote processor
+ * @dev: rproc device pointer
+ *
+ * Return: 0 if all went ok, else return appropriate error
+ */
+static int k3_m4_start(struct udevice *dev)
+{
+ struct k3_m4_privdata *m4 = dev_get_priv(dev);
+ int ret;
+
+ ret = ti_sci_proc_request(&m4->tsp);
+ if (ret)
+ return ret;
+
+ ret = reset_deassert(&m4->m4_rst);
+
+ ti_sci_proc_release(&m4->tsp);
+
+ return ret;
+}
+
+static int k3_m4_stop(struct udevice *dev)
+{
+ struct k3_m4_privdata *m4 = dev_get_priv(dev);
+
+ ti_sci_proc_request(&m4->tsp);
+ reset_assert(&m4->m4_rst);
+ k3_m4_unprepare(dev);
+ ti_sci_proc_release(&m4->tsp);
+
+ return 0;
+}
+
+static void *k3_m4_da_to_va(struct udevice *dev, ulong da, ulong len)
+{
+ struct k3_m4_privdata *m4 = dev_get_priv(dev);
+ phys_addr_t bus_addr, dev_addr;
+ void __iomem *va = NULL;
+ size_t size;
+ u32 offset;
+ int i;
+
+ if (len <= 0)
+ return NULL;
+
+ for (i = 0; i < m4->num_mems; i++) {
+ bus_addr = m4->mem[i].bus_addr;
+ dev_addr = m4->mem[i].dev_addr;
+ size = m4->mem[i].size;
+
+ if (da >= dev_addr && ((da + len) <= (dev_addr + size))) {
+ offset = da - dev_addr;
+ va = m4->mem[i].cpu_addr + offset;
+ return (__force void *)va;
+ }
+
+ if (da >= bus_addr && (da + len) <= (bus_addr + size)) {
+ offset = da - bus_addr;
+ va = m4->mem[i].cpu_addr + offset;
+ return (__force void *)va;
+ }
+ }
+
+ /* Assume it is DDR region and return da */
+ return map_physmem(da, len, MAP_NOCACHE);
+}
+
+static const struct dm_rproc_ops k3_m4_ops = {
+ .load = k3_m4_load,
+ .start = k3_m4_start,
+ .stop = k3_m4_stop,
+ .device_to_virt = k3_m4_da_to_va,
+};
+
+static int ti_sci_proc_of_to_priv(struct udevice *dev, struct ti_sci_proc *tsp)
+{
+ u32 ids[2];
+ int ret;
+
+ tsp->sci = ti_sci_get_by_phandle(dev, "ti,sci");
+ if (IS_ERR(tsp->sci)) {
+ dev_err(dev, "ti_sci get failed: %ld\n", PTR_ERR(tsp->sci));
+ return PTR_ERR(tsp->sci);
+ }
+
+ ret = dev_read_u32_array(dev, "ti,sci-proc-ids", ids, 2);
+ if (ret) {
+ dev_err(dev, "Proc IDs not populated %d\n", ret);
+ return ret;
+ }
+
+ tsp->ops = &tsp->sci->ops.proc_ops;
+ tsp->proc_id = ids[0];
+ tsp->host_id = ids[1];
+ tsp->dev_id = dev_read_u32_default(dev, "ti,sci-dev-id",
+ TI_SCI_RESOURCE_NULL);
+ if (tsp->dev_id == TI_SCI_RESOURCE_NULL) {
+ dev_err(dev, "Device ID not populated %d\n", ret);
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
+static const struct k3_m4_mem_data am6_m4_mems[] = {
+ { .name = "iram", .dev_addr = 0x0 },
+ { .name = "dram", .dev_addr = 0x30000 },
+};
+
+static int k3_m4_of_get_memories(struct udevice *dev)
+{
+ struct k3_m4_privdata *m4 = dev_get_priv(dev);
+ int i;
+
+ m4->num_mems = ARRAY_SIZE(am6_m4_mems);
+ m4->mem = calloc(m4->num_mems, sizeof(*m4->mem));
+ if (!m4->mem)
+ return -ENOMEM;
+
+ for (i = 0; i < m4->num_mems; i++) {
+ m4->mem[i].bus_addr = dev_read_addr_size_name(dev,
+ am6_m4_mems[i].name,
+ (fdt_addr_t *)&m4->mem[i].size);
+ if (m4->mem[i].bus_addr == FDT_ADDR_T_NONE) {
+ dev_err(dev, "%s bus address not found\n",
+ am6_m4_mems[i].name);
+ return -EINVAL;
+ }
+ m4->mem[i].cpu_addr = map_physmem(m4->mem[i].bus_addr,
+ m4->mem[i].size,
+ MAP_NOCACHE);
+ m4->mem[i].dev_addr = am6_m4_mems[i].dev_addr;
+ }
+
+ return 0;
+}
+
+/**
+ * k3_of_to_priv() - generate private data from device tree
+ * @dev: corresponding k3 m4 processor device
+ * @m4: pointer to driver specific private data
+ *
+ * Return: 0 if all goes good, else appropriate error message.
+ */
+static int k3_m4_of_to_priv(struct udevice *dev, struct k3_m4_privdata *m4)
+{
+ int ret;
+
+ ret = reset_get_by_index(dev, 0, &m4->m4_rst);
+ if (ret) {
+ dev_err(dev, "reset_get() failed: %d\n", ret);
+ return ret;
+ }
+
+ ret = ti_sci_proc_of_to_priv(dev, &m4->tsp);
+ if (ret)
+ return ret;
+
+ ret = k3_m4_of_get_memories(dev);
+ if (ret)
+ return ret;
+
+ m4->data = (struct k3_m4_boot_data *)dev_get_driver_data(dev);
+
+ return 0;
+}
+
+/**
+ * k3_m4_probe() - Basic probe
+ * @dev: corresponding k3 remote processor device
+ *
+ * Return: 0 if all goes good, else appropriate error message.
+ */
+static int k3_m4_probe(struct udevice *dev)
+{
+ struct k3_m4_privdata *m4;
+ int ret;
+
+ m4 = dev_get_priv(dev);
+ ret = k3_m4_of_to_priv(dev, m4);
+ if (ret)
+ return ret;
+
+ /*
+ * The M4 local resets are deasserted by default on Power-On-Reset.
+ * Assert the local resets to ensure the M4s don't execute bogus code
+ * in .load() callback when the module reset is released to support
+ * internal memory loading. This is needed for M4 cores.
+ */
+ reset_assert(&m4->m4_rst);
+
+ return 0;
+}
+
+static int k3_m4_remove(struct udevice *dev)
+{
+ struct k3_m4_privdata *m4 = dev_get_priv(dev);
+
+ free(m4->mem);
+
+ return 0;
+}
+
+static const struct k3_m4_boot_data m4_data = {
+ .boot_align_addr = SZ_1K,
+};
+
+static const struct udevice_id k3_m4_ids[] = {
+ { .compatible = "ti,am64-m4fss", .data = (ulong)&m4_data, },
+ {}
+};
+
+U_BOOT_DRIVER(k3_m4) = {
+ .name = "k3_m4",
+ .of_match = k3_m4_ids,
+ .id = UCLASS_REMOTEPROC,
+ .ops = &k3_m4_ops,
+ .probe = k3_m4_probe,
+ .remove = k3_m4_remove,
+ .priv_auto = sizeof(struct k3_m4_privdata),
+};
diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c
index d78b3fa1bbd..57268e7f8ff 100644
--- a/drivers/remoteproc/ti_k3_r5f_rproc.c
+++ b/drivers/remoteproc/ti_k3_r5f_rproc.c
@@ -886,6 +886,7 @@ static const struct udevice_id k3_r5f_rproc_ids[] = {
{ .compatible = "ti,j7200-r5f", .data = (ulong)&j7200_j721s2_data, },
{ .compatible = "ti,j721s2-r5f", .data = (ulong)&j7200_j721s2_data, },
{ .compatible = "ti,am62-r5f", .data = (ulong)&am62_data, },
+ { .compatible = "ti,am64-r5f", .data = (ulong)&j7200_j721s2_data, },
{}
};
@@ -930,6 +931,7 @@ static const struct udevice_id k3_r5fss_ids[] = {
{ .compatible = "ti,j7200-r5fss"},
{ .compatible = "ti,j721s2-r5fss"},
{ .compatible = "ti,am62-r5fss"},
+ { .compatible = "ti,am64-r5fss"},
{}
};
diff --git a/drivers/rtc/emul_rtc.c b/drivers/rtc/emul_rtc.c
index 97a8d9bb7df..6817daad18f 100644
--- a/drivers/rtc/emul_rtc.c
+++ b/drivers/rtc/emul_rtc.c
@@ -58,7 +58,7 @@ static int emul_rtc_set(struct udevice *dev, const struct rtc_time *time)
return 0;
}
-int emul_rtc_probe(struct udevice *dev)
+static int emul_rtc_probe(struct udevice *dev)
{
struct emul_rtc *priv = dev_get_priv(dev);
const char *epoch_str;
diff --git a/drivers/spi/cadence_ospi_versal.c b/drivers/spi/cadence_ospi_versal.c
index dcf28c75596..816916de16d 100644
--- a/drivers/spi/cadence_ospi_versal.c
+++ b/drivers/spi/cadence_ospi_versal.c
@@ -24,6 +24,13 @@ int cadence_qspi_apb_dma_read(struct cadence_spi_priv *priv,
u8 opcode, addr_bytes, *rxbuf, dummy_cycles;
n_rx = op->data.nbytes;
+
+ if (op->addr.dtr && (op->addr.val % 2)) {
+ n_rx += 1;
+ writel(op->addr.val & ~0x1,
+ priv->regbase + CQSPI_REG_INDIRECTRDSTARTADDR);
+ }
+
rxbuf = op->data.buf.in;
rx_rem = n_rx % 4;
bytes_to_dma = n_rx - rx_rem;
@@ -104,6 +111,11 @@ int cadence_qspi_apb_dma_read(struct cadence_spi_priv *priv,
memcpy(rxbuf, &data, rx_rem);
}
+ if (op->addr.dtr && (op->addr.val % 2)) {
+ rxbuf -= bytes_to_dma;
+ memcpy(rxbuf, rxbuf + 1, n_rx - 1);
+ }
+
return 0;
}
diff --git a/drivers/spi/cadence_qspi.h b/drivers/spi/cadence_qspi.h
index 693474a2871..1f9125cd239 100644
--- a/drivers/spi/cadence_qspi.h
+++ b/drivers/spi/cadence_qspi.h
@@ -307,7 +307,7 @@ int cadence_qspi_apb_dma_read(struct cadence_spi_priv *priv,
const struct spi_mem_op *op);
int cadence_qspi_apb_wait_for_dma_cmplt(struct cadence_spi_priv *priv);
int cadence_qspi_apb_exec_flash_cmd(void *reg_base, unsigned int reg);
-int cadence_qspi_versal_flash_reset(struct udevice *dev);
+int cadence_qspi_flash_reset(struct udevice *dev);
ofnode cadence_qspi_get_subnode(struct udevice *dev);
void cadence_qspi_apb_enable_linear_mode(bool enable);
diff --git a/drivers/timer/sandbox_timer.c b/drivers/timer/sandbox_timer.c
index e8b54a02965..c1baf3c69ec 100644
--- a/drivers/timer/sandbox_timer.c
+++ b/drivers/timer/sandbox_timer.c
@@ -18,6 +18,11 @@ void timer_test_add_offset(unsigned long offset)
sandbox_timer_offset += offset;
}
+ulong timer_test_get_offset(void)
+{
+ return sandbox_timer_offset;
+};
+
u64 notrace timer_early_get_count(void)
{
return os_get_nsec() / 1000 + sandbox_timer_offset * 1000;
diff --git a/env/fat.c b/env/fat.c
index b04b1d9c315..1ad301eaaff 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -41,14 +41,12 @@ __weak const char *env_fat_get_intf(void)
__weak char *env_fat_get_dev_part(void)
{
#ifdef CONFIG_MMC
- static char *part_str;
-
- if (!part_str) {
- part_str = CONFIG_ENV_FAT_DEVICE_AND_PART;
- if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "mmc") && part_str[0] == ':') {
- part_str = "0" CONFIG_ENV_FAT_DEVICE_AND_PART;
- part_str[0] += mmc_get_env_dev();
- }
+ /* reserve one more char for the manipulation below */
+ static char part_str[] = CONFIG_ENV_FAT_DEVICE_AND_PART "\0";
+
+ if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "mmc") && part_str[0] == ':') {
+ part_str[0] = '0' + mmc_get_env_dev();
+ strcpy(&part_str[1], CONFIG_ENV_FAT_DEVICE_AND_PART);
}
return part_str;
diff --git a/include/bloblist.h b/include/bloblist.h
index 52ba0ddcf84..98aacf52733 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -481,7 +481,7 @@ int bloblist_init(void);
/**
* bloblist_maybe_init() - Init the bloblist system if not already done
*
- * Calls bloblist_init() if the GD_FLG_BLOBLIST_READY flag is not et
+ * Calls bloblist_init() if the GD_FLG_BLOBLIST_READY flag is not set
*
* Return: 0 if OK, -ve on error
*/
diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
index 96efd38594a..385dec2ff4f 100644
--- a/include/configs/am335x_guardian.h
+++ b/include/configs/am335x_guardian.h
@@ -63,11 +63,6 @@
"fi; " \
"setenv extrabootargs $extrabootargs \"swi_attached\"; " \
"fi;" \
- "run bootcmd_ubifs0;\0" \
- "altbootcmd=" \
- "setenv boot_syslinux_conf \"extlinux/extlinux-rollback.conf\"; " \
- "run distro_bootcmd; " \
- "setenv boot_syslinux_conf \"extlinux/extlinux.conf\"; " \
"run bootcmd_ubifs0;\0"
#endif /* ! CONFIG_XPL_BUILD */
diff --git a/include/configs/bk4r1.h b/include/configs/bk4r1.h
index 5df8d03c706..6d24c5decd5 100644
--- a/include/configs/bk4r1.h
+++ b/include/configs/bk4r1.h
@@ -16,8 +16,6 @@
#define BK4_EXTRA_ENV_SETTINGS \
"bootlimit=3\0" \
"eraseuserdata=false\0" \
- "altbootcmd=led 5 on; " \
- "boot\0" \
"set_gpio103=mw 0x400ff0c4 0x0080; mw 0x4004819C 0x000011bf\0" \
"set_gpio102=mw 0x400ff0c4 0x40; mw 0x40048198 0x000011bf\0" \
"set_gpio96=mw 0x40048180 0x282; mw 0x400ff0c4 0x1\0"\
diff --git a/include/configs/brppt2.h b/include/configs/brppt2.h
index d01f0d37316..93559a171ae 100644
--- a/include/configs/brppt2.h
+++ b/include/configs/brppt2.h
@@ -64,7 +64,6 @@ BUR_COMMON_ENV \
" do echo \"### booting ${target} ###\"; run b_${target};" \
" if test ${b_break} = 1; then; exit; fi; done\0" \
"loaddev=mmc 0\0" \
-"altbootcmd=setenv b_mode 0; run b_default;\0" \
"bootlimit=1\0" \
"net2nor=sf probe && dhcp &&" \
" tftp ${loadaddr} SPL && sf erase 0 +${filesize} &&" \
diff --git a/include/configs/display5.h b/include/configs/display5.h
index 51fa2b03a2e..98b1e5af2c0 100644
--- a/include/configs/display5.h
+++ b/include/configs/display5.h
@@ -170,7 +170,6 @@
"display=tianma-tm070-800x480\0" \
"board=display5\0" \
"mmcdev=0\0" \
- "altbootcmd=run recovery\0" \
"bootdelay=1\0" \
"baudrate=115200\0" \
"ethact=FEC\0" \
diff --git a/include/configs/ge_b1x5v2.h b/include/configs/ge_b1x5v2.h
index f3d85c9c11e..5e3f67124c0 100644
--- a/include/configs/ge_b1x5v2.h
+++ b/include/configs/ge_b1x5v2.h
@@ -82,14 +82,6 @@
"doboot=" \
"echo Booting from mmc:${mmcdev}:${mmcpart} ...; " \
"run helix;\0" \
- "altbootcmd=" \
- "setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
- "run hasfirstboot || setenv mmcpart 0; " \
- "if test ${mmcpart} != 0; then " \
- "setenv bootcause REVERT; " \
- "run swappartitions loadimage doboot; " \
- "fi; " \
- "run failbootcmd\0" \
"tryboot=" \
"setenv mmcpart 1; run hasfirstboot || setenv mmcpart 2; " \
"run loadimage || run swappartitions && run loadimage || " \
diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h
index 07b36706e56..c8ef048bd43 100644
--- a/include/configs/ge_bx50v3.h
+++ b/include/configs/ge_bx50v3.h
@@ -67,14 +67,6 @@
"Try again, or contact GE Service for support.\"; " \
"bootcount reset; " \
"while true; do sleep 1; done; \0" \
- "altbootcmd=" \
- "run doquiet; " \
- "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
- "run hasfirstboot || setenv partnum 0; " \
- "if test ${partnum} != 0; then " \
- "run swappartitions loadimage doboot; " \
- "fi; " \
- "run failbootcmd\0" \
"loadimage=" \
"ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \
"doboot=" \
diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h
index 786b70fe064..3d5701c636c 100644
--- a/include/configs/imx6-engicam.h
+++ b/include/configs/imx6-engicam.h
@@ -47,7 +47,6 @@
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"loadfit=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${fit_image}\0" \
- "altbootcmd=run recoveryboot\0"\
"fitboot=echo Booting FIT image from mmc ...; " \
"run mmcargs; " \
"bootm ${loadaddr}\0" \
diff --git a/include/configs/imx6q-bosch-acc.h b/include/configs/imx6q-bosch-acc.h
index 64ddbf711d3..84da8250684 100644
--- a/include/configs/imx6q-bosch-acc.h
+++ b/include/configs/imx6q-bosch-acc.h
@@ -42,8 +42,7 @@
"env_persisted=0\0" \
"env_persist=if test ${env_persisted} != 1; " \
"then env set env_persisted 1; run save_env; fi;\0" \
- "save_env=env save; env save\0" \
- "altbootcmd=run handle_ustate; run switch_bootset; run save_env; run bootcmd\0"
+ "save_env=env save; env save\0"
#define CFG_ENV_FLAGS_LIST_STATIC \
"bootset:bw," \
diff --git a/include/configs/imx8mm-mx8menlo.h b/include/configs/imx8mm-mx8menlo.h
index 7058d632d67..626ccae7205 100644
--- a/include/configs/imx8mm-mx8menlo.h
+++ b/include/configs/imx8mm-mx8menlo.h
@@ -18,14 +18,6 @@
"devtype=mmc\0" \
"devnum=1\0" \
"distro_bootpart=1\0" \
- "altbootcmd=" \
- "mmc partconf 0 mmcpart ; " \
- "if test ${mmcpart} -eq 1 ; then " \
- "mmc partconf 0 1 2 0 ; " \
- "else " \
- "mmc partconf 0 1 1 0 ; " \
- "fi ; " \
- "boot\0" \
"boot_file=fitImage\0" \
"console=ttymxc0\0" \
"fdt_addr=0x43000000\0" \
diff --git a/include/configs/imx8mm_data_modul_edm_sbc.h b/include/configs/imx8mm_data_modul_edm_sbc.h
index 57ecb5e2190..5ce4219912f 100644
--- a/include/configs/imx8mm_data_modul_edm_sbc.h
+++ b/include/configs/imx8mm_data_modul_edm_sbc.h
@@ -34,7 +34,6 @@
#define CFG_SYS_FSL_ESDHC_ADDR 0
#define CFG_EXTRA_ENV_SETTINGS \
- "altbootcmd=run bootcmd\0" \
"bootlimit=3\0" \
"devtype=mmc\0" \
"devpart=1\0" \
diff --git a/include/configs/imx8mp_data_modul_edm_sbc.h b/include/configs/imx8mp_data_modul_edm_sbc.h
index de5bdd30e18..58a03b35ac4 100644
--- a/include/configs/imx8mp_data_modul_edm_sbc.h
+++ b/include/configs/imx8mp_data_modul_edm_sbc.h
@@ -24,7 +24,6 @@
#define FEC_QUIRK_ENET_MAC
#define CFG_EXTRA_ENV_SETTINGS \
- "altbootcmd=run bootcmd\0" \
"bootlimit=3\0" \
"devtype=mmc\0" \
"devpart=1\0" \
diff --git a/include/configs/imx8mp_dhcom_pdk2.h b/include/configs/imx8mp_dhcom_pdk2.h
index c848fce8bda..f3e239d780f 100644
--- a/include/configs/imx8mp_dhcom_pdk2.h
+++ b/include/configs/imx8mp_dhcom_pdk2.h
@@ -28,7 +28,6 @@
#define CFG_SYS_FSL_ESDHC_ADDR 0
#define CFG_EXTRA_ENV_SETTINGS \
- "altbootcmd=run bootcmd ; reset\0" \
"bootlimit=3\0" \
"dfu_alt_info=" \
/* RAM block at DRAM offset 256..768 MiB */ \
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 1ea4fa59fd5..a6aafb51854 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -93,13 +93,6 @@
"splashfile=boot/usplash.bmp.gz\0" \
"splashimage=0x88000000\0" \
"splashpos=m,m\0" \
- "altbootcmd=" \
- "if test ${mmcpart} -eq 1 ; then " \
- "setenv mmcpart 2 ; " \
- "else " \
- "setenv mmcpart 1 ; " \
- "fi ; " \
- "boot\0" \
"stdout=serial,vidconsole\0" \
"stderr=serial,vidconsole\0" \
"addcons=" \
diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h
index 6d1f669de50..3707de254e1 100644
--- a/include/configs/mx53ppd.h
+++ b/include/configs/mx53ppd.h
@@ -59,14 +59,6 @@
"Try again, or contact GE Service for support.\"; " \
"bootcount reset; " \
"while true; do sleep 1; done; \0" \
- "altbootcmd=" \
- "run doquiet; " \
- "setenv partnum 1; run hasfirstboot || setenv partnum 2; " \
- "run hasfirstboot || setenv partnum 0; " \
- "if test ${partnum} != 0; then " \
- "run swappartitions loadimage doboot; " \
- "fi; " \
- "run failbootcmd\0" \
"loadimage=" \
"ext2load ${dev} ${devnum}:${partnum} ${loadaddr} ${image}\0" \
"doboot=" \
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 74b7fe85800..a918dc1350c 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -128,7 +128,6 @@
"verify=no \0" \
"project_dir=targetdir\0" \
"upgrade_available=0\0" \
- "altbootcmd=run bootcmd\0" \
"partitionset_active=A\0" \
"loadaddr=0x82000000\0" \
"kloadaddr=0x81000000\0" \
diff --git a/include/configs/siemens-env-common.h b/include/configs/siemens-env-common.h
index 36fa5d936f7..c028823e1eb 100644
--- a/include/configs/siemens-env-common.h
+++ b/include/configs/siemens-env-common.h
@@ -183,7 +183,6 @@
"rootfs_name=/dev/mmcblk0\0" \
"upgrade_available=0\0" \
"bootlimit=3\0" \
- "altbootcmd=run bootcmd\0" \
"optargs=\0" \
/**********************************************************************/
diff --git a/include/configs/snapper9g45.h b/include/configs/snapper9g45.h
index df8ed451a43..8ea708d0e92 100644
--- a/include/configs/snapper9g45.h
+++ b/include/configs/snapper9g45.h
@@ -58,8 +58,7 @@
"boot_tftp=setenv bootargs $bootargs_def ip=any nfsroot=$nfsroot; setenv autoload y && bootp && bootm\0" \
"boot_usb=setenv bootargs $bootargs_def; usb start && usb storage && fatload usb 0:1 $loadaddr dds-xm200.bin && bootm\0" \
"boot_mmc=setenv bootargs $bootargs_def; mmc rescan && fatload mmc 0:1 $loadaddr dds-xm200.bin && bootm\0" \
- "bootcmd=run boot_mmc ; run boot_usb ; run boot_working ; run boot_safe\0" \
- "altbootcmd=run boot_mmc ; run boot_usb ; run boot_safe ; run boot_working\0"
+ "bootcmd=run boot_mmc ; run boot_usb ; run boot_working ; run boot_safe\0"
/* Console settings */
diff --git a/include/configs/vexpress_aemv8.h b/include/configs/vexpress_aemv8.h
index b5a17f93efc..5eee13b3fc0 100644
--- a/include/configs/vexpress_aemv8.h
+++ b/include/configs/vexpress_aemv8.h
@@ -181,12 +181,14 @@
" if load hostfs - ${kernel_addr_r} ${kernel_name}; then" \
" setenv fdt_high 0xffffffffffffffff;" \
" setenv initrd_high 0xffffffffffffffff;" \
- " load hostfs - ${fdt_addr_r} ${fdtfile};" \
+ " if test -n load hostfs - ${fdt_addr_r} ${fdtfile}; then" \
+ " fdt move $fdtcontroladdr $fdt_addr_r;" \
+ " fi;" \
" load hostfs - ${ramdisk_addr_r} ${ramdisk_name};" \
" fdt addr ${fdt_addr_r};" \
" fdt resize;" \
" fdt chosen ${ramdisk_addr_r} ${filesize};" \
- " booti $kernel_addr_r - $fdt_addr_r;" \
+ " booti $kernel_addr_r - ${fdt_addr_r};" \
" fi;" \
"fi\0"
#define BOOTENV_DEV_NAME_SMH(devtypeu, devtypel, instance) "smh "
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index bb0db7c5ca3..13941ba3589 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -179,6 +179,7 @@
#ifndef CFG_EXTRA_ENV_SETTINGS
#define CFG_EXTRA_ENV_SETTINGS \
ENV_MEM_LAYOUT_SETTINGS \
+ "usb_pgood_delay=1000\0" \
BOOTENV
#endif
diff --git a/include/env/pg-wcom/common.env b/include/env/pg-wcom/common.env
index 4b660cebd67..5f2ba1c4090 100644
--- a/include/env/pg-wcom/common.env
+++ b/include/env/pg-wcom/common.env
@@ -22,7 +22,6 @@ add_default=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${
WCOM_UBI_LINUX_MTD
addpanic=setenv bootargs ${bootargs} panic=1 panic_on_oops=1
-altbootcmd=run bootcmd
backup_bank=0
boot=bootm ${load_addr_r} - ${fdt_addr_r}
diff --git a/include/env/phytec/k3_mmc.env b/include/env/phytec/k3_mmc.env
index ad8d3a8b764..3f67e312f65 100644
--- a/include/env/phytec/k3_mmc.env
+++ b/include/env/phytec/k3_mmc.env
@@ -11,6 +11,7 @@
mmcargs=setenv bootargs console=${console} earlycon=${earlycon}
root=/dev/mmcblk${mmcdev}p${mmcroot} ${raucargs} rootwait rw
+ ${optargs}
mmcloadimage=load mmc ${mmcdev}:${mmcpart} ${kernel_addr_r} Image
mmcloadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
mmcboot=if test ${doraucboot} = 1; then run raucinit; fi;
diff --git a/include/env/phytec/k3_net.env b/include/env/phytec/k3_net.env
index 377e406688d..8ad1cb7b0c2 100644
--- a/include/env/phytec/k3_net.env
+++ b/include/env/phytec/k3_net.env
@@ -9,7 +9,7 @@
#include <env/phytec/overlays.env>
netargs=setenv bootargs console=${console} root=/dev/nfs ip=dhcp rw
- nfsroot=${serverip}:${nfsroot},vers=4,tcp
+ nfsroot=${serverip}:${nfsroot},vers=4,tcp ${optargs}
netloadimage=${net_fetch_cmd} ${kernel_addr_r} ${serverip}:/Image
netloadfdt=${net_fetch_cmd} ${fdt_addr_r} ${serverip}:/${fdtfile}
netboot=run netargs;
diff --git a/include/env/phytec/k3_spi.env b/include/env/phytec/k3_spi.env
index 97d3a157058..8e9cfce3b4c 100644
--- a/include/env/phytec/k3_spi.env
+++ b/include/env/phytec/k3_spi.env
@@ -6,7 +6,7 @@
/* Logic for TI K3 based SoCs to boot from an OSPI/QSPI NOR flash. */
-spiargs=setenv bootargs console=${console} earlycon=${earlycon}
+spiargs=setenv bootargs console=${console} earlycon=${earlycon} ${optargs}
spiloadimage=sf read ${kernel_addr_r} ${spi_image_addr} ${size_kern}
spiloadfdt=sf read ${fdt_addr_r} ${spi_fdt_addr} ${size_fdt}
spiloadramdisk=sf read ${ramdisk_addr_r} ${spi_ramdisk_addr} ${size_fs}
diff --git a/include/env_default.h b/include/env_default.h
index aa3dd40f3fa..60c39f9853f 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -115,6 +115,9 @@ const char default_environment[] = {
#if defined(CONFIG_BOOTCOUNT_BOOTLIMIT) && (CONFIG_BOOTCOUNT_BOOTLIMIT > 0)
"bootlimit=" __stringify(CONFIG_BOOTCOUNT_BOOTLIMIT)"\0"
#endif
+#ifdef CONFIG_BOOTCOUNT_ALTBOOTCMD
+ "altbootcmd=" CONFIG_BOOTCOUNT_ALTBOOTCMD "\0"
+#endif
#ifdef CONFIG_MTDIDS_DEFAULT
"mtdids=" CONFIG_MTDIDS_DEFAULT "\0"
#endif
diff --git a/include/fpga.h b/include/fpga.h
index 44f2755a3f1..4cc44164b2f 100644
--- a/include/fpga.h
+++ b/include/fpga.h
@@ -58,7 +58,7 @@ typedef enum {
void fpga_init(void);
int fpga_add(fpga_type devtype, void *desc);
int fpga_count(void);
-const fpga_desc *const fpga_get_desc(int devnum);
+const fpga_desc *fpga_get_desc(int devnum);
int fpga_is_partial_data(int devnum, size_t img_len);
#if CONFIG_IS_ENABLED(FPGA)
int fpga_load(int devnum, const void *buf, size_t bsize,
@@ -78,8 +78,8 @@ int fpga_loadbitstream(int devnum, char *fpgadata, size_t size,
bitstream_type bstype);
int fpga_dump(int devnum, const void *buf, size_t bsize);
int fpga_info(int devnum);
-const fpga_desc *const fpga_validate(int devnum, const void *buf,
- size_t bsize, char *fn);
+const fpga_desc *fpga_validate(int devnum, const void *buf,
+ size_t bsize, char *fn);
int fpga_compatible2flag(int devnum, const char *compatible);
#endif /* _FPGA_H_ */
diff --git a/include/led.h b/include/led.h
index 64247cd3a70..2a7f38bf84b 100644
--- a/include/led.h
+++ b/include/led.h
@@ -53,6 +53,11 @@
struct udevice;
+/*
+ * value imported from linux:include/linux/uapi/linux/uleds.h
+ */
+#define LED_MAX_NAME_SIZE 64
+
enum led_state_t {
LEDST_OFF = 0,
LEDST_ON = 1,
@@ -81,11 +86,14 @@ struct led_sw_blink {
*
* @label: LED label
* @default_state: LED default state
+ * @name: LED name, derived from function, color or function-enumerator
+ * property.
* @sw_blink: LED software blink struct
*/
struct led_uc_plat {
const char *label;
enum led_state_t default_state;
+ char name[LED_MAX_NAME_SIZE];
#ifdef CONFIG_LED_SW_BLINK
struct led_sw_blink *sw_blink;
#endif
diff --git a/include/test/fdt_overlay.h b/include/test/fdt_overlay.h
new file mode 100644
index 00000000000..251ad0ec97a
--- /dev/null
+++ b/include/test/fdt_overlay.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (c) 2016 NextThing Co
+ * Copyright (c) 2016 Free Electrons
+ */
+
+#ifndef __TEST_OVERLAY_H__
+#define __TEST_OVERLAY_H__
+
+#include <test/test.h>
+
+/* Declare a new FDT-overlay test */
+#define FDT_OVERLAY_TEST(_name, _flags) UNIT_TEST(_name, _flags, fdt_overlay)
+
+/* Declare init for FDT-overlay test */
+#define FDT_OVERLAY_TEST_INIT(_name, _flags) \
+ UNIT_TEST_INIT(_name, _flags, fdt_overlay)
+
+#endif /* __TEST_OVERLAY_H__ */
diff --git a/include/test/optee.h b/include/test/optee.h
index f4255b39ee3..0a548a59e83 100644
--- a/include/test/optee.h
+++ b/include/test/optee.h
@@ -8,7 +8,9 @@
#include <test/test.h>
-/* Declare a new environment test */
+/* Declare a new optee test */
#define OPTEE_TEST(_name, _flags) UNIT_TEST(_name, _flags, optee)
+#define OPTEE_TEST_INIT(_name, _flags) UNIT_TEST_INIT(_name, _flags, optee)
+#define OPTEE_TEST_UNINIT(_name, _flags) UNIT_TEST_UNINIT(_name, _flags, optee)
#endif /* __TEST_OPTEE_H__ */
diff --git a/include/test/overlay.h b/include/test/overlay.h
deleted file mode 100644
index 5dc98399ce7..00000000000
--- a/include/test/overlay.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (c) 2016 NextThing Co
- * Copyright (c) 2016 Free Electrons
- */
-
-#ifndef __TEST_OVERLAY_H__
-#define __TEST_OVERLAY_H__
-
-#include <test/test.h>
-
-/* Declare a new environment test */
-#define OVERLAY_TEST(_name, _flags) UNIT_TEST(_name, _flags, overlay)
-
-#endif /* __TEST_OVERLAY_H__ */
diff --git a/include/test/suites.h b/include/test/suites.h
deleted file mode 100644
index 774dd893378..00000000000
--- a/include/test/suites.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * (C) Copyright 2015
- * Joe Hershberger, National Instruments, joe.hershberger@ni.com
- */
-
-#ifndef __TEST_SUITES_H__
-#define __TEST_SUITES_H__
-
-struct cmd_tbl;
-struct unit_test;
-struct unit_test_state;
-
-/* 'command' functions normally called do_xxx where xxx is the command name */
-typedef int (*ut_cmd_func)(struct unit_test_state *uts, struct cmd_tbl *cmd,
- int flags, int argc, char *const argv[]);
-
-/**
- * cmd_ut_category() - Run a category of unit tests
- *
- * @uts: Unit-test state, which must be ready for use, i.e. ut_init_state()
- * has been called. The caller is responsible for calling
- * ut_uninit_state() after this function returns
- * @name: Category name
- * @prefix: Prefix of test name
- * @tests: List of tests to run
- * @n_ents: Number of tests in @tests
- * @argc: Argument count provided. Must be >= 1. If this is 1 then all
- * tests are run, otherwise only the one named @argv[1] is run.
- * @argv: Arguments: argv[1] is the test to run (if @argc >= 2)
- * Return: 0 if OK, CMD_RET_FAILURE on failure
- */
-int cmd_ut_category(struct unit_test_state *uts, const char *name,
- const char *prefix, struct unit_test *tests, int n_ents,
- int argc, char *const argv[]);
-
-int do_ut_bootstd(struct unit_test_state *uts, struct cmd_tbl *cmdtp, int flag,
- int argc, char *const argv[]);
-int do_ut_optee(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
-int do_ut_overlay(struct unit_test_state *uts, struct cmd_tbl *cmdtp, int flag,
- int argc, char *const argv[]);
-
-#endif /* __TEST_SUITES_H__ */
diff --git a/include/test/test.h b/include/test/test.h
index bac43c81d63..0f2b68a5dee 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -16,11 +16,15 @@
* @skip_count: Number of tests that were skipped
* @test_count: Number of tests run. If a test is run muiltiple times, only one
* is counted
+ * @start: Timer value when test started
+ * @duration_ms: Suite duration in milliseconds
*/
struct ut_stats {
int fail_count;
int skip_count;
int test_count;
+ ulong start;
+ ulong duration_ms;
};
/*
@@ -29,6 +33,8 @@ struct ut_stats {
* @cur: Statistics for the current run
* @total: Statistics for all test runs
* @run_count: Number of times ut_run_list() has been called
+ * @worst: Sute which had the first per-text run time
+ * @worst_ms: Time taken by that test
* @start: Store the starting mallinfo when doing leak test
* @of_live: true to use livetree if available, false to use flattree
* @of_root: Record of the livetree root node (used for setting up tests)
@@ -52,6 +58,8 @@ struct unit_test_state {
struct ut_stats cur;
struct ut_stats total;
int run_count;
+ const struct suite *worst;
+ int worst_ms;
struct mallinfo start;
struct device_node *of_root;
bool of_live;
@@ -92,6 +100,8 @@ enum ut_flags {
UTF_ETH_BOOTDEV = BIT(9), /* enable Ethernet bootdevs */
UTF_SF_BOOTDEV = BIT(10), /* enable SPI flash bootdevs */
UFT_BLOBLIST = BIT(11), /* test changes gd->bloblist */
+ UTF_INIT = BIT(12), /* test inits a suite */
+ UTF_UNINIT = BIT(13), /* test uninits a suite */
};
/**
@@ -139,6 +149,24 @@ struct unit_test {
.func = _name, \
}
+/* init function for unit-test suite (the 'A' makes it first) */
+#define UNIT_TEST_INIT(_name, _flags, _suite) \
+ ll_entry_declare(struct unit_test, A ## _name, ut_ ## _suite) = { \
+ .file = __FILE__, \
+ .name = #_name, \
+ .flags = (_flags) | UTF_INIT, \
+ .func = _name, \
+ }
+
+/* uninit function for unit-test suite (the 'aaa' makes it last) */
+#define UNIT_TEST_UNINIT(_name, _flags, _suite) \
+ ll_entry_declare(struct unit_test, zzz ## _name, ut_ ## _suite) = { \
+ .file = __FILE__, \
+ .name = #_name, \
+ .flags = (_flags) | UTF_UNINIT, \
+ .func = _name, \
+ }
+
/* Get the start of a list of unit tests for a particular suite */
#define UNIT_TEST_SUITE_START(_suite) \
ll_entry_start(struct unit_test, ut_ ## _suite)
diff --git a/include/time.h b/include/time.h
index 3b2ba091247..f5b86bf70fe 100644
--- a/include/time.h
+++ b/include/time.h
@@ -28,7 +28,7 @@ uint64_t get_timer_us(uint64_t base);
*/
unsigned long get_timer_us_long(unsigned long base);
-/*
+/**
* timer_test_add_offset()
*
* Allow tests to add to the time reported through lib/time.c functions
@@ -36,6 +36,19 @@ unsigned long get_timer_us_long(unsigned long base);
*/
void timer_test_add_offset(unsigned long offset);
+#ifdef CONFIG_SANDBOX
+/**
+ * timer_test_get_offset()
+ *
+ * Get the total offset currently being added the time
+ *
+ * Return:: number of milliseconds the system time has been advanced
+ */
+ulong timer_test_get_offset(void);
+#else
+static inline ulong timer_test_get_offset(void) { return 0; }
+#endif
+
/**
* usec_to_tick() - convert microseconds to clock ticks
*
diff --git a/test/Kconfig b/test/Kconfig
index 558a9cd49b4..31016eedbf8 100644
--- a/test/Kconfig
+++ b/test/Kconfig
@@ -20,9 +20,18 @@ config SPL_UNIT_TEST
of-platdata and SPL handover. To run these tests with the sandbox_spl
board, use the -u (unit test) option.
+if UNIT_TEST
+
+config UNIT_TEST_DURATION
+ bool "Report unit-test duration"
+ default y
+ help
+ Enable this short the time taken by each test suite. This is reported
+ after the suite runs, alongside the pass/fail results. In addition,
+ an overall total is reported if multiple suites are run.
+
config UT_LIB
bool "Unit tests for library functions"
- depends on UNIT_TEST
default y if !SANDBOX_VPL
help
Enables the 'ut lib' command which tests library functions like
@@ -63,16 +72,15 @@ config UT_LIB_RSA
Enables rsa_verify() test, currently rsa_verify_with_pkey only()
only, at the 'ut lib' command.
-endif
+endif # UT_LIB
config UT_BOOTSTD
bool "Unit tests for standard boot"
- depends on UNIT_TEST && BOOTSTD && SANDBOX
+ depends on BOOTSTD && SANDBOX
default y
config UT_COMPRESSION
bool "Unit test for compression"
- depends on UNIT_TEST
depends on CMDLINE && GZIP_COMPRESSED && BZIP2 && LZMA && LZO && LZ4 && ZSTD
default y
help
@@ -81,7 +89,6 @@ config UT_COMPRESSION
config UT_LOG
bool "Unit tests for logging functions"
- depends on UNIT_TEST
default y
help
Enables the 'ut log' command which tests logging functions like
@@ -90,7 +97,6 @@ config UT_LOG
config UT_TIME
bool "Unit tests for time functions"
- depends on UNIT_TEST
help
Enables the 'ut time' command which tests that the time functions
work correctly. The test is fairly simple and will not catch all
@@ -99,7 +105,6 @@ config UT_TIME
config UT_UNICODE
bool "Unit tests for Unicode functions"
- depends on UNIT_TEST
default y
select CHARSET
help
@@ -111,7 +116,9 @@ source "test/env/Kconfig"
source "test/image/Kconfig"
source "test/lib/Kconfig"
source "test/optee/Kconfig"
-source "test/overlay/Kconfig"
+source "test/fdt_overlay/Kconfig"
+
+endif # UNIT_TEST
config POST
bool "Power On Self Test support"
diff --git a/test/Makefile b/test/Makefile
index 47a07d653a9..99d4797d968 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -14,11 +14,14 @@ endif
ifneq ($(CONFIG_HUSH_PARSER),)
obj-$(CONFIG_$(XPL_)CMDLINE) += hush/
endif
+obj-$(CONFIG_UT_OPTEE) += optee/
obj-y += ut.o
ifeq ($(CONFIG_XPL_BUILD),)
obj-y += boot/
obj-$(CONFIG_UNIT_TEST) += common/
+obj-$(CONFIG_UT_ENV) += env/
+obj-$(CONFIG_UT_FDT_OVERLAY) += fdt_overlay/
obj-y += log/
else
obj-$(CONFIG_SPL_UT_LOAD) += image/
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c
index 8c44afd9297..5f07430714e 100644
--- a/test/boot/bootdev.c
+++ b/test/boot/bootdev.c
@@ -12,7 +12,6 @@
#include <bootflow.h>
#include <mapmem.h>
#include <os.h>
-#include <test/suites.h>
#include <test/ut.h>
#include "bootstd_common.h"
diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index a8735c1c23d..eb7f00af39a 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -21,7 +21,6 @@
#endif
#include <dm/device-internal.h>
#include <dm/lists.h>
-#include <test/suites.h>
#include <test/ut.h>
#include "bootstd_common.h"
#include "../../boot/bootflow_internal.h"
diff --git a/test/boot/bootm.c b/test/boot/bootm.c
index 7e0ccb0e23f..1d1efe71ad5 100644
--- a/test/boot/bootm.c
+++ b/test/boot/bootm.c
@@ -7,7 +7,6 @@
#include <bootm.h>
#include <asm/global_data.h>
-#include <test/suites.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/boot/bootmeth.c b/test/boot/bootmeth.c
index 18ae6d7fe13..577f259fb37 100644
--- a/test/boot/bootmeth.c
+++ b/test/boot/bootmeth.c
@@ -9,7 +9,6 @@
#include <bootmeth.h>
#include <bootstd.h>
#include <dm.h>
-#include <test/suites.h>
#include <test/ut.h>
#include "bootstd_common.h"
diff --git a/test/boot/bootstd_common.c b/test/boot/bootstd_common.c
index 724e3d9bdd2..052c0fe5cc6 100644
--- a/test/boot/bootstd_common.c
+++ b/test/boot/bootstd_common.c
@@ -13,7 +13,6 @@
#include <mmc.h>
#include <usb.h>
#include <linux/log2.h>
-#include <test/suites.h>
#include <test/ut.h>
#include <u-boot/crc.h>
#include "bootstd_common.h"
@@ -21,8 +20,14 @@
/* tracks whether bootstd_setup_for_tests() has been run yet */
bool vbe_setup_done;
-/* set up MMC for VBE tests */
-int bootstd_setup_for_tests(void)
+/**
+ * bootstd_setup_for_tests() - Set up MMC data for VBE tests
+ *
+ * Some data is needed for VBE tests to work. This function sets that up.
+ *
+ * @return 0 if OK, -ve on error
+ */
+static int bootstd_setup_for_tests(struct unit_test_state *uts)
{
ALLOC_CACHE_ALIGN_BUFFER(u8, buf, MMC_MAX_BLOCK_LEN);
struct udevice *mmc;
@@ -55,6 +60,7 @@ int bootstd_setup_for_tests(void)
return 0;
}
+BOOTSTD_TEST_INIT(bootstd_setup_for_tests, 0);
int bootstd_test_drop_bootdev_order(struct unit_test_state *uts)
{
@@ -93,20 +99,3 @@ void bootstd_reset_usb(void)
{
usb_started = false;
}
-
-int do_ut_bootstd(struct unit_test_state *uts, struct cmd_tbl *cmdtp, int flag,
- int argc, char *const argv[])
-{
- struct unit_test *tests = UNIT_TEST_SUITE_START(bootstd);
- const int n_ents = UNIT_TEST_SUITE_COUNT(bootstd);
- int ret;
-
- ret = bootstd_setup_for_tests();
- if (ret) {
- printf("Failed to set up for bootstd tests (err=%d)\n", ret);
- return CMD_RET_FAILURE;
- }
-
- return cmd_ut_category(uts, "bootstd", "bootstd_",
- tests, n_ents, argc, argv);
-}
diff --git a/test/boot/bootstd_common.h b/test/boot/bootstd_common.h
index ea3ecd1166c..c61698adc02 100644
--- a/test/boot/bootstd_common.h
+++ b/test/boot/bootstd_common.h
@@ -13,6 +13,7 @@
/* Declare a new bootdev test */
#define BOOTSTD_TEST(_name, _flags) UNIT_TEST(_name, _flags, bootstd)
+#define BOOTSTD_TEST_INIT(_name, _flags) UNIT_TEST_INIT(_name, _flags, bootstd)
#define NVDATA_START_BLK ((0x400 + 0x400) / MMC_MAX_BLOCK_LEN)
#define VERSION_START_BLK ((0x400 + 0x800) / MMC_MAX_BLOCK_LEN)
@@ -36,15 +37,6 @@ struct unit_test_state;
int bootstd_test_drop_bootdev_order(struct unit_test_state *uts);
/**
- * bootstd_setup_for_tests() - Set up MMC data for VBE tests
- *
- * Some data is needed for VBE tests to work. This function sets that up.
- *
- * @return 0 if OK, -ve on error
- */
-int bootstd_setup_for_tests(void);
-
-/**
* bootstd_test_check_mmc_hunter() - Check that the mmc bootdev hunter was used
*
* @uts: Unit test state to use for ut_assert...() functions
diff --git a/test/boot/expo.c b/test/boot/expo.c
index db14ff86f8b..1d283a2ac95 100644
--- a/test/boot/expo.c
+++ b/test/boot/expo.c
@@ -10,7 +10,6 @@
#include <menu.h>
#include <video.h>
#include <linux/input.h>
-#include <test/suites.h>
#include <test/ut.h>
#include "bootstd_common.h"
#include <test/cedit-test.h>
diff --git a/test/boot/image.c b/test/boot/image.c
index 0894e30587f..4df7b17ce88 100644
--- a/test/boot/image.c
+++ b/test/boot/image.c
@@ -7,7 +7,6 @@
*/
#include <image.h>
-#include <test/suites.h>
#include <test/ut.h>
#include "bootstd_common.h"
diff --git a/test/boot/measurement.c b/test/boot/measurement.c
index 5a49c7a6b23..1d38663fc0f 100644
--- a/test/boot/measurement.c
+++ b/test/boot/measurement.c
@@ -8,7 +8,6 @@
#include <bootm.h>
#include <malloc.h>
-#include <test/suites.h>
#include <test/test.h>
#include <test/ut.h>
#include <asm/io.h>
diff --git a/test/boot/upl.c b/test/boot/upl.c
index aa58cdf083b..eec89026fc3 100644
--- a/test/boot/upl.c
+++ b/test/boot/upl.c
@@ -10,7 +10,6 @@
#include <mapmem.h>
#include <upl.h>
#include <dm/ofnode.h>
-#include <test/suites.h>
#include <test/test.h>
#include <test/ut.h>
#include "bootstd_common.h"
diff --git a/test/boot/vbe_simple.c b/test/boot/vbe_simple.c
index 4fe4323b401..c37de627c52 100644
--- a/test/boot/vbe_simple.c
+++ b/test/boot/vbe_simple.c
@@ -11,7 +11,6 @@
#include <image.h>
#include <of_live.h>
#include <vbe.h>
-#include <test/suites.h>
#include <test/ut.h>
#include "bootstd_common.h"
@@ -33,9 +32,6 @@ static int vbe_simple_test_base(struct unit_test_state *uts)
ofnode node;
u32 vernum;
- /* Set up the VBE info */
- ut_assertok(bootstd_setup_for_tests());
-
/* Read the version back */
ut_assertok(vbe_find_by_any("firmware0", &dev));
ut_assertok(bootmeth_get_state_desc(dev, info, sizeof(info)));
diff --git a/test/cmd/addrmap.c b/test/cmd/addrmap.c
index 1f2deb15052..72798b96edd 100644
--- a/test/cmd/addrmap.c
+++ b/test/cmd/addrmap.c
@@ -6,7 +6,6 @@
*/
#include <console.h>
-#include <test/suites.h>
#include <test/ut.h>
/* Declare a new addrmap test */
diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c
index 7408c271a30..09f44ee41ed 100644
--- a/test/cmd/bdinfo.c
+++ b/test/cmd/bdinfo.c
@@ -10,7 +10,6 @@
#include <mapmem.h>
#include <asm/global_data.h>
#include <dm/uclass.h>
-#include <test/suites.h>
#include <test/ut.h>
#include <dm.h>
#include <env.h>
diff --git a/test/cmd/exit.c b/test/cmd/exit.c
index 71c37edcdf6..fdde054b928 100644
--- a/test/cmd/exit.c
+++ b/test/cmd/exit.c
@@ -8,7 +8,6 @@
#include <console.h>
#include <mapmem.h>
#include <asm/global_data.h>
-#include <test/suites.h>
#include <test/ut.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
index ab6dbd45e54..c11c181c807 100644
--- a/test/cmd/fdt.c
+++ b/test/cmd/fdt.c
@@ -10,7 +10,6 @@
#include <mapmem.h>
#include <asm/global_data.h>
#include <linux/libfdt.h>
-#include <test/suites.h>
#include <test/ut.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/test/cmd/font.c b/test/cmd/font.c
index af88d1b5459..7ae648d7395 100644
--- a/test/cmd/font.c
+++ b/test/cmd/font.c
@@ -8,7 +8,6 @@
#include <console.h>
#include <dm.h>
#include <video_console.h>
-#include <test/suites.h>
#include <test/ut.h>
/* Declare a new fdt test */
diff --git a/test/cmd/loadm.c b/test/cmd/loadm.c
index 3c623aa655f..043cd25dfb6 100644
--- a/test/cmd/loadm.c
+++ b/test/cmd/loadm.c
@@ -13,7 +13,6 @@
#include <mapmem.h>
#include <asm/global_data.h>
#include <dm/test.h>
-#include <test/suites.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/cmd/mbr.c b/test/cmd/mbr.c
index 45bab04923a..e651256a4cb 100644
--- a/test/cmd/mbr.c
+++ b/test/cmd/mbr.c
@@ -15,7 +15,6 @@
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <linux/sizes.h>
-#include <test/suites.h>
#include <test/ut.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/test/cmd/pci_mps.c b/test/cmd/pci_mps.c
index 8b3ea4a6134..6618c247d13 100644
--- a/test/cmd/pci_mps.c
+++ b/test/cmd/pci_mps.c
@@ -8,7 +8,6 @@
*/
#include <console.h>
-#include <test/suites.h>
#include <test/ut.h>
#define PCI_MPS_TEST(_name, _flags) UNIT_TEST(_name, _flags, pci_mps)
diff --git a/test/cmd/seama.c b/test/cmd/seama.c
index 1edc3fcac5a..39f85f1c502 100644
--- a/test/cmd/seama.c
+++ b/test/cmd/seama.c
@@ -7,7 +7,6 @@
#include <command.h>
#include <dm.h>
-#include <test/suites.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/cmd/setexpr.c b/test/cmd/setexpr.c
index 7f318a42ead..85803eb54b8 100644
--- a/test/cmd/setexpr.c
+++ b/test/cmd/setexpr.c
@@ -9,7 +9,6 @@
#include <console.h>
#include <mapmem.h>
#include <dm/test.h>
-#include <test/suites.h>
#include <test/ut.h>
#define BUF_SIZE 0x100
@@ -297,31 +296,19 @@ SETEXPR_TEST(setexpr_test_backref, UTF_CONSOLE);
/* Test 'setexpr' command with setting strings */
static int setexpr_test_str(struct unit_test_state *uts)
{
- ulong start_mem;
char *buf;
buf = map_sysmem(0, BUF_SIZE);
memset(buf, '\xff', BUF_SIZE);
- /*
- * Set 'fred' to the same length as we expect to get below, to avoid a
- * new allocation in 'setexpr'. That way we can check for memory leaks.
- */
ut_assertok(env_set("fred", "x"));
- start_mem = ut_check_free();
- strcpy(buf, "hello");
- ut_asserteq(1, run_command("setexpr.s fred 0", 0));
- ut_assertok(ut_check_delta(start_mem));
+ ut_asserteq(0, run_command("setexpr.s fred 0", 0));
+ ut_asserteq_str("0", env_get("fred"));
+ strcpy(buf, "hello");
ut_assertok(env_set("fred", "12345"));
- start_mem = ut_check_free();
ut_assertok(run_command("setexpr.s fred *0", 0));
ut_asserteq_str("hello", env_get("fred"));
- /*
- * This fails in CI at present.
- *
- * ut_assertok(ut_check_delta(start_mem));
- */
unmap_sysmem(buf);
@@ -332,45 +319,25 @@ SETEXPR_TEST(setexpr_test_str, UTF_CONSOLE);
/* Test 'setexpr' command with concatenating strings */
static int setexpr_test_str_oper(struct unit_test_state *uts)
{
- ulong start_mem;
char *buf;
+ /* Test concatenation of strings */
+ ut_assertok(run_command("setexpr.s fred '1' + '3'", 0));
+ ut_asserteq_str("13", env_get("fred"));
+
buf = map_sysmem(0, BUF_SIZE);
memset(buf, '\xff', BUF_SIZE);
strcpy(buf, "hello");
strcpy(buf + 0x10, " there");
- start_mem = ut_check_free();
ut_asserteq(1, run_command("setexpr.s fred *0 * *10", 0));
- ut_assertok(ut_check_delta(start_mem));
ut_assert_nextline("invalid op");
ut_assert_console_end();
- /*
- * Set 'fred' to the same length as we expect to get below, to avoid a
- * new allocation in 'setexpr'. That way we can check for memory leaks.
- */
ut_assertok(env_set("fred", "12345012345"));
- start_mem = ut_check_free();
ut_assertok(run_command("setexpr.s fred *0 + *10", 0));
ut_asserteq_str("hello there", env_get("fred"));
- /*
- * This check does not work with sandbox_flattree, apparently due to
- * memory allocations in env_set().
- *
- * The truetype console produces lots of memory allocations even though
- * the LCD display is not visible. But even without these, it does not
- * work.
- *
- * A better test would be for dlmalloc to record the allocs and frees
- * for a particular caller, but that is not supported.
- *
- * For now, drop this test.
- *
- * ut_assertok(ut_check_delta(start_mem));
- */
-
unmap_sysmem(buf);
return 0;
diff --git a/test/cmd_ut.c b/test/cmd_ut.c
index fbfdaaae0b5..44e5fdfdaa6 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -7,7 +7,6 @@
#include <command.h>
#include <console.h>
#include <vsprintf.h>
-#include <test/suites.h>
#include <test/test.h>
#include <test/ut.h>
@@ -20,77 +19,31 @@
* @name: Name of suite
* @start: First test in suite
* @end: End test in suite (points to the first test in the next suite)
- * @cmd: Command to use to run the suite
* @help: Help-string to show for this suite
*/
struct suite {
const char *name;
struct unit_test *start;
struct unit_test *end;
- ut_cmd_func cmd;
const char *help;
};
-static int do_ut_all(struct unit_test_state *uts, struct cmd_tbl *cmdtp,
- int flag, int argc, char *const argv[]);
+static int do_ut_all(struct unit_test_state *uts, const char *select_name,
+ int runs_per_test, bool force_run,
+ const char *test_insert);
-static int do_ut_info(struct cmd_tbl *cmdtp, int flag, int argc,
- char *const argv[]);
-
-int cmd_ut_category(struct unit_test_state *uts, const char *name,
- const char *prefix, struct unit_test *tests, int n_ents,
- int argc, char *const argv[])
-{
- const char *test_insert = NULL;
- int runs_per_text = 1;
- bool force_run = false;
- int ret;
-
- while (argc > 1 && *argv[1] == '-') {
- const char *str = argv[1];
-
- switch (str[1]) {
- case 'r':
- runs_per_text = dectoul(str + 2, NULL);
- break;
- case 'f':
- force_run = true;
- break;
- case 'I':
- test_insert = str + 2;
- break;
- }
- argv++;
- argc--;
- }
-
- ret = ut_run_list(uts, name, prefix, tests, n_ents,
- cmd_arg1(argc, argv), runs_per_text, force_run,
- test_insert);
-
- return ret ? CMD_RET_FAILURE : 0;
-}
+static int do_ut_info(bool show_suites);
/* declare linker-list symbols for the start and end of a suite */
#define SUITE_DECL(_name) \
ll_start_decl(suite_start_ ## _name, struct unit_test, ut_ ## _name); \
ll_end_decl(suite_end_ ## _name, struct unit_test, ut_ ## _name)
-/* declare a test suite which uses a subcommand to run */
-#define SUITE_CMD(_name, _cmd_func, _help) { \
- #_name, \
- suite_start_ ## _name, \
- suite_end_ ## _name, \
- _cmd_func, \
- _help, \
- }
-
/* declare a test suite which can be run directly without a subcommand */
#define SUITE(_name, _help) { \
#_name, \
suite_start_ ## _name, \
suite_end_ ## _name, \
- NULL, \
_help, \
}
@@ -105,6 +58,7 @@ SUITE_DECL(dm);
SUITE_DECL(env);
SUITE_DECL(exit);
SUITE_DECL(fdt);
+SUITE_DECL(fdt_overlay);
SUITE_DECL(font);
SUITE_DECL(hush);
SUITE_DECL(lib);
@@ -114,7 +68,6 @@ SUITE_DECL(mbr);
SUITE_DECL(measurement);
SUITE_DECL(mem);
SUITE_DECL(optee);
-SUITE_DECL(overlay);
SUITE_DECL(pci_mps);
SUITE_DECL(seama);
SUITE_DECL(setexpr);
@@ -125,15 +78,14 @@ static struct suite suites[] = {
SUITE(bdinfo, "bdinfo (board info) command"),
SUITE(bloblist, "bloblist implementation"),
SUITE(bootm, "bootm command"),
-#ifdef CONFIG_UT_BOOTSTD
- SUITE_CMD(bootstd, do_ut_bootstd, "standard boot implementation"),
-#endif
+ SUITE(bootstd, "standard boot implementation"),
SUITE(cmd, "various commands"),
SUITE(common, "tests for common/ directory"),
SUITE(dm, "driver model"),
SUITE(env, "environment"),
SUITE(exit, "shell exit and variables"),
SUITE(fdt, "fdt command"),
+ SUITE(fdt_overlay, "device tree overlays"),
SUITE(font, "font command"),
SUITE(hush, "hush behaviour"),
SUITE(lib, "library functions"),
@@ -142,12 +94,7 @@ static struct suite suites[] = {
SUITE(mbr, "mbr command"),
SUITE(measurement, "TPM-based measured boot"),
SUITE(mem, "memory-related commands"),
-#ifdef CONFIG_UT_OPTEE
- SUITE_CMD(optee, do_ut_optee, "OP-TEE"),
-#endif
-#ifdef CONFIG_UT_OVERLAY
- SUITE_CMD(overlay, do_ut_overlay, "device tree overlays"),
-#endif
+ SUITE(optee, "OP-TEE"),
SUITE(pci_mps, "PCI Express Maximum Payload Size"),
SUITE(seama, "seama command parameters loading and decoding"),
SUITE(setexpr, "setexpr command"),
@@ -167,33 +114,59 @@ static bool has_tests(struct suite *ste)
{
int n_ents = ste->end - ste->start;
- return n_ents || ste->cmd;
+ return n_ents;
}
/** run_suite() - Run a suite of tests */
static int run_suite(struct unit_test_state *uts, struct suite *ste,
- struct cmd_tbl *cmdtp, int flag, int argc,
- char *const argv[])
+ const char *select_name, int runs_per_test, bool force_run,
+ const char *test_insert)
{
+ int n_ents = ste->end - ste->start;
+ char prefix[30];
int ret;
- if (ste->cmd) {
- ret = ste->cmd(uts, cmdtp, flag, argc, argv);
- } else {
- int n_ents = ste->end - ste->start;
- char prefix[30];
+ /* use a standard prefix */
+ snprintf(prefix, sizeof(prefix), "%s_test_", ste->name);
- /* use a standard prefix */
- snprintf(prefix, sizeof(prefix), "%s_test", ste->name);
- ret = cmd_ut_category(uts, ste->name, prefix, ste->start,
- n_ents, argc, argv);
- }
+ ret = ut_run_list(uts, ste->name, prefix, ste->start, n_ents,
+ select_name, runs_per_test, force_run, test_insert);
return ret;
}
-static int do_ut_all(struct unit_test_state *uts, struct cmd_tbl *cmdtp,
- int flag, int argc, char *const argv[])
+static void show_stats(struct unit_test_state *uts)
+{
+ if (uts->run_count < 2)
+ return;
+
+ ut_report(&uts->total, uts->run_count);
+ if (CONFIG_IS_ENABLED(UNIT_TEST_DURATION) &&
+ uts->total.test_count && uts->worst) {
+ ulong avg = uts->total.duration_ms / uts->total.test_count;
+
+ printf("Average test time: %ld ms, worst case '%s' took %d ms\n",
+ avg, uts->worst->name, uts->worst_ms);
+ }
+}
+
+static void update_stats(struct unit_test_state *uts, const struct suite *ste)
+{
+ if (CONFIG_IS_ENABLED(UNIT_TEST_DURATION) && uts->cur.test_count) {
+ ulong avg;
+
+ avg = uts->cur.duration_ms ?
+ uts->cur.duration_ms /
+ uts->cur.test_count : 0;
+ if (avg > uts->worst_ms) {
+ uts->worst_ms = avg;
+ uts->worst = ste;
+ }
+ }
+}
+
+static int do_ut_all(struct unit_test_state *uts, const char *select_name,
+ int runs_per_test, bool force_run, const char *test_insert)
{
int i;
int retval;
@@ -201,25 +174,23 @@ static int do_ut_all(struct unit_test_state *uts, struct cmd_tbl *cmdtp,
for (i = 0; i < ARRAY_SIZE(suites); i++) {
struct suite *ste = &suites[i];
- char *const argv[] = {(char *)ste->name, NULL};
if (has_tests(ste)) {
printf("----Running %s tests----\n", ste->name);
- retval = run_suite(uts, ste, cmdtp, flag, 1, argv);
+ retval = run_suite(uts, ste, select_name, runs_per_test,
+ force_run, test_insert);
if (!any_fail)
any_fail = retval;
+ update_stats(uts, ste);
}
}
- ut_report(&uts->total, uts->run_count);
return any_fail;
}
-static int do_ut_info(struct cmd_tbl *cmdtp, int flag, int argc,
- char *const argv[])
+static int do_ut_info(bool show_suites)
{
int suite_count, i;
- const char *flags;
for (suite_count = 0, i = 0; i < ARRAY_SIZE(suites); i++) {
struct suite *ste = &suites[i];
@@ -231,24 +202,26 @@ static int do_ut_info(struct cmd_tbl *cmdtp, int flag, int argc,
printf("Test suites: %d\n", suite_count);
printf("Total tests: %d\n", (int)UNIT_TEST_ALL_COUNT());
- flags = cmd_arg1(argc, argv);
- if (flags && !strcmp("-s", flags)) {
- int i;
+ if (show_suites) {
+ int i, total;
puts("\nTests Suite Purpose");
puts("\n----- ------------ -------------------------\n");
- for (i = 0; i < ARRAY_SIZE(suites); i++) {
+ for (i = 0, total = 0; i < ARRAY_SIZE(suites); i++) {
struct suite *ste = &suites[i];
long n_ent = ste->end - ste->start;
- if (n_ent)
- printf("%5ld", n_ent);
- else if (ste->cmd)
- printf("%5s", "?");
- else /* suite is not present */
- continue;
- printf(" %-13.13s %s\n", ste->name, ste->help);
+ if (n_ent) {
+ printf("%5ld %-13.13s %s\n", n_ent, ste->name,
+ ste->help);
+ total += n_ent;
+ }
}
+ puts("----- ------------ -------------------------\n");
+ printf("%5d %-13.13s\n", total, "Total");
+
+ if (UNIT_TEST_ALL_COUNT() != total)
+ puts("Error: Suite test-count does not match total\n");
}
return 0;
@@ -269,37 +242,77 @@ static struct suite *find_suite(const char *name)
static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
+ const char *test_insert = NULL, *select_name;
struct unit_test_state uts;
+ bool show_suites = false;
+ bool force_run = false;
+ int runs_per_text = 1;
struct suite *ste;
- const char *name;
+ char *name;
int ret;
- if (argc < 2)
- return CMD_RET_USAGE;
-
/* drop initial "ut" arg */
argc--;
argv++;
+ while (argc > 0 && *argv[0] == '-') {
+ const char *str = argv[0];
+
+ switch (str[1]) {
+ case 'r':
+ runs_per_text = dectoul(str + 2, NULL);
+ break;
+ case 'f':
+ force_run = true;
+ break;
+ case 'I':
+ test_insert = str + 2;
+ if (!strchr(test_insert, ':'))
+ return CMD_RET_USAGE;
+ break;
+ case 's':
+ show_suites = true;
+ break;
+ }
+ argv++;
+ argc--;
+ }
+
+ if (argc < 1)
+ return CMD_RET_USAGE;
+
ut_init_state(&uts);
name = argv[0];
+ select_name = cmd_arg1(argc, argv);
if (!strcmp(name, "all")) {
- ret = do_ut_all(&uts, cmdtp, flag, argc, argv);
+ ret = do_ut_all(&uts, select_name, runs_per_text, force_run,
+ test_insert);
} else if (!strcmp(name, "info")) {
- ret = do_ut_info(cmdtp, flag, argc, argv);
+ ret = do_ut_info(show_suites);
} else {
- ste = find_suite(argv[0]);
- if (!ste) {
- printf("Suite '%s' not found\n", argv[0]);
- return CMD_RET_FAILURE;
- } else if (!has_tests(ste)) {
- /* perhaps a Kconfig option needs to be set? */
- printf("Suite '%s' is not enabled\n", argv[0]);
- return CMD_RET_FAILURE;
+ int any_fail = 0;
+ const char *p;
+
+ for (; p = strsep(&name, ","), p; name = NULL) {
+ ste = find_suite(p);
+ if (!ste) {
+ printf("Suite '%s' not found\n", p);
+ return CMD_RET_FAILURE;
+ } else if (!has_tests(ste)) {
+ /* perhaps a Kconfig option needs to be set? */
+ printf("Suite '%s' is not enabled\n", p);
+ return CMD_RET_FAILURE;
+ }
+
+ ret = run_suite(&uts, ste, select_name, runs_per_text,
+ force_run, test_insert);
+ if (!any_fail)
+ any_fail = ret;
+ update_stats(&uts, ste);
}
-
- ret = run_suite(&uts, ste, cmdtp, flag, argc, argv);
+ ret = any_fail;
}
+ show_stats(&uts);
if (ret)
return ret;
ut_uninit_state(&uts);
@@ -308,14 +321,16 @@ static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
}
U_BOOT_LONGHELP(ut,
- "[-r] [-f] [<suite>] - run unit tests\n"
+ "[-rs] [-f] [-I<n>:<one_test>][<suites>] - run unit tests\n"
" -r<runs> Number of times to run each test\n"
" -f Force 'manual' tests to run as well\n"
- " <suite> Test suite to run, or all\n"
+ " -I Test to run after <n> other tests have run\n"
+ " -s Show all suites with ut info\n"
+ " <suites> Comma-separated list of suites to run\n"
"\n"
- "\nOptions for <suite>:"
- "\nall - execute all enabled tests"
- "\ninfo [-s] - show info about tests [and suites]"
+ "Options for <suite>:\n"
+ "all - execute all enabled tests\n"
+ "info - show info about tests [and suites]"
);
U_BOOT_CMD(
diff --git a/test/common/bloblist.c b/test/common/bloblist.c
index ab8f41c6808..797bde27025 100644
--- a/test/common/bloblist.c
+++ b/test/common/bloblist.c
@@ -6,7 +6,6 @@
#include <bloblist.h>
#include <log.h>
#include <mapmem.h>
-#include <test/suites.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/Kconfig b/test/dm/Kconfig
index e5b341e523a..640421c2a79 100644
--- a/test/dm/Kconfig
+++ b/test/dm/Kconfig
@@ -1,6 +1,6 @@
config UT_DM
bool "Enable driver model unit test command"
- depends on SANDBOX && UNIT_TEST
+ depends on SANDBOX
help
This enables the 'ut dm' command which runs a series of unit
tests on the driver model code. Each subsystem (uclass) is tested.
diff --git a/test/dm/led.c b/test/dm/led.c
index e5b86326c3a..36652c2833a 100644
--- a/test/dm/led.c
+++ b/test/dm/led.c
@@ -20,7 +20,12 @@ static int dm_test_led_base(struct unit_test_state *uts)
ut_assertok(uclass_get_device(UCLASS_LED, 1, &dev));
ut_assertok(uclass_get_device(UCLASS_LED, 2, &dev));
ut_assertok(uclass_get_device(UCLASS_LED, 3, &dev));
- ut_asserteq(-ENODEV, uclass_get_device(UCLASS_LED, 4, &dev));
+ ut_assertok(uclass_get_device(UCLASS_LED, 4, &dev));
+ ut_assertok(uclass_get_device(UCLASS_LED, 5, &dev));
+ ut_assertok(uclass_get_device(UCLASS_LED, 6, &dev));
+ ut_assertok(uclass_get_device(UCLASS_LED, 7, &dev));
+ ut_assertok(uclass_get_device(UCLASS_LED, 8, &dev));
+ ut_asserteq(-ENODEV, uclass_get_device(UCLASS_LED, 9, &dev));
return 0;
}
@@ -110,6 +115,21 @@ static int dm_test_led_label(struct unit_test_state *uts)
ut_asserteq(-ENODEV, led_get_by_label("sandbox:blue", &dev));
+ /* Test if function, color and function-enumerator naming works */
+ ut_assertok(led_get_by_label("red:status-20", &dev));
+
+ /* Test if function, color naming works */
+ ut_assertok(led_get_by_label("green:status", &dev));
+
+ /* Test if function, without color naming works */
+ ut_assertok(led_get_by_label(":status", &dev));
+
+ /* Test if color without function naming works */
+ ut_assertok(led_get_by_label("green:", &dev));
+
+ /* Test if function, color naming is ignored if label is found */
+ ut_assertok(led_get_by_label("sandbox:function", &dev));
+
return 0;
}
DM_TEST(dm_test_led_label, UTF_SCAN_PDATA | UTF_SCAN_FDT);
diff --git a/test/dm/mux-cmd.c b/test/dm/mux-cmd.c
index 6eb3b283161..bd02cda84db 100644
--- a/test/dm/mux-cmd.c
+++ b/test/dm/mux-cmd.c
@@ -26,8 +26,6 @@ static int dm_test_cmd_mux_list(struct unit_test_state *uts)
int i;
unsigned long val;
- sandbox_set_enable_memio(true);
-
ut_assertok(uclass_get_device_by_name(UCLASS_MUX, "a-mux-controller",
&dev));
chip = dev_get_uclass_priv(dev);
@@ -119,8 +117,6 @@ static int dm_test_cmd_mux_select(struct unit_test_state *uts)
char cmd[BUF_SIZE];
unsigned int i, state;
- sandbox_set_enable_memio(true);
-
ut_assertok(uclass_get_device_by_name(UCLASS_MUX, "a-mux-controller",
&dev));
chip = dev_get_uclass_priv(dev);
@@ -153,8 +149,6 @@ static int dm_test_cmd_mux_deselect(struct unit_test_state *uts)
char cmd[BUF_SIZE];
unsigned int i, state;
- sandbox_set_enable_memio(true);
-
ut_assertok(uclass_get_device_by_name(UCLASS_MUX, "a-mux-controller",
&dev));
chip = dev_get_uclass_priv(dev);
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c
index 4a23a3ca38c..cc8b444ff9a 100644
--- a/test/dm/ofnode.c
+++ b/test/dm/ofnode.c
@@ -1599,7 +1599,7 @@ static int dm_test_ofnode_delete(struct unit_test_state *uts)
ut_assert(!ofnode_valid(node));
ut_assert(!ofnode_valid(ofnode_path("/leds/default_on")));
- ut_asserteq(2, ofnode_get_child_count(ofnode_path("/leds")));
+ ut_asserteq(7, ofnode_get_child_count(ofnode_path("/leds")));
return 0;
}
diff --git a/test/env/Kconfig b/test/env/Kconfig
index 6cb82337b36..21d88f47a6d 100644
--- a/test/env/Kconfig
+++ b/test/env/Kconfig
@@ -1,6 +1,5 @@
config UT_ENV
bool "Enable env unit tests"
- depends on UNIT_TEST
default y
help
This enables the 'ut env' command which runs a series of unit
diff --git a/test/env/cmd_ut_env.c b/test/env/cmd_ut_env.c
index 81d1bb2f80d..43f1b7d1cef 100644
--- a/test/env/cmd_ut_env.c
+++ b/test/env/cmd_ut_env.c
@@ -5,7 +5,6 @@
*/
#include <test/env.h>
-#include <test/suites.h>
#include <test/ut.h>
static int env_test_env_cmd(struct unit_test_state *uts)
diff --git a/test/overlay/Kconfig b/test/fdt_overlay/Kconfig
index 881848968bb..c50b8822544 100644
--- a/test/overlay/Kconfig
+++ b/test/fdt_overlay/Kconfig
@@ -1,6 +1,6 @@
-config UT_OVERLAY
+config UT_FDT_OVERLAY
bool "Enable Device Tree Overlays Unit Tests"
- depends on UNIT_TEST && OF_CONTROL && SANDBOX
+ depends on OF_CONTROL && SANDBOX
default y
select OF_LIBFDT_OVERLAY
help
diff --git a/test/overlay/Makefile b/test/fdt_overlay/Makefile
index 47937e3c108..5625c0d8885 100644
--- a/test/overlay/Makefile
+++ b/test/fdt_overlay/Makefile
@@ -4,7 +4,7 @@
# Copyright (c) 2016 Free Electrons
# Test files
-obj-y += cmd_ut_overlay.o
+obj-y += cmd_ut_fdt_overlay.o
DTC_FLAGS += -@
diff --git a/test/overlay/cmd_ut_overlay.c b/test/fdt_overlay/cmd_ut_fdt_overlay.c
index aefa147ec04..0084033b6ca 100644
--- a/test/overlay/cmd_ut_overlay.c
+++ b/test/fdt_overlay/cmd_ut_fdt_overlay.c
@@ -6,6 +6,7 @@
#include <command.h>
#include <errno.h>
+#include <fdtdec.h>
#include <fdt_support.h>
#include <image.h>
#include <log.h>
@@ -13,9 +14,8 @@
#include <linux/sizes.h>
+#include <test/fdt_overlay.h>
#include <test/ut.h>
-#include <test/overlay.h>
-#include <test/suites.h>
/* 4k ought to be enough for anybody */
#define FDT_COPY_SIZE (4 * SZ_1K)
@@ -26,32 +26,61 @@ extern u32 __dtbo_test_fdt_overlay_stacked_begin;
static void *fdt;
-static int ut_fdt_getprop_u32_by_index(void *fdt, const char *path,
- const char *name, int index,
- u32 *out)
+static int fdt_overlay_init(struct unit_test_state *uts)
{
- const fdt32_t *val;
- int node_off;
- int len;
+ void *fdt_base = &__dtb_test_fdt_base_begin;
+ void *fdt_overlay = &__dtbo_test_fdt_overlay_begin;
+ void *fdt_overlay_stacked = &__dtbo_test_fdt_overlay_stacked_begin;
+ void *fdt_overlay_copy, *fdt_overlay_stacked_copy;
- node_off = fdt_path_offset(fdt, path);
- if (node_off < 0)
- return node_off;
+ ut_assertok(fdt_check_header(fdt_base));
+ ut_assertok(fdt_check_header(fdt_overlay));
- val = fdt_getprop(fdt, node_off, name, &len);
- if (!val || (len < (sizeof(uint32_t) * (index + 1))))
- return -FDT_ERR_NOTFOUND;
+ fdt = malloc(FDT_COPY_SIZE);
+ fdt_overlay_copy = malloc(FDT_COPY_SIZE);
+ fdt_overlay_stacked_copy = malloc(FDT_COPY_SIZE);
+ ut_assertnonnull(fdt);
+ ut_assertnonnull(fdt_overlay_copy);
+ ut_assertnonnull(fdt_overlay_stacked_copy);
- *out = fdt32_to_cpu(*(val + index));
+ /*
+ * Resize the FDT to 4k so that we have room to operate on
+ *
+ * (and relocate it since the memory might be mapped
+ * read-only)
+ */
+ ut_assertok(fdt_open_into(fdt_base, fdt, FDT_COPY_SIZE));
- return 0;
-}
+ /*
+ * Resize the overlay to 4k so that we have room to operate on
+ *
+ * (and relocate it since the memory might be mapped
+ * read-only)
+ */
+ ut_assertok(fdt_open_into(fdt_overlay, fdt_overlay_copy,
+ FDT_COPY_SIZE));
-static int ut_fdt_getprop_u32(void *fdt, const char *path, const char *name,
- u32 *out)
-{
- return ut_fdt_getprop_u32_by_index(fdt, path, name, 0, out);
+ /*
+ * Resize the stacked overlay to 4k so that we have room to operate on
+ *
+ * (and relocate it since the memory might be mapped
+ * read-only)
+ */
+ ut_assertok(fdt_open_into(fdt_overlay_stacked, fdt_overlay_stacked_copy,
+ FDT_COPY_SIZE));
+
+ /* Apply the overlay */
+ ut_assertok(fdt_overlay_apply(fdt, fdt_overlay_copy));
+
+ /* Apply the stacked overlay */
+ ut_assertok(fdt_overlay_apply(fdt, fdt_overlay_stacked_copy));
+
+ free(fdt_overlay_stacked_copy);
+ free(fdt_overlay_copy);
+
+ return 0;
}
+FDT_OVERLAY_TEST_INIT(fdt_overlay_init, 0);
static int fdt_getprop_str(void *fdt, const char *path, const char *name,
const char **out)
@@ -68,19 +97,20 @@ static int fdt_getprop_str(void *fdt, const char *path, const char *name,
return len < 0 ? len : 0;
}
-static int fdt_overlay_change_int_property(struct unit_test_state *uts)
+static int fdt_overlay_test_change_int_property(struct unit_test_state *uts)
{
- u32 val = 0;
+ int off;
- ut_assertok(ut_fdt_getprop_u32(fdt, "/test-node", "test-int-property",
- &val));
- ut_asserteq(43, val);
+ off = fdt_path_offset(fdt, "/test-node");
+ ut_assert(off >= 0);
+
+ ut_asserteq(43, fdtdec_get_uint(fdt, off, "test-int-property", 0));
return CMD_RET_SUCCESS;
}
-OVERLAY_TEST(fdt_overlay_change_int_property, 0);
+FDT_OVERLAY_TEST(fdt_overlay_test_change_int_property, 0);
-static int fdt_overlay_change_str_property(struct unit_test_state *uts)
+static int fdt_overlay_test_change_str_property(struct unit_test_state *uts)
{
const char *val = NULL;
@@ -90,9 +120,9 @@ static int fdt_overlay_change_str_property(struct unit_test_state *uts)
return CMD_RET_SUCCESS;
}
-OVERLAY_TEST(fdt_overlay_change_str_property, 0);
+FDT_OVERLAY_TEST(fdt_overlay_test_change_str_property, 0);
-static int fdt_overlay_add_str_property(struct unit_test_state *uts)
+static int fdt_overlay_test_add_str_property(struct unit_test_state *uts)
{
const char *val = NULL;
@@ -102,9 +132,9 @@ static int fdt_overlay_add_str_property(struct unit_test_state *uts)
return CMD_RET_SUCCESS;
}
-OVERLAY_TEST(fdt_overlay_add_str_property, 0);
+FDT_OVERLAY_TEST(fdt_overlay_test_add_str_property, 0);
-static int fdt_overlay_add_node_by_phandle(struct unit_test_state *uts)
+static int fdt_overlay_test_add_node_by_phandle(struct unit_test_state *uts)
{
int off;
@@ -115,9 +145,9 @@ static int fdt_overlay_add_node_by_phandle(struct unit_test_state *uts)
return CMD_RET_SUCCESS;
}
-OVERLAY_TEST(fdt_overlay_add_node_by_phandle, 0);
+FDT_OVERLAY_TEST(fdt_overlay_test_add_node_by_phandle, 0);
-static int fdt_overlay_add_node_by_path(struct unit_test_state *uts)
+static int fdt_overlay_test_add_node_by_path(struct unit_test_state *uts)
{
int off;
@@ -128,9 +158,9 @@ static int fdt_overlay_add_node_by_path(struct unit_test_state *uts)
return CMD_RET_SUCCESS;
}
-OVERLAY_TEST(fdt_overlay_add_node_by_path, 0);
+FDT_OVERLAY_TEST(fdt_overlay_test_add_node_by_path, 0);
-static int fdt_overlay_add_subnode_property(struct unit_test_state *uts)
+static int fdt_overlay_test_add_subnode_property(struct unit_test_state *uts)
{
int off;
@@ -142,12 +172,12 @@ static int fdt_overlay_add_subnode_property(struct unit_test_state *uts)
return CMD_RET_SUCCESS;
}
-OVERLAY_TEST(fdt_overlay_add_subnode_property, 0);
+FDT_OVERLAY_TEST(fdt_overlay_test_add_subnode_property, 0);
-static int fdt_overlay_local_phandle(struct unit_test_state *uts)
+static int fdt_overlay_test_local_phandle(struct unit_test_state *uts)
{
uint32_t local_phandle;
- u32 val = 0;
+ u32 val[2];
int off;
off = fdt_path_offset(fdt, "/new-local-node");
@@ -156,22 +186,19 @@ static int fdt_overlay_local_phandle(struct unit_test_state *uts)
local_phandle = fdt_get_phandle(fdt, off);
ut_assert(local_phandle);
- ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-several-phandle",
- 0, &val));
- ut_asserteq(local_phandle, val);
-
- ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-several-phandle",
- 1, &val));
- ut_asserteq(local_phandle, val);
+ ut_assertok(fdtdec_get_int_array(fdt, 0, "test-several-phandle", val,
+ ARRAY_SIZE(val)));
+ ut_asserteq(local_phandle, val[0]);
+ ut_asserteq(local_phandle, val[1]);
return CMD_RET_SUCCESS;
}
-OVERLAY_TEST(fdt_overlay_local_phandle, 0);
+FDT_OVERLAY_TEST(fdt_overlay_test_local_phandle, 0);
-static int fdt_overlay_local_phandles(struct unit_test_state *uts)
+static int fdt_overlay_test_local_phandles(struct unit_test_state *uts)
{
uint32_t local_phandle, test_phandle;
- u32 val = 0;
+ u32 val[2];
int off;
off = fdt_path_offset(fdt, "/new-local-node");
@@ -186,95 +213,25 @@ static int fdt_overlay_local_phandles(struct unit_test_state *uts)
test_phandle = fdt_get_phandle(fdt, off);
ut_assert(test_phandle);
- ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-phandle", 0,
- &val));
- ut_asserteq(test_phandle, val);
-
- ut_assertok(ut_fdt_getprop_u32_by_index(fdt, "/", "test-phandle", 1,
- &val));
- ut_asserteq(local_phandle, val);
-
- return CMD_RET_SUCCESS;
-}
-OVERLAY_TEST(fdt_overlay_local_phandles, 0);
-
-static int fdt_overlay_stacked(struct unit_test_state *uts)
-{
- u32 val = 0;
-
- ut_assertok(ut_fdt_getprop_u32(fdt, "/new-local-node",
- "stacked-test-int-property", &val));
- ut_asserteq(43, val);
+ ut_assertok(fdtdec_get_int_array(fdt, 0, "test-phandle", val,
+ ARRAY_SIZE(val)));
+ ut_asserteq(test_phandle, val[0]);
+ ut_asserteq(local_phandle, val[1]);
return CMD_RET_SUCCESS;
}
-OVERLAY_TEST(fdt_overlay_stacked, 0);
+FDT_OVERLAY_TEST(fdt_overlay_test_local_phandles, 0);
-int do_ut_overlay(struct unit_test_state *uts, struct cmd_tbl *cmdtp, int flag,
- int argc, char *const argv[])
+static int fdt_overlay_test_stacked(struct unit_test_state *uts)
{
- struct unit_test *tests = UNIT_TEST_SUITE_START(overlay);
- const int n_ents = UNIT_TEST_SUITE_COUNT(overlay);
- void *fdt_base = &__dtb_test_fdt_base_begin;
- void *fdt_overlay = &__dtbo_test_fdt_overlay_begin;
- void *fdt_overlay_stacked = &__dtbo_test_fdt_overlay_stacked_begin;
- void *fdt_overlay_copy, *fdt_overlay_stacked_copy;
- int ret = -ENOMEM;
-
- ut_assertok(fdt_check_header(fdt_base));
- ut_assertok(fdt_check_header(fdt_overlay));
-
- fdt = malloc(FDT_COPY_SIZE);
- if (!fdt)
- goto err1;
-
- fdt_overlay_copy = malloc(FDT_COPY_SIZE);
- if (!fdt_overlay_copy)
- goto err2;
-
- fdt_overlay_stacked_copy = malloc(FDT_COPY_SIZE);
- if (!fdt_overlay_stacked_copy)
- goto err3;
-
- /*
- * Resize the FDT to 4k so that we have room to operate on
- *
- * (and relocate it since the memory might be mapped
- * read-only)
- */
- ut_assertok(fdt_open_into(fdt_base, fdt, FDT_COPY_SIZE));
-
- /*
- * Resize the overlay to 4k so that we have room to operate on
- *
- * (and relocate it since the memory might be mapped
- * read-only)
- */
- ut_assertok(fdt_open_into(fdt_overlay, fdt_overlay_copy,
- FDT_COPY_SIZE));
-
- /*
- * Resize the stacked overlay to 4k so that we have room to operate on
- *
- * (and relocate it since the memory might be mapped
- * read-only)
- */
- ut_assertok(fdt_open_into(fdt_overlay_stacked, fdt_overlay_stacked_copy,
- FDT_COPY_SIZE));
-
- /* Apply the overlay */
- ut_assertok(fdt_overlay_apply(fdt, fdt_overlay_copy));
+ int off;
- /* Apply the stacked overlay */
- ut_assertok(fdt_overlay_apply(fdt, fdt_overlay_stacked_copy));
+ off = fdt_path_offset(fdt, "/new-local-node");
+ ut_assert(off > 0);
- ret = cmd_ut_category(uts, "overlay", "", tests, n_ents, argc, argv);
+ ut_asserteq(43,
+ fdtdec_get_uint(fdt, off, "stacked-test-int-property", 0));
- free(fdt_overlay_stacked_copy);
-err3:
- free(fdt_overlay_copy);
-err2:
- free(fdt);
-err1:
- return ret;
+ return CMD_RET_SUCCESS;
}
+FDT_OVERLAY_TEST(fdt_overlay_test_stacked, 0);
diff --git a/test/overlay/test-fdt-base.dts b/test/fdt_overlay/test-fdt-base.dts
index 38278334e4d..38278334e4d 100644
--- a/test/overlay/test-fdt-base.dts
+++ b/test/fdt_overlay/test-fdt-base.dts
diff --git a/test/overlay/test-fdt-overlay-stacked.dtso b/test/fdt_overlay/test-fdt-overlay-stacked.dtso
index 6411adec539..6411adec539 100644
--- a/test/overlay/test-fdt-overlay-stacked.dtso
+++ b/test/fdt_overlay/test-fdt-overlay-stacked.dtso
diff --git a/test/overlay/test-fdt-overlay.dtso b/test/fdt_overlay/test-fdt-overlay.dtso
index 5a21b346d07..5a21b346d07 100644
--- a/test/overlay/test-fdt-overlay.dtso
+++ b/test/fdt_overlay/test-fdt-overlay.dtso
diff --git a/test/log/cont_test.c b/test/log/cont_test.c
index 32b1c792367..3b3b791f025 100644
--- a/test/log/cont_test.c
+++ b/test/log/cont_test.c
@@ -9,7 +9,6 @@
#include <asm/global_data.h>
#include <test/log.h>
#include <test/test.h>
-#include <test/suites.h>
#include <test/ut.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/test/log/nolog_test.c b/test/log/nolog_test.c
index 341dbfc9310..1913e6817a7 100644
--- a/test/log/nolog_test.c
+++ b/test/log/nolog_test.c
@@ -13,7 +13,6 @@
#include <asm/global_data.h>
#include <test/log.h>
#include <test/test.h>
-#include <test/suites.h>
#include <test/ut.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/test/log/pr_cont_test.c b/test/log/pr_cont_test.c
index 7734e927f98..67d8ac59db9 100644
--- a/test/log/pr_cont_test.c
+++ b/test/log/pr_cont_test.c
@@ -8,7 +8,6 @@
#include <console.h>
#include <test/log.h>
#include <test/test.h>
-#include <test/suites.h>
#include <test/ut.h>
#include <asm/global_data.h>
#include <linux/printk.h>
diff --git a/test/log/syslog_test.c b/test/log/syslog_test.c
index c4180f775b9..98b91436580 100644
--- a/test/log/syslog_test.c
+++ b/test/log/syslog_test.c
@@ -15,7 +15,6 @@
#include <hexdump.h>
#include <test/log.h>
#include <test/test.h>
-#include <test/suites.h>
#include <test/ut.h>
#include <asm/eth.h>
#include "syslog_test.h"
diff --git a/test/log/syslog_test_ndebug.c b/test/log/syslog_test_ndebug.c
index b10e636812b..dfd0217c1e4 100644
--- a/test/log/syslog_test_ndebug.c
+++ b/test/log/syslog_test_ndebug.c
@@ -12,7 +12,6 @@
#include <hexdump.h>
#include <test/log.h>
#include <test/test.h>
-#include <test/suites.h>
#include <test/ut.h>
#include <asm/eth.h>
#include "syslog_test.h"
diff --git a/test/optee/Kconfig b/test/optee/Kconfig
index 2f6834aa3b4..63e2cbf79c7 100644
--- a/test/optee/Kconfig
+++ b/test/optee/Kconfig
@@ -1,6 +1,6 @@
config UT_OPTEE
bool "Enable OP-TEE Unit Tests"
- depends on UNIT_TEST && OF_CONTROL && OPTEE
+ depends on OF_CONTROL && OPTEE
default y
help
This enables the 'ut optee' command which runs a series of unit
diff --git a/test/optee/Makefile b/test/optee/Makefile
index 8793fd7ad61..ec56750fa80 100644
--- a/test/optee/Makefile
+++ b/test/optee/Makefile
@@ -3,7 +3,7 @@
# Copyright (C) 2019, Theobroma Systems Design und Consulting GmbH
# Test files
-obj-y += cmd_ut_optee.o
+obj-y += optee.o
DTC_FLAGS += -@
diff --git a/test/optee/cmd_ut_optee.c b/test/optee/optee.c
index fc6674764f9..658621fa2fa 100644
--- a/test/optee/cmd_ut_optee.c
+++ b/test/optee/optee.c
@@ -14,7 +14,6 @@
#include <test/ut.h>
#include <test/optee.h>
-#include <test/suites.h>
/* 4k ought to be enough for anybody */
#define FDT_COPY_SIZE (4 * SZ_1K)
@@ -26,6 +25,41 @@ extern u32 __dtb_test_optee_no_optee_begin;
static void *fdt;
static bool expect_success;
+static int optee_test_init(struct unit_test_state *uts)
+{
+ void *fdt_optee = &__dtb_test_optee_optee_begin;
+ void *fdt_no_optee = &__dtb_test_optee_no_optee_begin;
+ void *fdt_base = &__dtb_test_optee_base_begin;
+ int ret = -ENOMEM;
+
+ ut_assertok(fdt_check_header(fdt_base));
+ ut_assertok(fdt_check_header(fdt_optee));
+ ut_assertok(fdt_check_header(fdt_no_optee));
+
+ fdt = malloc(FDT_COPY_SIZE);
+ if (!fdt)
+ return ret;
+
+ /*
+ * Resize the FDT to 4k so that we have room to operate on
+ *
+ * (and relocate it since the memory might be mapped
+ * read-only)
+ */
+ ut_assertok(fdt_open_into(fdt_base, fdt, FDT_COPY_SIZE));
+
+ return 0;
+}
+OPTEE_TEST_INIT(optee_test_init, 0);
+
+static int optee_test_uninit(struct unit_test_state *uts)
+{
+ free(fdt);
+
+ return 0;
+}
+OPTEE_TEST_UNINIT(optee_test_uninit, 0);
+
static int optee_fdt_firmware(struct unit_test_state *uts)
{
const void *prop;
@@ -46,7 +80,6 @@ static int optee_fdt_firmware(struct unit_test_state *uts)
return CMD_RET_SUCCESS;
}
-OPTEE_TEST(optee_fdt_firmware, 0);
static int optee_fdt_protected_memory(struct unit_test_state *uts)
{
@@ -89,60 +122,50 @@ static int optee_fdt_protected_memory(struct unit_test_state *uts)
return CMD_RET_SUCCESS;
}
-OPTEE_TEST(optee_fdt_protected_memory, 0);
-int do_ut_optee(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
+/* (1) Try to copy optee nodes from empty dt */
+static int optee_fdt_copy_empty(struct unit_test_state *uts)
{
- struct unit_test *tests = UNIT_TEST_SUITE_START(optee);
- const int n_ents = UNIT_TEST_SUITE_COUNT(optee);
- struct unit_test_state *uts;
- void *fdt_optee = &__dtb_test_optee_optee_begin;
void *fdt_no_optee = &__dtb_test_optee_no_optee_begin;
- void *fdt_base = &__dtb_test_optee_base_begin;
- int ret = -ENOMEM;
-
- uts = calloc(1, sizeof(*uts));
- if (!uts)
- return -ENOMEM;
-
- ut_assertok(fdt_check_header(fdt_base));
- ut_assertok(fdt_check_header(fdt_optee));
- ut_assertok(fdt_check_header(fdt_no_optee));
-
- fdt = malloc(FDT_COPY_SIZE);
- if (!fdt)
- return ret;
- /*
- * Resize the FDT to 4k so that we have room to operate on
- *
- * (and relocate it since the memory might be mapped
- * read-only)
- */
- ut_assertok(fdt_open_into(fdt_base, fdt, FDT_COPY_SIZE));
-
- /*
- * (1) Try to copy optee nodes from empty dt.
- * This should still run successfully.
- */
+ /* This should still run successfully */
ut_assertok(optee_copy_fdt_nodes(fdt_no_optee, fdt));
expect_success = false;
- ret = cmd_ut_category("optee", "", tests, n_ents, argc, argv);
+ ut_assertok(optee_fdt_firmware(uts));
+ ut_assertok(optee_fdt_protected_memory(uts));
+
+ return 0;
+}
+OPTEE_TEST(optee_fdt_copy_empty, 0);
+
+/* (2) Try to copy optee nodes from prefilled dt */
+static int optee_fdt_copy_prefilled(struct unit_test_state *uts)
+{
+ void *fdt_optee = &__dtb_test_optee_optee_begin;
- /* (2) Try to copy optee nodes from prefilled dt */
ut_assertok(optee_copy_fdt_nodes(fdt_optee, fdt));
expect_success = true;
- ret = cmd_ut_category("optee", "", tests, n_ents, argc, argv);
+ ut_assertok(optee_fdt_firmware(uts));
+ ut_assertok(optee_fdt_protected_memory(uts));
+
+ return 0;
+}
+OPTEE_TEST(optee_fdt_copy_prefilled, 0);
+
+/* (3) Try to copy OP-TEE nodes into a already filled DT */
+static int optee_fdt_copy_already_filled(struct unit_test_state *uts)
+{
+ void *fdt_optee = &__dtb_test_optee_optee_begin;
- /* (3) Try to copy OP-TEE nodes into a already filled DT */
ut_assertok(fdt_open_into(fdt_optee, fdt, FDT_COPY_SIZE));
ut_assertok(optee_copy_fdt_nodes(fdt_optee, fdt));
expect_success = true;
- ret = cmd_ut_category("optee", "", tests, n_ents, argc, argv);
+ ut_assertok(optee_fdt_firmware(uts));
+ ut_assertok(optee_fdt_protected_memory(uts));
- free(fdt);
- return ret;
+ return 0;
}
+OPTEE_TEST(optee_fdt_copy_already_filled, 0);
diff --git a/test/py/tests/test_suite.py b/test/py/tests/test_suite.py
index 73c185349b4..9ddc883394b 100644
--- a/test/py/tests/test_suite.py
+++ b/test/py/tests/test_suite.py
@@ -7,10 +7,10 @@ import re
# List of test suites we expect to find with 'ut info' and 'ut all'
EXPECTED_SUITES = [
'addrmap', 'bdinfo', 'bloblist', 'bootm', 'bootstd',
- 'cmd', 'common', 'dm', 'env', 'exit',
+ 'cmd', 'common', 'dm', 'env', 'exit', 'fdt_overlay',
'fdt', 'font', 'hush', 'lib',
'loadm', 'log', 'mbr', 'measurement', 'mem',
- 'overlay', 'pci_mps', 'setexpr', 'upl',
+ 'pci_mps', 'setexpr', 'upl',
]
@@ -66,11 +66,12 @@ def collect_info(cons, output):
msg = m.group(3)
if DEBUG_ME:
cons.log.info(f"test_name {test_name} msg '{msg}'")
- if msg == ' (flat tree)' and test_name not in tests:
- tests.add(test_name)
+ full_name = f'{cur_suite}.{test_name}'
+ if msg == ' (flat tree)' and full_name not in tests:
+ tests.add(full_name)
test_count += 1
if not msg or 'skipped as it is manual' in msg:
- tests.add(test_name)
+ tests.add(full_name)
test_count += 1
if DEBUG_ME:
cons.log.info(f'test_count {test_count}')
@@ -134,7 +135,7 @@ def xtest_suite(u_boot_console, u_boot_config):
- The number of suites matches that reported by the 'ut info'
- Where available, the number of tests is each suite matches that
- reported by 'ut info -s'
+ reported by 'ut -s info'
- The total number of tests adds up to the total that are actually run
with 'ut all'
- All suites are run with 'ut all'
@@ -166,7 +167,7 @@ def xtest_suite(u_boot_console, u_boot_config):
# Run 'ut info' and compare with the log results
with cons.log.section('Check suite test-counts'):
- output = cons.run_command('ut info -s')
+ output = cons.run_command('ut -s info')
suite_count, total_test_count, test_count = process_ut_info(cons,
output)
@@ -186,3 +187,22 @@ def xtest_suite(u_boot_console, u_boot_config):
assert suite_count == len(EXPECTED_SUITES)
assert total_test_count == len(all_tests)
+
+ # Run three suites
+ with cons.log.section('Check multiple suites'):
+ output = cons.run_command('ut bloblist,setexpr,mem')
+ assert 'Suites run: 3' in output
+
+ # Run a particular test
+ with cons.log.section('Check single test'):
+ output = cons.run_command('ut bloblist reloc')
+ assert 'Test: reloc: bloblist.c' in output
+
+ # Run tests multiple times
+ with cons.log.section('Check multiple runs'):
+ output = cons.run_command('ut -r2 bloblist')
+ lines = output.splitlines()
+ run = len([line for line in lines if 'Test:' in line])
+ count = re.search(r'Tests run: (\d*)', lines[-1]).group(1)
+
+ assert run == 2 * int(count)
diff --git a/test/py/tests/test_usb.py b/test/py/tests/test_usb.py
index e1f203b5cbc..566d73b7c64 100644
--- a/test/py/tests/test_usb.py
+++ b/test/py/tests/test_usb.py
@@ -242,7 +242,7 @@ def test_usb_part(u_boot_console):
elif part_type == '83':
print('ext(2/4) detected')
output = u_boot_console.run_command(
- 'fstype usb %d:%d' % i, part_id
+ 'fstype usb %d:%d' % (i, part_id)
)
if 'ext2' in output:
part_ext2.append(part_id)
diff --git a/test/test-main.c b/test/test-main.c
index 22b9b46d9cd..cabc736a524 100644
--- a/test/test-main.c
+++ b/test/test-main.c
@@ -14,6 +14,7 @@
#include <net.h>
#include <of_live.h>
#include <os.h>
+#include <spl.h>
#include <usb.h>
#include <dm/ofnode.h>
#include <dm/root.h>
@@ -513,11 +514,12 @@ static int ut_run_test(struct unit_test_state *uts, struct unit_test *test,
* the first call to this function. On exit, @uts->cur.fail_count is
* incremented by the number of failures (0, one hopes)
* @test: Test to run
+ * @leaf: Part of the name to show, or NULL to use test->name
* Return: 0 if all tests passed, -EAGAIN if the test should be skipped, -1 if
* any failed
*/
static int ut_run_test_live_flat(struct unit_test_state *uts,
- struct unit_test *test)
+ struct unit_test *test, const char *leaf)
{
int runs, ret;
@@ -529,7 +531,7 @@ static int ut_run_test_live_flat(struct unit_test_state *uts,
if (CONFIG_IS_ENABLED(OF_LIVE)) {
if (!(test->flags & UTF_FLAT_TREE)) {
uts->of_live = true;
- ret = ut_run_test(uts, test, test->name);
+ ret = ut_run_test(uts, test, leaf ?: test->name);
if (ret != -EAGAIN) {
ut_assertok(ret);
runs++;
@@ -557,7 +559,7 @@ static int ut_run_test_live_flat(struct unit_test_state *uts,
(!runs || ut_test_run_on_flattree(test)) &&
!(gd->flags & GD_FLG_FDT_CHANGED)) {
uts->of_live = false;
- ret = ut_run_test(uts, test, test->name);
+ ret = ut_run_test(uts, test, leaf ?: test->name);
if (ret != -EAGAIN) {
ut_assertok(ret);
runs++;
@@ -593,6 +595,7 @@ static int ut_run_tests(struct unit_test_state *uts, const char *prefix,
struct unit_test *tests, int count,
const char *select_name, const char *test_insert)
{
+ int prefix_len = prefix ? strlen(prefix) : 0;
struct unit_test *test, *one;
int found = 0;
int pos = 0;
@@ -617,7 +620,8 @@ static int ut_run_tests(struct unit_test_state *uts, const char *prefix,
const char *test_name = test->name;
int ret, i, old_fail_count;
- if (!test_matches(prefix, test_name, select_name))
+ if (!(test->flags & (UTF_INIT | UTF_UNINIT)) &&
+ !test_matches(prefix, test_name, select_name))
continue;
if (test->flags & UTF_MANUAL) {
@@ -645,7 +649,7 @@ static int ut_run_tests(struct unit_test_state *uts, const char *prefix,
uts->cur.test_count++;
if (one && upto == pos) {
- ret = ut_run_test_live_flat(uts, one);
+ ret = ut_run_test_live_flat(uts, one, NULL);
if (uts->cur.fail_count != old_fail_count) {
printf("Test '%s' failed %d times (position %d)\n",
one->name,
@@ -655,8 +659,11 @@ static int ut_run_tests(struct unit_test_state *uts, const char *prefix,
return -EBADF;
}
+ if (prefix_len && !strncmp(test_name, prefix, prefix_len))
+ test_name = test_name + prefix_len;
+
for (i = 0; i < uts->runs_per_test; i++)
- ret = ut_run_test_live_flat(uts, test);
+ ret = ut_run_test_live_flat(uts, test, test_name);
if (uts->cur.fail_count != old_fail_count) {
printf("Test '%s' failed %d times\n", test_name,
uts->cur.fail_count - old_fail_count);
@@ -680,6 +687,12 @@ void ut_report(struct ut_stats *stats, int run_count)
else
printf("Tests");
printf(" run: %d, ", stats->test_count);
+ if (stats && stats->test_count) {
+ ulong dur = stats->duration_ms;
+
+ printf("%ld ms, average: %ld ms, ", dur,
+ dur ? dur / stats->test_count : 0);
+ }
if (stats->skip_count)
printf("skipped: %d, ", stats->skip_count);
printf("failures: %d\n", stats->fail_count);
@@ -692,16 +705,22 @@ int ut_run_list(struct unit_test_state *uts, const char *category,
{
;
bool has_dm_tests = false;
+ ulong start_offset = 0;
+ ulong test_offset = 0;
int ret;
memset(&uts->cur, '\0', sizeof(struct ut_stats));
+ if (CONFIG_IS_ENABLED(UNIT_TEST_DURATION)) {
+ uts->cur.start = get_timer(0);
+ start_offset = timer_test_get_offset();
+ }
if (!CONFIG_IS_ENABLED(OF_PLATDATA) &&
ut_list_has_dm_tests(tests, count, prefix, select_name)) {
has_dm_tests = true;
/*
* If we have no device tree, or it only has a root node, then
- * these * tests clearly aren't going to work...
+ * these tests clearly aren't going to work...
*/
if (!gd->fdt_blob || fdt_next_node(gd->fdt_blob, 0, NULL) < 0) {
puts("Please run with test device tree:\n"
@@ -732,13 +751,19 @@ int ut_run_list(struct unit_test_state *uts, const char *category,
if (has_dm_tests)
dm_test_restore(uts->of_root);
- ut_report(&uts->cur, 1);
if (ret == -ENOENT)
printf("Test '%s' not found\n", select_name);
+ if (CONFIG_IS_ENABLED(UNIT_TEST_DURATION)) {
+ test_offset = timer_test_get_offset() - start_offset;
+
+ uts->cur.duration_ms = get_timer(uts->cur.start) - test_offset;
+ }
+ ut_report(&uts->cur, 1);
uts->total.skip_count += uts->cur.skip_count;
uts->total.fail_count += uts->cur.fail_count;
uts->total.test_count += uts->cur.test_count;
+ uts->total.duration_ms += uts->cur.duration_ms;
uts->run_count++;
return ret;
diff --git a/tools/image-host.c b/tools/image-host.c
index 84095d760c1..05d8c898209 100644
--- a/tools/image-host.c
+++ b/tools/image-host.c
@@ -716,11 +716,20 @@ static int strlist_add(struct strlist *list, const char *str)
{
char *dup;
+ if (!list || !str)
+ return -1;
+
dup = strdup(str);
+ if(!dup)
+ return -1;
+
list->strings = realloc(list->strings,
(list->count + 1) * sizeof(char *));
- if (!list || !str)
+ if (!list->strings) {
+ free(dup);
return -1;
+ }
+
list->strings[list->count++] = dup;
return 0;
diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index a8eebab6c33..885cdb1390e 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -28,7 +28,7 @@
static void usage(const char *exec_name)
{
- fprintf(stderr, "%s [-h] [-r] [-b] [-p <byte>] -s <environment partition size> -o <output> <input file>\n"
+ fprintf(stderr, "%s [-h] [-V] [-r] [-b] [-p <byte>] -s <environment partition size> -o <output> <input file>\n"
"\n"
"This tool takes a key=value input file (same as would a `printenv' show) and generates the corresponding environment image, ready to be flashed.\n"
"\n"
diff --git a/tools/proftool.c b/tools/proftool.c
index af2cdb6d584..c7b427f3078 100644
--- a/tools/proftool.c
+++ b/tools/proftool.c
@@ -676,6 +676,7 @@ static int read_trace_config(FILE *fin)
if (!tok) {
error("Invalid trace config data on line %d\n",
linenum);
+ free(line);
return -1;
}
if (0 == strcmp(tok, "include-func")) {
@@ -685,6 +686,7 @@ static int read_trace_config(FILE *fin)
} else {
error("Unknown command in trace config data line %d\n",
linenum);
+ free(line);
return -1;
}
@@ -692,6 +694,7 @@ static int read_trace_config(FILE *fin)
if (!tok) {
error("Missing pattern in trace config data line %d\n",
linenum);
+ free(line);
return -1;
}
diff --git a/tools/ublimage.c b/tools/ublimage.c
index 8f9b58c7983..a1bd807bfa0 100644
--- a/tools/ublimage.c
+++ b/tools/ublimage.c
@@ -178,6 +178,7 @@ static uint32_t parse_cfg_file(struct ubl_header *ublhdr, char *name)
lineno, fld, &dcd_len);
}
}
+ free(line);
fclose(fd);
return dcd_len;