Merge tag 'xilinx-for-v2024.04-rc3' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2024.04-rc3

zynqmp:
- Cover missing _SE chip variants to fix fpga programming

versal:
- Enable LTO for mini configurations

versal-net:
- Enable LTO for mini configurations
- Fix GIC address to aligned with real silicon

xilinx:
- DTs cleanup and fixups
- Enable HTTP boot
- Add missing spl header to zynqmp.c
diff --git a/Makefile b/Makefile
index 3afe314..3b5db90 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
 VERSION = 2024
 PATCHLEVEL = 04
 SUBLEVEL =
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc2
 NAME =
 
 # *DOCUMENTATION*
diff --git a/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi b/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi
index cb6ea35..805b5f5 100644
--- a/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi
+++ b/arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi
@@ -45,6 +45,9 @@
 };
 
 &ecspi1 {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-rates;
+	/delete-property/ assigned-clock-parents;
 	bootph-pre-ram;
 	flash@0 {
 		bootph-pre-ram;
diff --git a/arch/arm/include/asm/arch-imx9/mu.h b/arch/arm/include/asm/arch-imx9/mu.h
new file mode 100644
index 0000000..b860499
--- /dev/null
+++ b/arch/arm/include/asm/arch-imx9/mu.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2024 Mathieu Othacehe <m.othacehe@gmail.com>
+ */
+
+#ifndef __ARCH_IMX9_MU_H
+#define __ARCH_IMX9_MU_H
+
+#include <event.h>
+
+int imx9_probe_mu(void *ctx, struct event *event);
+
+#endif
diff --git a/board/freescale/imx93_evk/spl.c b/board/freescale/imx93_evk/spl.c
index be9c24f..a98ed69 100644
--- a/board/freescale/imx93_evk/spl.c
+++ b/board/freescale/imx93_evk/spl.c
@@ -14,6 +14,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx93_pins.h>
+#include <asm/arch/mu.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
@@ -91,7 +92,6 @@
 }
 #endif
 
-extern int imx9_probe_mu(void *ctx, struct event *event);
 void board_init_f(ulong dummy)
 {
 	int ret;
diff --git a/board/hisilicon/poplar/MAINTAINERS b/board/hisilicon/poplar/MAINTAINERS
index bfd4a9b..01efc96 100644
--- a/board/hisilicon/poplar/MAINTAINERS
+++ b/board/hisilicon/poplar/MAINTAINERS
@@ -1,6 +1,7 @@
 Poplar BOARD
 M:     Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@gmail.com>
 M:     Shawn Guo <shawn.guo@linaro.org>
+M:     Igor Opaniuk <igor.opaniuk@gmail.com>
 S:     Maintained
 F:     board/hisilicon/poplar
 F:     doc/board/hisilicon/poplar.rst
diff --git a/board/phytec/phycore_imx93/spl.c b/board/phytec/phycore_imx93/spl.c
index da4b9e5..dabc531 100644
--- a/board/phytec/phycore_imx93/spl.c
+++ b/board/phytec/phycore_imx93/spl.c
@@ -7,6 +7,7 @@
 
 #include <asm/arch/clock.h>
 #include <asm/arch/ddr.h>
+#include <asm/arch/mu.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/trdc.h>
 #include <asm/mach-imx/boot_mode.h>
@@ -99,7 +100,6 @@
 	return 0;
 }
 
-extern int imx9_probe_mu(void *ctx, struct event *event);
 void board_init_f(ulong dummy)
 {
 	int ret;
diff --git a/board/toradex/verdin-am62/verdin-am62.c b/board/toradex/verdin-am62/verdin-am62.c
index 395eb36..e948fc1 100644
--- a/board/toradex/verdin-am62/verdin-am62.c
+++ b/board/toradex/verdin-am62/verdin-am62.c
@@ -14,13 +14,10 @@
 #include <fdt_support.h>
 #include <init.h>
 #include <k3-ddrss.h>
-#include <power/regulator.h>
 #include <spl.h>
 
 #include "../common/tdx-cfg-block.h"
 
-#define VDD_CORE_REG "buck1"
-
 DECLARE_GLOBAL_DATA_PTR;
 
 int board_init(void)
@@ -53,37 +50,9 @@
 }
 #endif
 
-static u32 get_vdd_core_nominal(void)
-{
-	int core_uvolt;
-
-	switch (k3_get_speed_grade()) {
-	case 'G':
-	case 'K':
-	case 'S':
-		core_uvolt = 750000;
-		break;
-	case 'T':
-	default:
-		core_uvolt = 850000;
-		break;
-	}
-	return core_uvolt;
-}
-
 #if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
-	int core_uvolt;
-
-	core_uvolt = get_vdd_core_nominal();
-	if (core_uvolt != 850000) {
-		do_fixup_by_path_u32(blob, "/bus@f0000/i2c@20000000/pmic@30/regulators/buck1",
-				     "regulator-max-microvolt", core_uvolt, 0);
-		do_fixup_by_path_u32(blob, "/bus@f0000/i2c@20000000/pmic@30/regulators/buck1",
-				     "regulator-min-microvolt", core_uvolt, 0);
-	}
-
 	return ft_common_board_setup(blob, bd);
 }
 #endif
@@ -118,22 +87,6 @@
 
 int board_late_init(void)
 {
-	int ret;
-	int core_uvolt;
-	struct udevice *dev = NULL;
-
-	core_uvolt = get_vdd_core_nominal();
-	if (core_uvolt != 850000) {
-		/* Set CPU core voltage to 0.75V for slower speed grades */
-		ret = regulator_get_by_devname(VDD_CORE_REG, &dev);
-		if (ret)
-			pr_err("VDD CORE Regulator get error: %d\n", ret);
-
-		ret = regulator_set_value_force(dev, core_uvolt);
-		if (ret)
-			pr_err("VDD CORE Regulator value setting error: %d\n", ret);
-	}
-
 	select_dt_from_module_version();
 
 	return 0;
diff --git a/board/variscite/imx93_var_som/spl.c b/board/variscite/imx93_var_som/spl.c
index 502e599..e6db4eb 100644
--- a/board/variscite/imx93_var_som/spl.c
+++ b/board/variscite/imx93_var_som/spl.c
@@ -13,6 +13,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/arch/imx93_pins.h>
+#include <asm/arch/mu.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
@@ -114,9 +115,9 @@
 
 	preloader_console_init();
 
-	ret = arch_cpu_init();
+	ret = imx9_probe_mu(NULL, NULL);
 	if (ret) {
-		printf("Fail to init Sentinel API\n");
+		printf("Fail to init ELE API\n");
 	} else {
 		printf("SOC: 0x%x\n", gd->arch.soc_rev);
 		printf("LC: 0x%x\n", gd->arch.lifecycle);
diff --git a/boot/Kconfig b/boot/Kconfig
index 71ee416..3d7aabd 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -20,6 +20,21 @@
 	  loaded that does not, the message 'Wrong FIT format: no timestamp'
 	  is shown.
 
+config BUTTON_CMD
+	bool "Support for running a command if a button is held during boot"
+	depends on CMDLINE
+	depends on BUTTON
+	help
+	  For many embedded devices it's useful to enter a special flashing mode
+	  such as fastboot mode when a button is held during boot. This option
+	  allows arbitrary commands to be assigned to specific buttons. These will
+	  be run after "preboot" if the button is held. Configuration is done via
+	  the environment variables "button_cmd_N_name" and "button_cmd_N" where n is
+	  the button number (starting from 0). e.g:
+
+	    "button_cmd_0_name=vol_down"
+	    "button_cmd_0=fastboot usb 0"
+
 menuconfig FIT
 	bool "Flattened Image Tree (FIT)"
 	select HASH
diff --git a/cmd/hash.c b/cmd/hash.c
index e163cd6..5534a73 100644
--- a/cmd/hash.c
+++ b/cmd/hash.c
@@ -14,15 +14,22 @@
 #include <hash.h>
 #include <linux/ctype.h>
 
+#if IS_ENABLED(CONFIG_HASH_VERIFY)
+#define HARGS 6
+#else
+#define HARGS 5
+#endif
+
 static int do_hash(struct cmd_tbl *cmdtp, int flag, int argc,
 		   char *const argv[])
 {
 	char *s;
 	int flags = HASH_FLAG_ENV;
 
-#ifdef CONFIG_HASH_VERIFY
-	if (argc < 4)
+	if (argc < (HARGS - 1))
 		return CMD_RET_USAGE;
+
+#if IS_ENABLED(CONFIG_HASH_VERIFY)
 	if (!strcmp(argv[1], "-v")) {
 		flags |= HASH_FLAG_VERIFY;
 		argc--;
@@ -37,18 +44,12 @@
 	return hash_command(*argv, flags, cmdtp, flag, argc - 1, argv + 1);
 }
 
-#ifdef CONFIG_HASH_VERIFY
-#define HARGS 6
-#else
-#define HARGS 5
-#endif
-
 U_BOOT_CMD(
 	hash,	HARGS,	1,	do_hash,
 	"compute hash message digest",
 	"algorithm address count [[*]hash_dest]\n"
 		"    - compute message digest [save to env var / *address]"
-#ifdef CONFIG_HASH_VERIFY
+#if IS_ENABLED(CONFIG_HASH_VERIFY)
 	"\nhash -v algorithm address count [*]hash\n"
 		"    - verify message digest of memory area to immediate value, \n"
 		"      env var or *address"
diff --git a/common/Makefile b/common/Makefile
index f010c2a..e983547 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -12,6 +12,7 @@
 obj-$(CONFIG_HUSH_OLD_PARSER) += cli_hush.o
 obj-$(CONFIG_HUSH_MODERN_PARSER) += cli_hush_modern.o
 obj-$(CONFIG_AUTOBOOT) += autoboot.o
+obj-$(CONFIG_BUTTON_CMD) += button_cmd.o
 obj-y += version.o
 
 # # boards
diff --git a/common/button_cmd.c b/common/button_cmd.c
new file mode 100644
index 0000000..b6a8434
--- /dev/null
+++ b/common/button_cmd.c
@@ -0,0 +1,83 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2023 Linaro Ltd.
+ *   Author: Caleb Connolly <caleb.connolly@linaro.org>
+ */
+
+#include <button.h>
+#include <command.h>
+#include <env.h>
+#include <log.h>
+#include <vsprintf.h>
+
+/* Some sane limit "just in case" */
+#define MAX_BTN_CMDS 32
+
+struct button_cmd {
+	bool pressed;
+	const char *btn_name;
+	const char *cmd;
+};
+
+/*
+ * Button commands are set via environment variables, e.g.:
+ * button_cmd_N_name=Volume Up
+ * button_cmd_N=fastboot usb 0
+ *
+ * This function will retrieve the command for the given button N
+ * and populate the cmd struct with the command string and pressed
+ * state of the button.
+ *
+ * Returns 1 if a command was found, 0 otherwise.
+ */
+static int get_button_cmd(int n, struct button_cmd *cmd)
+{
+	const char *cmd_str;
+	struct udevice *btn;
+	char buf[24];
+
+	snprintf(buf, sizeof(buf), "button_cmd_%d_name", n);
+	cmd->btn_name = env_get(buf);
+	if (!cmd->btn_name)
+		return 0;
+
+	button_get_by_label(cmd->btn_name, &btn);
+	if (!btn) {
+		log_err("No button labelled '%s'\n", cmd->btn_name);
+		return 0;
+	}
+
+	cmd->pressed = button_get_state(btn) == BUTTON_ON;
+	/* If the button isn't pressed then cmd->cmd will be unused so don't waste
+	 * cycles reading it
+	 */
+	if (!cmd->pressed)
+		return 1;
+
+	snprintf(buf, sizeof(buf), "button_cmd_%d", n);
+	cmd_str = env_get(buf);
+	if (!cmd_str) {
+		log_err("No command set for button '%s'\n", cmd->btn_name);
+		return 0;
+	}
+
+	cmd->cmd = cmd_str;
+
+	return 1;
+}
+
+void process_button_cmds(void)
+{
+	struct button_cmd cmd = {0};
+	int i = 0;
+
+	while (get_button_cmd(i++, &cmd) && i < MAX_BTN_CMDS) {
+		if (!cmd.pressed)
+			continue;
+
+		log_info("BTN '%s'> %s\n", cmd.btn_name, cmd.cmd);
+		run_command(cmd.cmd, CMD_FLAG_ENV);
+		/* Don't run commands for multiple buttons */
+		return;
+	}
+}
diff --git a/common/main.c b/common/main.c
index 6dba6cb..82d3aaf 100644
--- a/common/main.c
+++ b/common/main.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <autoboot.h>
+#include <button.h>
 #include <bootstage.h>
 #include <bootstd.h>
 #include <cli.h>
@@ -62,6 +63,8 @@
 			efi_launch_capsules();
 	}
 
+	process_button_cmds();
+
 	s = bootdelay_process();
 	if (cli_process_fdt(&s))
 		cli_secure_boot_cmd(s);
diff --git a/configs/imx93_var_som_defconfig b/configs/imx93_var_som_defconfig
index cc0c5a7..14922f2 100644
--- a/configs/imx93_var_som_defconfig
+++ b/configs/imx93_var_som_defconfig
@@ -12,6 +12,7 @@
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="imx93-var-som-symphony"
 CONFIG_SPL_TEXT_BASE=0x2049A000
+CONFIG_AHAB_BOOT=y
 CONFIG_TARGET_IMX93_VAR_SOM=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_SPL_SERIAL=y
diff --git a/doc/board/nxp/imxrt1170-evk.rst b/doc/board/nxp/imxrt1170-evk.rst
new file mode 100644
index 0000000..86bd39c
--- /dev/null
+++ b/doc/board/nxp/imxrt1170-evk.rst
@@ -0,0 +1,50 @@
+.. SPDX-License-Identifier: GPL-2.0-or-later
+
+imxrt1170-evk
+=============
+
+How to use U-Boot on NXP i.MXRT1170 EVK
+---------------------------------------
+
+- Build U-Boot for i.MXRT1170 EVK:
+
+  .. code-block:: bash
+
+      $ make mrproper
+      $ make imxrt1170-evk_defconfig
+      $ make
+
+  This will generate the SPL image called SPL and the u-boot.img.
+
+- Flash the SPL image into the micro SD card:
+
+  .. code-block:: bash
+
+      $sudo dd if=SPL of=/dev/sdX bs=1k seek=1 conv=notrunc; sync
+
+  This location is not compatible with GPT partioning. Please, use MBR
+  partitioning instead.
+
+- Flash the u-boot.img image into the micro SD card:
+
+  .. code-block:: bash
+
+      $sudo dd if=u-boot.img of=/dev/sdX bs=1k seek=128 conv=notrunc; sync
+
+- Jumper settings
+
+  .. list-table::
+     :stub-columns: 1
+
+     * - SW1
+       - 1 0 1 0
+     * - SW2
+       - 0 0 0 0 | 0 0 0 0 | 1 0 0 0
+
+  where 0 means bottom position and 1 means top position (from the
+  switch label numbers reference).
+
+- Connect the USB cable between the EVK and the PC for the console.
+  The USB console connector is the one close the ethernet connector
+
+- Insert the micro SD card in the board, power it up and U-Boot messages should come up.
diff --git a/doc/board/nxp/index.rst b/doc/board/nxp/index.rst
index 3bd9ed3..9468773 100644
--- a/doc/board/nxp/index.rst
+++ b/doc/board/nxp/index.rst
@@ -14,6 +14,7 @@
    imx93_11x11_evk
    imxrt1020-evk
    imxrt1050-evk
+   imxrt1170-evk
    ls1046ardb
    mx6sabreauto
    mx6sabresd
diff --git a/doc/board/starfive/visionfive2.rst b/doc/board/starfive/visionfive2.rst
index 6cb033e..abda8ac 100644
--- a/doc/board/starfive/visionfive2.rst
+++ b/doc/board/starfive/visionfive2.rst
@@ -133,14 +133,14 @@
 	Trying to boot from MMC2
 
 	OpenSBI v1.2-80-g4b28afc
-	____                    _____ ____ _____
-	/ __ \                  / ____|  _ \_   _|
+	  ____                    _____ ____ _____
+	 / __ \                  / ____|  _ \_   _|
 	| |  | |_ __   ___ _ __ | (___ | |_) || |
 	| |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 	| |__| | |_) |  __/ | | |____) | |_) || |_
-	\____/| .__/ \___|_| |_|_____/|___/_____|
-			| |
-			|_|
+	 \____/| .__/ \___|_| |_|_____/|____/_____|
+	       | |
+	       |_|
 
 	Platform Name             : StarFive VisionFive 2 v1.3B
 	Platform Features         : medeleg
diff --git a/doc/develop/codingstyle.rst b/doc/develop/codingstyle.rst
index b25bfbd..f6248cd 100644
--- a/doc/develop/codingstyle.rst
+++ b/doc/develop/codingstyle.rst
@@ -108,30 +108,29 @@
 Include files
 -------------
 
-You should follow this ordering in U-Boot. The common.h header (which is going
-away at some point) should always be first, followed by other headers in order,
-then headers with directories, then local files:
+You should follow this ordering in U-Boot. In all cases, they should be listed
+in alphabetical order. First comes headers which are located directly in our
+top-level include diretory. This excludes the common.h header file which is to
+be removed. Second are headers within subdirectories, Finally directory-local
+includes should be listed. See this example:
 
 .. code-block:: C
 
-   #include <common.h>
    #include <bootstage.h>
    #include <dm.h>
    #include <others.h>
    #include <asm/...>
-   #include <arm/arch/...>
+   #include <asm/arch/...>
    #include <dm/device_compat.h>
    #include <linux/...>
    #include "local.h"
 
-Within that order, sort your includes.
-
-It is important to include common.h first since it provides basic features used
-by most files, e.g. CONFIG options.
-
 For files that need to be compiled for the host (e.g. tools), you need to use
-``#ifndef USE_HOSTCC`` to avoid including common.h since it includes a lot of
-internal U-Boot things. See common/image.c for an example.
+``#ifndef USE_HOSTCC`` to avoid including U-Boot specific include files. See
+common/image.c for an example.
+
+If you encounter code which still uses <common.h> a patch to remove that and
+replace it with any required include files directly is much appreciated.
 
 If your file uses driver model, include <dm.h> in the C file. Do not include
 dm.h in a header file. Try to use forward declarations (e.g. ``struct
diff --git a/doc/develop/release_cycle.rst b/doc/develop/release_cycle.rst
index 4f18623..40c9855 100644
--- a/doc/develop/release_cycle.rst
+++ b/doc/develop/release_cycle.rst
@@ -66,7 +66,7 @@
 
 * U-Boot v2024.01-rc1 was released on Mon 29 January 2024.
 
-.. * U-Boot v2024.01-rc2 was released on Mon 12 February 2024.
+* U-Boot v2024.01-rc2 was released on Tue 13 February 2024.
 
 .. * U-Boot v2024.01-rc3 was released on Mon 26 February 2024.
 
diff --git a/doc/usage/environment.rst b/doc/usage/environment.rst
index 82b6ea7..ebf75fa 100644
--- a/doc/usage/environment.rst
+++ b/doc/usage/environment.rst
@@ -190,6 +190,10 @@
 bootstopkeysha256, bootdelaykey, bootstopkey
     See README.autoboot
 
+button_cmd_0, button_cmd_0_name ... button_cmd_N, button_cmd_N_name
+    Used to map commands to run when a button is held during boot.
+    See CONFIG_BUTTON_CMD.
+
 updatefile
     Location of the software update file on a TFTP server, used
     by the automatic software update feature. Please refer to
diff --git a/drivers/memory/ti-gpmc.c b/drivers/memory/ti-gpmc.c
index 0b86743..8877b8f 100644
--- a/drivers/memory/ti-gpmc.c
+++ b/drivers/memory/ti-gpmc.c
@@ -1196,6 +1196,12 @@
 	gpmc_cfg = (struct gpmc *)priv->base;
 	gpmc_base = priv->base;
 
+	/*
+	 * Disable all IRQs as some bootroms might leave them enabled
+	 * and that will cause a lock-up later
+	 */
+	gpmc_write_reg(GPMC_IRQENABLE, 0);
+
 	priv->l3_clk = devm_clk_get(dev, "fck");
 	if (IS_ERR(priv->l3_clk))
 		return PTR_ERR(priv->l3_clk);
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index c15fb36..c222197 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -685,8 +685,8 @@
 {
 	struct eth_pdata *pdata = dev_get_plat(dev);
 	struct dw_eth_dev *priv = dev_get_priv(dev);
-	u32 iobase = pdata->iobase;
-	ulong ioaddr;
+	phys_addr_t iobase = pdata->iobase;
+	void *ioaddr;
 	int ret, err;
 	struct reset_ctl_bulk reset_bulk;
 #ifdef CONFIG_CLK
@@ -746,16 +746,18 @@
 	 * or via a PCI bridge, fill in plat before we probe the hardware.
 	 */
 	if (IS_ENABLED(CONFIG_PCI) && device_is_on_pci_bus(dev)) {
-		dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase);
-		iobase &= PCI_BASE_ADDRESS_MEM_MASK;
-		iobase = dm_pci_mem_to_phys(dev, iobase);
+		u32 pcibase;
 
+		dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &pcibase);
+		pcibase &= PCI_BASE_ADDRESS_MEM_MASK;
+
+		iobase = dm_pci_mem_to_phys(dev, pcibase);
 		pdata->iobase = iobase;
 		pdata->phy_interface = PHY_INTERFACE_MODE_RMII;
 	}
 
-	debug("%s, iobase=%x, priv=%p\n", __func__, iobase, priv);
-	ioaddr = iobase;
+	debug("%s, iobase=%pa, priv=%p\n", __func__, &iobase, priv);
+	ioaddr = phys_to_virt(iobase);
 	priv->mac_regs_p = (struct eth_mac_regs *)ioaddr;
 	priv->dma_regs_p = (struct eth_dma_regs *)(ioaddr + DW_DMA_BASE_OFFSET);
 	priv->interface = pdata->phy_interface;
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index 33360a1..e291092 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -670,6 +670,7 @@
 
 static const struct udevice_id mxc_spi_ids[] = {
 	{ .compatible = "fsl,imx51-ecspi" },
+	{ .compatible = "fsl,imx6ul-ecspi" },
 	{ }
 };
 
diff --git a/include/button.h b/include/button.h
index 207f4a0..8d38e52 100644
--- a/include/button.h
+++ b/include/button.h
@@ -74,4 +74,13 @@
  */
 int button_get_code(struct udevice *dev);
 
+#if IS_ENABLED(CONFIG_BUTTON_CMD)
+/* Process button command mappings specified in the environment,
+ * running the commands for buttons which are pressed
+ */
+void process_button_cmds(void);
+#else
+static inline void process_button_cmds(void) {}
+#endif /* CONFIG_BUTTON_CMD */
+
 #endif
diff --git a/include/charset.h b/include/charset.h
index 44034c7..f1050c9 100644
--- a/include/charset.h
+++ b/include/charset.h
@@ -324,11 +324,21 @@
 int utf8_to_cp437_stream(u8 c, char *buffer);
 
 /**
- * utf8_to_utf32_stream() - convert UTF-8 stream to UTF-32
+ * utf8_to_utf32_stream() - convert UTF-8 byte stream to Unicode code points
+ *
+ * The function is called for each byte @c in a UTF-8 stream. The byte is
+ * appended to the temporary storage @buffer until the UTF-8 stream in
+ * @buffer describes a Unicode code point.
+ *
+ * When a new code point has been decoded it is returned and buffer[0] is
+ * set to '\0', otherwise the return value is 0.
+ *
+ * The buffer must be at least 5 characters long. Before the first function
+ * invocation buffer[0] must be set to '\0'."
  *
  * @c:		next UTF-8 character to convert
  * @buffer:	buffer, at least 5 characters
- * Return:	next codepage 437 character or 0
+ * Return:	Unicode code point or 0
  */
 int utf8_to_utf32_stream(u8 c, char *buffer);
 
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index b1739d9..93a9a5a 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -574,7 +574,8 @@
 			log_notice("Disk %s not ready\n", dev->name);
 			ret = -EBUSY;
 		} else {
-			log_err("Adding disk for %s failed (err=%ld/%#lx)\n", dev->name, ret, ret);
+			log_err("Adding block device %s failed, r = %lu\n",
+				dev->name, ret & ~EFI_ERROR_MASK);
 			ret = -ENOENT;
 		}