diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-imx9/mu.h | 13 | ||||
-rw-r--r-- | board/freescale/imx93_evk/spl.c | 2 | ||||
-rw-r--r-- | board/hisilicon/poplar/MAINTAINERS | 1 | ||||
-rw-r--r-- | board/phytec/phycore_imx93/spl.c | 2 | ||||
-rw-r--r-- | board/toradex/verdin-am62/verdin-am62.c | 47 | ||||
-rw-r--r-- | board/variscite/imx93_var_som/spl.c | 5 | ||||
-rw-r--r-- | boot/Kconfig | 15 | ||||
-rw-r--r-- | cmd/hash.c | 19 | ||||
-rw-r--r-- | common/Makefile | 1 | ||||
-rw-r--r-- | common/button_cmd.c | 83 | ||||
-rw-r--r-- | common/main.c | 3 | ||||
-rw-r--r-- | configs/imx93_var_som_defconfig | 1 | ||||
-rw-r--r-- | doc/board/nxp/imxrt1170-evk.rst | 50 | ||||
-rw-r--r-- | doc/board/nxp/index.rst | 1 | ||||
-rw-r--r-- | doc/board/starfive/visionfive2.rst | 10 | ||||
-rw-r--r-- | doc/develop/codingstyle.rst | 23 | ||||
-rw-r--r-- | doc/develop/release_cycle.rst | 2 | ||||
-rw-r--r-- | doc/usage/environment.rst | 4 | ||||
-rw-r--r-- | drivers/memory/ti-gpmc.c | 6 | ||||
-rw-r--r-- | drivers/net/designware.c | 16 | ||||
-rw-r--r-- | drivers/spi/mxc_spi.c | 1 | ||||
-rw-r--r-- | include/button.h | 9 | ||||
-rw-r--r-- | include/charset.h | 14 | ||||
-rw-r--r-- | lib/efi_loader/efi_disk.c | 3 |
26 files changed, 247 insertions, 89 deletions
@@ -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 cb6ea356fd7..805b5f57955 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 00000000000..b8604992914 --- /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 be9c24fc0d9..a98ed69db88 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 @@ int power_init_board(void) } #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 bfd4a9be66b..01efc96b0d3 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 da4b9e53594..dabc5316f33 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 @@ int power_init_board(void) 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 395eb365a0b..e948fc16ba9 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 @@ int board_fit_config_name_match(const char *name) } #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 @@ static void select_dt_from_module_version(void) 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 502e599b91a..e6db4eb562b 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 @@ void board_init_f(ulong dummy) 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 71ee41645f3..3d7aabd27d6 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -20,6 +20,21 @@ config TIMESTAMP 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 e163cd67742..5534a735fa7 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 @@ static int do_hash(struct cmd_tbl *cmdtp, int flag, int argc, 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 f010c2a1b9b..e9835473420 100644 --- a/common/Makefile +++ b/common/Makefile @@ -12,6 +12,7 @@ obj-y += cli_getch.o cli_simple.o cli_readline.o 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 00000000000..b6a8434d6f2 --- /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 6dba6cba144..82d3aafa53c 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 @@ void main_loop(void) 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 cc0c5a79bc1..14922f2a3e2 100644 --- a/configs/imx93_var_som_defconfig +++ b/configs/imx93_var_som_defconfig @@ -12,6 +12,7 @@ CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx9/imximage.cfg" 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 00000000000..86bd39ccb64 --- /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 3bd9ed3c873..94687730544 100644 --- a/doc/board/nxp/index.rst +++ b/doc/board/nxp/index.rst @@ -14,6 +14,7 @@ NXP Semiconductors 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 6cb033ead04..abda8ac21bc 100644 --- a/doc/board/starfive/visionfive2.rst +++ b/doc/board/starfive/visionfive2.rst @@ -133,14 +133,14 @@ Sample boot log from StarFive VisionFive2 board 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 b25bfbd271f..f6248cdcb1e 100644 --- a/doc/develop/codingstyle.rst +++ b/doc/develop/codingstyle.rst @@ -108,30 +108,29 @@ expected size, or that particular members appear at the right offset. 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 4f18623b28e..40c9855f803 100644 --- a/doc/develop/release_cycle.rst +++ b/doc/develop/release_cycle.rst @@ -66,7 +66,7 @@ For the next scheduled release, release candidates were made on:: * 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 82b6ea7b6e7..ebf75fa948a 100644 --- a/doc/usage/environment.rst +++ b/doc/usage/environment.rst @@ -190,6 +190,10 @@ bootm_size 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 0b8674339ec..8877b8f4385 100644 --- a/drivers/memory/ti-gpmc.c +++ b/drivers/memory/ti-gpmc.c @@ -1196,6 +1196,12 @@ static int gpmc_probe(struct udevice *dev) 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 c15fb36ae3f..c222197b114 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -685,8 +685,8 @@ int designware_eth_probe(struct udevice *dev) { 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 @@ int designware_eth_probe(struct udevice *dev) * 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 33360a18329..e291092c481 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -670,6 +670,7 @@ static const struct dm_spi_ops mxc_spi_ops = { 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 207f4a0f4db..8d38e521324 100644 --- a/include/button.h +++ b/include/button.h @@ -74,4 +74,13 @@ enum button_state_t button_get_state(struct udevice *dev); */ 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 44034c71d3d..f1050c903d6 100644 --- a/include/charset.h +++ b/include/charset.h @@ -324,11 +324,21 @@ int utf_to_cp(s32 *c, const u16 *codepage); 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 b1739d99201..93a9a5ac025 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -574,7 +574,8 @@ static int efi_disk_create_raw(struct udevice *dev, efi_handle_t agent_handle) 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; } |