From 9e6da34c72274578be6f86ba7b7aa7849a624315 Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Wed, 19 May 2021 16:27:41 +0200 Subject: tee: optee: sync cache on pre-reloc OP-TEE invocation This change ensures both U-Boot and OP-TEE see the same content from shared memory when OP-TEE is invoked prior U-Boot relocation. This change is required since U-Boot may execute with data cache off while OP-TEE always enables cache on memory shared with U-Boot. Signed-off-by: Etienne Carriere Reviewed-by: Jens Wiklander Acked-by: Ilias Apalodimas --- include/tee.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/tee.h b/include/tee.h index 99367b258e2..2ef29bfc8fa 100644 --- a/include/tee.h +++ b/include/tee.h @@ -377,4 +377,10 @@ void tee_optee_ta_uuid_from_octets(struct tee_optee_ta_uuid *d, void tee_optee_ta_uuid_to_octets(u8 d[TEE_UUID_LEN], const struct tee_optee_ta_uuid *s); +/** + * tee_flush_all_shm_dcache() - Flush data cache for all shared memories + * @dev: The TEE device + */ +void tee_flush_all_shm_dcache(struct udevice *dev); + #endif /* __TEE_H */ -- cgit v1.2.3 From 4c60fd993a21a285c645c6d46762d8c2992b7dd7 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Fri, 21 May 2021 09:47:31 +0200 Subject: cmd: pinmux: update result of do_status Update the result of do_status and always returns a CMD_RET_ value (-ENOSYS was a possible result of show_pinmux). This patch also adds pincontrol name in error messages (dev->name) and treats correctly the status sub command when pin-controller device is not selected. Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass --- include/dm/pinctrl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h index 1bdc8d3cbd7..695e78ad0de 100644 --- a/include/dm/pinctrl.h +++ b/include/dm/pinctrl.h @@ -587,7 +587,7 @@ int pinctrl_get_pin_muxing(struct udevice *dev, int selector, char *buf, * * This allows to know the number of pins owned by a given pin-controller * - * Return: Number of pins if OK, or negative error code on failure + * Return: Number of pins if OK, or -ENOSYS when not supported */ int pinctrl_get_pins_count(struct udevice *dev); -- cgit v1.2.3 From ccadfca251aa83982e01fc6278405a316831c933 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Mon, 12 Jul 2021 00:07:09 +0100 Subject: distro_boot: Fix block device after DHCP boot sequence The generic distro boot sequence iterates over several types of devices, trying one after another. In doing do, it starts with setting the "devtype" variable, then uses this later in more generic commands. Now most (block) device types use a local variable for that, but DHCP puts the type into the environment, where it shadows any local variables. As a consequence any boot attempt after bootcmd_dhcp has been run fails: =========================== VExpress64# run bootcmd_dhcp ... VExpress64# run bootcmd_sata0 SATA#0: (3.0 Gbps) SATA#1: (No RDY) Device 0: Model: 16GB SATA Flash Drive .... ... is now current device Couldn't find partition dhcp 0:1 =========================== This problem typically doesn't show, because DHCP is mostly the last command to try, but is a problem when this order is different, or when distro_bootcmd or bootcmd_xxx are run separately or multiple times. Let bootcmd_dhcp use a local variable, as the other kids do, to make the order of boot commands irrelevant, and allow repeated calls. Signed-off-by: Andre Przywara Reviewed-by: Simon Glass --- include/config_distro_bootcmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 2627c2a6a54..e70423f25dd 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -375,7 +375,7 @@ #endif #define BOOTENV_DEV_DHCP(devtypeu, devtypel, instance) \ "bootcmd_dhcp=" \ - "setenv devtype " #devtypel "; " \ + "devtype=" #devtypel "; " \ BOOTENV_RUN_NET_USB_START \ BOOTENV_RUN_PCI_ENUM \ "if dhcp ${scriptaddr} ${boot_script_dhcp}; then " \ -- cgit v1.2.3 From d3c1b514dc4774d14150cba9a19de22cc2a37e7a Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Mon, 12 Jul 2021 00:25:15 +0100 Subject: arm: vexpress64: juno: Enable distro_bootcmd functionality The ARM Juno boards can be used as somewhat decent machines to run off-the-shelf distributions, with USB, SATA, GBit Ethernet and 8GB of DRAM. With stable DTs in the board's NOR flash this would work really nicely, however the default boot command is to fetch a kernel and an initrd from the on-board NOR flash, which sounds somewhat embedded. Include the config_distro_bootcmd.h header and define the available devices (starting with USB, to catch USB installer sticks) to make distributions and UEFI work out of the box. The NOR flash kernel functionality is still preserved as the last resort, should all other methods fail. Signed-off-by: Andre Przywara Reviewed-by: Simon Glass Reviewed-by: Linus Walleij --- include/configs/vexpress_aemv8a.h | 58 +++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 24 deletions(-) (limited to 'include') diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h index 7318fb6c585..54b5967a89d 100644 --- a/include/configs/vexpress_aemv8a.h +++ b/include/configs/vexpress_aemv8a.h @@ -126,6 +126,39 @@ /* Initial environment variables */ #ifdef CONFIG_TARGET_VEXPRESS64_JUNO +/* Copy the kernel and FDT to DRAM memory and boot */ +#define BOOTENV_DEV_AFS(devtypeu, devtypel, instance) \ + "bootcmd_afs=" \ + "afs load ${kernel_name} ${kernel_addr_r} ;"\ + "if test $? -eq 1; then "\ + " echo Loading ${kernel_alt_name} instead of ${kernel_name}; "\ + " afs load ${kernel_alt_name} ${kernel_addr_r};"\ + "fi ; "\ + "afs load ${fdtfile} ${fdt_addr_r} ;"\ + "if test $? -eq 1; then "\ + " echo Loading ${fdt_alt_name} instead of ${fdtfile}; "\ + " afs load ${fdt_alt_name} ${fdt_addr_r}; "\ + "fi ; "\ + "fdt addr ${fdt_addr_r}; fdt resize; " \ + "if afs load ${ramdisk_name} ${ramdisk_addr_r} ; "\ + "then "\ + " setenv ramdisk_param ${ramdisk_addr_r}; "\ + "else "\ + " setenv ramdisk_param -; "\ + "fi ; " \ + "booti ${kernel_addr_r} ${ramdisk_param} ${fdt_addr_r}\0" +#define BOOTENV_DEV_NAME_AFS(devtypeu, devtypel, instance) "afs " + +#define BOOT_TARGET_DEVICES(func) \ + func(USB, usb, 0) \ + func(SATA, sata, 0) \ + func(SATA, sata, 1) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) \ + func(AFS, afs, na) + +#include + /* * Defines where the kernel and FDT exist in NOR flash and where it will * be copied into DRAM @@ -139,30 +172,7 @@ "fdtfile=board.dtb\0" \ "fdt_alt_name=juno\0" \ "fdt_addr_r=0x80000000\0" \ - -#ifndef CONFIG_BOOTCOMMAND -/* Copy the kernel and FDT to DRAM memory and boot */ -#define CONFIG_BOOTCOMMAND "afs load ${kernel_name} ${kernel_addr_r} ;"\ - "if test $? -eq 1; then "\ - " echo Loading ${kernel_alt_name} instead of "\ - "${kernel_name}; "\ - " afs load ${kernel_alt_name} ${kernel_addr_r};"\ - "fi ; "\ - "afs load ${fdtfile} ${fdt_addr_r} ;"\ - "if test $? -eq 1; then "\ - " echo Loading ${fdt_alt_name} instead of "\ - "${fdtfile}; "\ - " afs load ${fdt_alt_name} ${fdt_addr_r}; "\ - "fi ; "\ - "fdt addr ${fdt_addr_r}; fdt resize; " \ - "if afs load ${ramdisk_name} ${ramdisk_addr_r} ; "\ - "then "\ - " setenv ramdisk_param ${ramdisk_addr_r}; "\ - " else setenv ramdisk_param -; "\ - "fi ; " \ - "booti ${kernel_addr_r} ${ramdisk_param} ${fdt_addr_r}" -#endif - + BOOTENV #elif CONFIG_TARGET_VEXPRESS64_BASE_FVP #define CONFIG_EXTRA_ENV_SETTINGS \ -- cgit v1.2.3 From 0523326af4e505d837968a5694c99c0ee1d0041c Mon Sep 17 00:00:00 2001 From: Patrick Wildt Date: Tue, 13 Jul 2021 23:02:18 +0200 Subject: mux: correct prototype for mux_control_try_select() The macro should be passed a state, which should be passed to the actual function. Otherwise using that macro would yield a build error. Signed-off-by: Patrick Wildt Reviewed-by: Pratyush Yadav --- include/mux.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mux.h b/include/mux.h index 23844f480ac..9f809912742 100644 --- a/include/mux.h +++ b/include/mux.h @@ -51,7 +51,7 @@ unsigned int mux_control_states(struct mux_control *mux); */ int __must_check mux_control_select(struct mux_control *mux, unsigned int state); -#define mux_control_try_select(mux) mux_control_select(mux) +#define mux_control_try_select(mux, state) mux_control_select(mux, state) /** * mux_control_deselect() - Deselect the previously selected multiplexer state. @@ -128,7 +128,7 @@ int __must_check mux_control_select(struct mux_control *mux, return -ENOSYS; } -#define mux_control_try_select(mux) mux_control_select(mux) +#define mux_control_try_select(mux, state) mux_control_select(mux, state) int mux_control_deselect(struct mux_control *mux) { -- cgit v1.2.3 From 988002dcd931e7236422e4d158c397d964ba1360 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 14 Jul 2021 09:12:41 +0200 Subject: net: remove CONFIG_NET_MULTI (again) CONFIG_NET_MULTI has been removed long time ago by commit 795428fc679f ("net: remove CONFIG_NET_MULTI") but 4 boards were added later which wasn't found. The patch is removing this reference from 4 boards. Signed-off-by: Michal Simek Reviewed-by: Chris Packham --- include/configs/SBx81LIFKW.h | 1 - include/configs/SBx81LIFXCAT.h | 1 - include/configs/ebisu.h | 1 - include/configs/xilinx_versal.h | 1 - 4 files changed, 4 deletions(-) (limited to 'include') diff --git a/include/configs/SBx81LIFKW.h b/include/configs/SBx81LIFKW.h index eaa6b9246c9..ded494cfa9b 100644 --- a/include/configs/SBx81LIFKW.h +++ b/include/configs/SBx81LIFKW.h @@ -84,7 +84,6 @@ * Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_NET_MULTI /* specify more that one ports available */ #define CONFIG_MVGBE /* Enable kirkwood Gbe Controller Driver */ #define CONFIG_MVGBE_PORTS {1, 0} /* enable a single port */ #define CONFIG_PHY_BASE_ADR 0x01 diff --git a/include/configs/SBx81LIFXCAT.h b/include/configs/SBx81LIFXCAT.h index c0dc3d38c12..06bbd8642e3 100644 --- a/include/configs/SBx81LIFXCAT.h +++ b/include/configs/SBx81LIFXCAT.h @@ -84,7 +84,6 @@ * Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_NET_MULTI /* specify more that one ports available */ #define CONFIG_MVGBE /* Enable kirkwood Gbe Controller Driver */ #define CONFIG_MVGBE_PORTS {1, 0} /* enable a single port */ #define CONFIG_PHY_BASE_ADR 0x01 diff --git a/include/configs/ebisu.h b/include/configs/ebisu.h index 19ec74fb588..48d4c8a9480 100644 --- a/include/configs/ebisu.h +++ b/include/configs/ebisu.h @@ -14,7 +14,6 @@ #include "rcar-gen3-common.h" /* Ethernet RAVB */ -#define CONFIG_NET_MULTI #define CONFIG_BITBANGMII_MULTI /* Generic Timer Definitions (use in assembler source) */ diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h index ebe81968d13..aae128f5ed0 100644 --- a/include/configs/xilinx_versal.h +++ b/include/configs/xilinx_versal.h @@ -53,7 +53,6 @@ /* Ethernet driver */ #if defined(CONFIG_ZYNQ_GEM) -# define CONFIG_NET_MULTI # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN # define PHY_ANEG_TIMEOUT 20000 #endif -- cgit v1.2.3