spl: mmc: Some tweaks for SPL, particularly with MMC
Subsystems (9)
v2 cover spl: mmc: Some tweaks for SPL, particularly with MMC
This series includes various minor fixes and tweaks found when trying to reduce the size of MMC code in SPL.
Changes in v2:
- Avoid changing comment
- Various updates to log messages
- Drop an unnecessary cast
- Update commit message to mention the runtime impact
- Leave assert() alone since it is only compiled in with LOG_DEBUG
- Update 'return ret' to 'return 0' when ret is known to be 0
- Use uint for arg to spl_mmc_get_device_index()
Simon Glass (14):
rockchip: Move the default timer init to a common file
spl: Correct use of CMD_BOOTI and CMD_BOOTZ
spl: Remove some #ifdefs in spl_parse_image_header()
spl: Remove remaining #ifdef in spl_parse_image_header()
mmc: Use logging instead of printf()
mmc: Use logging instead of pr_err()
log: Avoid including function names by default
spl: mmc: Drop checks for CONFIG_SPL_LIBCOMMON_SUPPORT
spl: mmc: Handle error codes consistently
spl: mmc: Adjust args of spl_mmc_find_device()
spl: mmc: Try to clean up raw-mode options
spl: Use unified inline functions for spl_load_info
spl: Create a function to init spl_load_info
blk: Correct comment for blk_get_devnum_by_uclass_idname()
arch/arm/include/asm/arch-rockchip/timer.h | 3 + arch/arm/mach-imx/imx8m/soc.c | 2 + arch/arm/mach-imx/spl_imx_romapi.c | 27 +-- arch/arm/mach-rockchip/Makefile | 4 +- arch/arm/mach-rockchip/spl.c | 21 +-- arch/arm/mach-rockchip/spl_common.c | 36 ++++ arch/arm/mach-rockchip/tpl.c | 30 +--- arch/arm/mach-sunxi/spl_spi_sunxi.c | 3 +- .../imx8mp_rsb3720a1/imx8mp_rsb3720a1.c | 4 +- common/log_console.c | 4 +- common/spl/Kconfig | 52 +++--- common/spl/spl.c | 30 ++-- common/spl/spl_blk_fs.c | 9 +- common/spl/spl_ext.c | 3 +- common/spl/spl_fat.c | 10 +- common/spl/spl_mmc.c | 159 ++++++++---------- common/spl/spl_nand.c | 4 +- common/spl/spl_net.c | 3 +- common/spl/spl_nor.c | 6 +- common/spl/spl_ram.c | 3 +- common/spl/spl_semihosting.c | 4 +- common/spl/spl_spi.c | 4 +- common/spl/spl_ymodem.c | 4 +- configs/am335x_guardian_defconfig | 2 +- configs/am335x_pdu001_defconfig | 2 +- configs/am3517_evm_defconfig | 2 +- configs/am62ax_evm_a53_defconfig | 1 + configs/am62ax_evm_r5_defconfig | 1 + configs/am62px_evm_a53_defconfig | 1 + configs/am62px_evm_r5_defconfig | 1 + configs/am62x_beagleplay_a53_defconfig | 1 + configs/am62x_beagleplay_r5_defconfig | 1 + configs/am62x_evm_a53_defconfig | 1 + configs/am62x_evm_r5_defconfig | 1 + configs/am64x_evm_a53_defconfig | 1 + configs/am64x_evm_r5_defconfig | 1 + configs/am65x_evm_a53_defconfig | 1 + configs/am65x_evm_r5_defconfig | 1 + configs/brppt2_defconfig | 2 +- configs/brsmarc1_defconfig | 2 +- configs/cgtqmx8_defconfig | 1 + configs/chromebit_mickey_defconfig | 2 +- configs/chromebook_jerry_defconfig | 2 +- configs/chromebook_minnie_defconfig | 2 +- configs/chromebook_speedy_defconfig | 2 +- configs/ci20_mmc_defconfig | 1 + configs/da850evm_defconfig | 2 +- configs/da850evm_nand_defconfig | 2 +- configs/deneb_defconfig | 1 + configs/display5_defconfig | 2 +- configs/display5_factory_defconfig | 2 +- configs/draco-rastaban_defconfig | 2 +- configs/draco-thuban_defconfig | 2 +- .../gardena-smart-gateway-at91sam_defconfig | 2 +- configs/giedi_defconfig | 1 + configs/imx28_xea_defconfig | 1 + configs/imx28_xea_sb_defconfig | 1 + configs/imx6q_logic_defconfig | 2 +- configs/imx8mm-cl-iot-gate-optee_defconfig | 1 + configs/imx8mm-cl-iot-gate_defconfig | 1 + configs/imx8mm-icore-mx8mm-ctouch2_defconfig | 1 + configs/imx8mm-icore-mx8mm-edimm2.2_defconfig | 1 + configs/imx8mm-mx8menlo_defconfig | 1 + configs/imx8mm-phygate-tauri-l_defconfig | 1 + configs/imx8mm_beacon_defconfig | 1 + configs/imx8mm_beacon_fspi_defconfig | 1 + configs/imx8mm_data_modul_edm_sbc_defconfig | 1 + configs/imx8mm_evk_defconfig | 1 + configs/imx8mm_evk_fspi_defconfig | 1 + configs/imx8mm_phg_defconfig | 1 + configs/imx8mm_venice_defconfig | 1 + configs/imx8mn_beacon_2g_defconfig | 1 + configs/imx8mn_beacon_defconfig | 1 + configs/imx8mn_beacon_fspi_defconfig | 1 + configs/imx8mn_bsh_smm_s2_defconfig | 1 + configs/imx8mn_bsh_smm_s2pro_defconfig | 1 + configs/imx8mn_ddr4_evk_defconfig | 1 + configs/imx8mn_evk_defconfig | 1 + configs/imx8mn_var_som_defconfig | 1 + configs/imx8mn_venice_defconfig | 1 + configs/imx8mp-icore-mx8mp-edimm2.2_defconfig | 1 + configs/imx8mp_beacon_defconfig | 1 + configs/imx8mp_data_modul_edm_sbc_defconfig | 1 + configs/imx8mp_debix_model_a_defconfig | 1 + configs/imx8mp_dhcom_pdk2_defconfig | 1 + configs/imx8mp_dhcom_pdk3_defconfig | 1 + configs/imx8mp_evk_defconfig | 1 + configs/imx8mp_rsb3720a1_4G_defconfig | 2 + configs/imx8mp_rsb3720a1_6G_defconfig | 1 + configs/imx8mp_venice_defconfig | 1 + configs/imx8mq_cm_defconfig | 1 + configs/imx8mq_evk_defconfig | 1 + configs/imx8mq_phanbell_defconfig | 1 + configs/imx8mq_reform2_defconfig | 1 + configs/imx8qm_mek_defconfig | 1 + configs/imx8qxp_mek_defconfig | 1 + configs/imx8ulp_evk_defconfig | 1 + configs/imx93-phyboard-segin_defconfig | 1 + configs/imx93_11x11_evk_defconfig | 1 + configs/imx93_11x11_evk_ld_defconfig | 1 + configs/imx93_var_som_defconfig | 1 + configs/imxrt1020-evk_defconfig | 1 + configs/imxrt1050-evk_defconfig | 1 + configs/imxrt1050-evk_fspi_defconfig | 1 + configs/imxrt1170-evk_defconfig | 1 + configs/iot2050_defconfig | 1 + configs/j7200_evm_a72_defconfig | 1 + configs/j7200_evm_r5_defconfig | 1 + configs/j721e_beagleboneai64_a72_defconfig | 1 + configs/j721e_beagleboneai64_r5_defconfig | 1 + configs/j721e_evm_a72_defconfig | 1 + configs/j721e_evm_r5_defconfig | 1 + configs/j721s2_evm_a72_defconfig | 1 + configs/j721s2_evm_r5_defconfig | 1 + configs/j722s_evm_a53_defconfig | 1 + configs/j722s_evm_r5_defconfig | 1 + configs/j784s4_evm_a72_defconfig | 1 + configs/j784s4_evm_r5_defconfig | 1 + configs/kontron-sl-mx8mm_defconfig | 1 + configs/kontron_pitx_imx8m_defconfig | 1 + configs/kontron_sl28_defconfig | 1 + configs/librem5_defconfig | 1 + configs/ls1021aiot_sdcard_defconfig | 1 + configs/ls1021aqds_nand_defconfig | 1 + configs/ls1021aqds_sdcard_ifc_defconfig | 1 + configs/ls1021aqds_sdcard_qspi_defconfig | 1 + configs/ls1021atsn_sdcard_defconfig | 1 + ...s1021atwr_sdcard_ifc_SECURE_BOOT_defconfig | 1 + configs/ls1021atwr_sdcard_ifc_defconfig | 1 + configs/ls1021atwr_sdcard_qspi_defconfig | 1 + configs/msc_sm2s_imx8mp_defconfig | 1 + configs/omap35_logic_defconfig | 2 +- configs/omap35_logic_somlv_defconfig | 2 +- configs/omap3_logic_defconfig | 2 +- configs/omap3_logic_somlv_defconfig | 2 +- configs/phycore-imx8mm_defconfig | 1 + configs/phycore-imx8mp_defconfig | 1 + configs/phycore_am62x_a53_defconfig | 1 + configs/phycore_am62x_r5_defconfig | 1 + configs/phycore_am64x_a53_defconfig | 1 + configs/phycore_am64x_r5_defconfig | 1 + configs/pico-imx8mq_defconfig | 1 + configs/sama5d27_wlsom1_ek_mmc_defconfig | 2 +- .../sama5d27_wlsom1_ek_qspiflash_defconfig | 2 +- configs/sama5d2_icp_mmc_defconfig | 2 +- configs/sandbox_defconfig | 1 + configs/sandbox_noinst_defconfig | 1 + configs/sniper_defconfig | 2 +- configs/socfpga_secu1_defconfig | 2 +- configs/verdin-am62_a53_defconfig | 1 + configs/verdin-am62_r5_defconfig | 1 + configs/verdin-imx8mm_defconfig | 1 + configs/verdin-imx8mp_defconfig | 1 + drivers/mmc/mmc.c | 49 +++--- drivers/mmc/sdhci.c | 46 +++-- drivers/usb/gadget/f_sdp.c | 8 +- include/blk.h | 4 +- include/log.h | 16 +- include/spl.h | 60 ++++--- test/cmd/pinmux.c | 8 +- test/image/spl_load.c | 4 +- test/image/spl_load_os.c | 6 +- test/log/log_test.c | 4 +- 163 files changed, 429 insertions(+), 358 deletions(-) create mode 100644 arch/arm/mach-rockchip/spl_common.c
Signature · 1 line
2.34.1
PATCH v2 1/14 rockchip: Move the default timer init to a common file
Rather than repeating the same code in two files (SPL and TPL), move it to a shared filed.
---
(no changes since v1)
arch/arm/include/asm/arch-rockchip/timer.h | 3 ++ arch/arm/mach-rockchip/Makefile | 4 +-- arch/arm/mach-rockchip/spl.c | 21 +------------ arch/arm/mach-rockchip/spl_common.c | 36 ++++++++++++++++++++++ arch/arm/mach-rockchip/tpl.c | 30 +----------------- 5 files changed, 43 insertions(+), 51 deletions(-) create mode 100644 arch/arm/mach-rockchip/spl_common.c
arch/arm/include/asm/arch-rockchip/timer.h +3 -0
@@ -15,4 +15,7 @@ struct rk_timer { u32 timer_int_status; }; +/** rockchip_stimer_init() - Set up the timer ready for use */ +void rockchip_stimer_init (void ); +#endif
arch/arm/mach-rockchip/Makefile +2 -2
@@ -8,9 +8,9 @@ # inaccessible/protected memory (and the bootrom-helper assumes that # the stack-pointer is valid before switching to the U-Boot stack). obj-spl-$(CONFIG_ROCKCHIP_BROM_HELPER) += bootrom.o -obj-spl-$(CONFIG_SPL_ROCKCHIP_COMMON_BOARD) += spl.o spl-boot-order.o +obj-spl-$(CONFIG_SPL_ROCKCHIP_COMMON_BOARD) += spl.o spl-boot-order.o spl_common.o obj-tpl-$(CONFIG_ROCKCHIP_BROM_HELPER) += bootrom.o -obj-tpl-$(CONFIG_TPL_ROCKCHIP_COMMON_BOARD) += tpl.o +obj-tpl-$(CONFIG_TPL_ROCKCHIP_COMMON_BOARD) += tpl.o spl_common.o obj-tpl-$(CONFIG_ROCKCHIP_PX30) += px30-board-tpl.o obj-spl-$(CONFIG_ROCKCHIP_RK3036) += rk3036-board-spl.o
arch/arm/mach-rockchip/spl.c +1 -20
@@ -13,6 +13,7 @@#include <ram.h> #include <spl.h> #include <asm/arch-rockchip/bootrom.h> +#include <asm/arch-rockchip/timer.h> #include <asm/global_data.h> #include <asm/io.h> #include <linux/bitops.h>
@@ -86,26 +87,6 @@ u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)#define TIMER_FMODE BIT(0)#define TIMER_RMODE BIT(1) -__weak void rockchip_stimer_init (void ) -{ -#if defined(CONFIG_ROCKCHIP_STIMER_BASE ) -/* If Timer already enabled, don't re-init it */ -u32 reg =readl (CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG ); - -if (reg &TIMER_EN ) -return ; -#ifndef CONFIG_ARM64 - asmvolatile ("mcr p15, 0, %0, c14, c0, 0" - : :"r" (CONFIG_COUNTER_FREQUENCY )); -#endif -writel (0 ,CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG ); -writel (0xffffffff ,CONFIG_ROCKCHIP_STIMER_BASE ); -writel (0xffffffff ,CONFIG_ROCKCHIP_STIMER_BASE +4 ); -writel (TIMER_EN |TIMER_FMODE ,CONFIG_ROCKCHIP_STIMER_BASE + -TIMER_CONTROL_REG ); -#endif -} -__weak int board_early_init_f (void ) {return 0 ;
arch/arm/mach-rockchip/spl_common.c new file +36 -0
@@ -0,0 +1,36 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* (C) Copyright 2019 Rockchip Electronics Co., Ltd +*/ + +#include <asm/io.h> +#include <linux/bitops.h> + +#define TIMER_LOAD_COUNT_L 0x00 +#define TIMER_LOAD_COUNT_H 0x04 +#define TIMER_CONTROL_REG 0x10 +#define TIMER_EN 0x1 +#define TIMER_FMODE BIT(0) +#define TIMER_RMODE BIT(1) + +__weak void rockchip_stimer_init (void ) +{ +#if defined(CONFIG_ROCKCHIP_STIMER_BASE ) +/* If Timer already enabled, don't re-init it */ +u32 reg =readl (CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG ); + +if (reg &TIMER_EN ) +return ; + +#ifndef CONFIG_ARM64 + asmvolatile ("mcr p15, 0, %0, c14, c0, 0" + : :"r" (CONFIG_COUNTER_FREQUENCY )); +#endif + +writel (0 ,CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG ); +writel (0xffffffff ,CONFIG_ROCKCHIP_STIMER_BASE ); +writel (0xffffffff ,CONFIG_ROCKCHIP_STIMER_BASE +4 ); +writel (TIMER_EN |TIMER_FMODE ,CONFIG_ROCKCHIP_STIMER_BASE + +TIMER_CONTROL_REG ); +#endif +}
arch/arm/mach-rockchip/tpl.c +1 -29
@@ -14,41 +14,13 @@#include <version.h> #include <asm/io.h> #include <asm/arch-rockchip/bootrom.h> +#include <asm/arch-rockchip/timer.h> #include <linux/bitops.h> #if CONFIG_IS_ENABLED (BANNER_PRINT )#include <timestamp.h> #endif -#define TIMER_LOAD_COUNT_L 0x00 -#define TIMER_LOAD_COUNT_H 0x04 -#define TIMER_CONTROL_REG 0x10 -#define TIMER_EN 0x1 -#define TIMER_FMODE BIT(0) -#define TIMER_RMODE BIT(1) - -__weak void rockchip_stimer_init (void ) -{ -#if defined(CONFIG_ROCKCHIP_STIMER_BASE ) -/* If Timer already enabled, don't re-init it */ -u32 reg =readl (CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG ); - -if (reg &TIMER_EN ) -return ; - -#ifndef CONFIG_ARM64 - asmvolatile ("mcr p15, 0, %0, c14, c0, 0" - : :"r" (CONFIG_COUNTER_FREQUENCY )); -#endif - -writel (0 ,CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG ); -writel (0xffffffff ,CONFIG_ROCKCHIP_STIMER_BASE ); -writel (0xffffffff ,CONFIG_ROCKCHIP_STIMER_BASE +4 ); -writel (TIMER_EN |TIMER_FMODE ,CONFIG_ROCKCHIP_STIMER_BASE + -TIMER_CONTROL_REG ); -#endif -} -void board_init_f (ulong dummy) {struct udevice *dev;
Signature · 1 line
2.34.1
Re: [PATCH v2 01/14] rockchip: Move the default timer init to a common file
Hi Simon,
Quoted 58 lines · Simon Glass
Rather than repeating the same code in two files (SPL and TPL), move it to a shared filed.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Dragan Simic <[email protected]>---
(no changes since v1)
arch/arm/include/asm/arch-rockchip/timer.h | 3 ++ arch/arm/mach-rockchip/Makefile | 4 +-- arch/arm/mach-rockchip/spl.c | 21 +------------ arch/arm/mach-rockchip/spl_common.c | 36 ++++++++++++++++++++++ arch/arm/mach-rockchip/tpl.c | 30 +----------------- 5 files changed, 43 insertions(+), 51 deletions(-)create mode 100644
arch/arm/mach-rockchip/spl_common.carch/arm/include/asm/arch-rockchip/timer.h +3
-0@@ -15,4 +15,7 @@ struct rk_timer { u32 timer_int_status; }; +/** rockchip_stimer_init() - Set up the timer ready for use */ +void rockchip_stimer_init (void ); +#endif arch/arm/mach-rockchip/Makefile +2
-2@@ -8,9 +8,9 @@ # inaccessible/protected memory (and the bootrom-helper assumes that # the stack-pointer is valid before switching to the U-Boot stack). obj-spl-$(CONFIG_ROCKCHIP_BROM_HELPER) += bootrom.o -obj-spl-$(CONFIG_SPL_ROCKCHIP_COMMON_BOARD) += spl.o spl-boot-order.o +obj-spl-$(CONFIG_SPL_ROCKCHIP_COMMON_BOARD) += spl.o spl-boot-order.o spl_common.o obj-tpl-$(CONFIG_ROCKCHIP_BROM_HELPER) += bootrom.o -obj-tpl-$(CONFIG_TPL_ROCKCHIP_COMMON_BOARD) += tpl.o +obj-tpl-$(CONFIG_TPL_ROCKCHIP_COMMON_BOARD) += tpl.o spl_common.o obj-tpl-$(CONFIG_ROCKCHIP_PX30) += px30-board-tpl.o obj-spl-$(CONFIG_ROCKCHIP_RK3036) += rk3036-board-spl.oarch/arm/mach-rockchip/spl.c +1
-0@@ -13,6 +13,7 @@#include <ram.h> #include <spl.h> #include <asm/arch-rockchip/bootrom.h> +#include <asm/arch-rockchip/timer.h> #include <asm/global_data.h> #include <asm/io.h> #include <linux/bitops.h>
arch/arm/mach-rockchip/spl.c u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device) · line 89
Quoted 3 lines
arch/arm/mach-rockchip/spl.c +0
-0@@ -86,26 +87,6 @@ u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)#define TIMER_FMODE BIT(0)#define TIMER_RMODE BIT(1)
Please also remove the now unused constants just above this line, the same way you did for the tpl file.
With that,
Thanks!
Quentin
PATCH v2 2/14 spl: Correct use of CMD_BOOTI and CMD_BOOTZ
In reply to Simon GlassThese should have a CONFIG_ prefix. Add it.
---
(no changes since v1)
common/spl/spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
common/spl/spl.c +2 -2
@@ -322,7 +322,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,#endif #if CONFIG_IS_ENABLED(OS_BOOT) -#if defined(CMD_BOOTI) +#if defined(CONFIG_CMD_BOOTI) ulong start, size; if (!booti_setup((ulong)header, &start, &size, 0)) {
@@ -336,7 +336,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image, spl_image->load_addr, spl_image->size); return 0; } -#elif defined(CMD_BOOTZ) +#elif defined(CONFIG_CMD_BOOTZ)ulong start, end;if (!bootz_setup ((ulong )header, &start, &end)) {
Signature · 1 line
2.34.1
Re: [PATCH v2 02/14] spl: Correct use of CMD_BOOTI and CMD_BOOTZ
Hi Simon,
Quoted 17 lines · Simon Glass
These should have a
CONFIG_prefix. Add it.Signed-off-by Simon Glass <[email protected]>Fixes 7a0d88076b9 ("Add in the ability to load and boot an uncompr...")Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
common/spl/spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)common/spl/spl.c +0
-0
common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 325
Quoted 5 lines
common/spl/spl.c +1
-1@@ -322,7 +322,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,#endif #if CONFIG_IS_ENABLED (OS_BOOT ) -#if defined(CMD_BOOTI ) +#if defined(CONFIG_CMD_BOOTI )
Maybe use IS_ENABLED(CMD_BOOTI) instead?
common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 339
Quoted 9 lines
common/spl/spl.c +1
-1ulong start, size;if (!booti_setup ((ulong )header, &start, &size,0 )) {@@ -336,7 +336,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image, spl_image->load_addr, spl_image->size); return 0; } -#elif defined(CMD_BOOTZ) +#elif defined(CONFIG_CMD_BOOTZ)
Ditto?
In any case,
Though.... i'm wondering why we are checking for CMD_BOOTI in SPL in the first place?
Cheers,
Quentin
Quoted 3 lines
common/spl/spl.c +0
-0ulong start, end;if (!bootz_setup ((ulong )header, &start, &end)) {
Re: [PATCH v2 02/14] spl: Correct use of CMD_BOOTI and CMD_BOOTZ
Hi Quentin,
Quoted 23 lines · Quentin Schulz
Hi Simon,
Quoted 19 lines · Simon Glass
These should have a
CONFIG_prefix. Add it.Signed-off-by Simon Glass <[email protected]>Fixes 7a0d88076b9 ("Add in the ability to load and boot an uncompr...")Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
common/spl/spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)common/spl/spl.c +0
-0@@ -322,7 +322,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,#endif
Quoted 5 lines
common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 325
Quoted 3 lines
common/spl/spl.c +1
-1#if CONFIG_IS_ENABLED (OS_BOOT ) -#if defined(CMD_BOOTI ) +#if defined(CONFIG_CMD_BOOTI )Maybe use
IS_ENABLED(CMD_BOOTI)instead?
IS_ENABLED(CONFIG_CMD_BOOTI) I assume. Sure, but I don't think it matters as they are equivalent.
Quoted 13 lines
common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 339
Quoted 10 lines
common/spl/spl.c +1
-1ulong start, size;if (!booti_setup ((ulong )header, &start, &size,0 )) {@@ -336,7 +336,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image, spl_image->load_addr, spl_image->size); return 0; } -#elif defined(CMD_BOOTZ) +#elif defined(CONFIG_CMD_BOOTZ)Ditto?
Quoted 6 lines
In any case,
Reviewed-by Quentin Schulz <[email protected]>Though.... i'm wondering why we are checking for
CMD_BOOTIin SPL in the first place?
I suppose it is to enable a feature in SPL only if it will be used in U-Boot?
Quoted 4 lines
common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 342
Quoted 4 lines
common/spl/spl.c +0
-0ulong start, end;if (!bootz_setup ((ulong )header, &start, &end)) {
Regards,
Simon
Re: [PATCH v2 02/14] spl: Correct use of CMD_BOOTI and CMD_BOOTZ
In reply to Simon GlassHi Simon,
Quoted 26 lines · Simon Glass
These should have a
CONFIG_prefix. Add it.Signed-off-by Simon Glass <[email protected]>Fixes 7a0d88076b9 ("Add in the ability to load and boot an uncompr...")Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
common/spl/spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)common/spl/spl.c +1
-1@@ -322,7 +322,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,#endif #if CONFIG_IS_ENABLED(OS_BOOT) -#if defined(CMD_BOOTI) +#if defined(CONFIG_CMD_BOOTI) ulong start, size; if (!booti_setup((ulong)header, &start, &size, 0)) {
common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 339
Quoted 5 lines
common/spl/spl.c +1
-1@@ -336,7 +336,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image, spl_image->load_addr, spl_image->size); return 0; } -#elif defined(CMD_BOOTZ) +#elif defined(CONFIG_CMD_BOOTZ)
Should we rather use IS_ENABLED(CONFIG_CMD_BOOTZ)? (same question for booti)
In any case,
Thanks!
Quentin
PATCH v2 3/14 spl: Remove some #ifdefs in spl_parse_image_header()
In reply to Simon GlassThis function has a number of unnecessary #ifdefs so remove them.
---
(no changes since v1)
common/spl/spl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
common/spl/spl.c +11 -11
@@ -308,8 +308,10 @@ int spl_parse_image_header(struct spl_image_info *spl_image, ret =spl_parse_legacy_header (spl_image, header);if (ret)return ret; - }else { -#ifdef CONFIG_SPL_PANIC_ON_RAW_IMAGE +return 0 ; + } + +if (IS_ENABLED (CONFIG_SPL_PANIC_ON_RAW_IMAGE )) {/* * CONFIG_SPL_PANIC_ON_RAW_IMAGE is defined when the * code which loads images in SPL cannot guarantee that
@@ -319,10 +321,9 @@ int spl_parse_image_header(struct spl_image_info *spl_image,* is bad, and thus should be skipped silently. */ panic ("** no mkimage signature but raw image not supported" ); -#endif + } -#if CONFIG_IS_ENABLED(OS_BOOT) -#if defined(CONFIG_CMD_BOOTI) +if (CONFIG_IS_ENABLED (OS_BOOT ) &&IS_ENABLED (CONFIG_CMD_BOOTI )) {ulong start, size;if (!booti_setup ((ulong )header, &start, &size,0 )) {
@@ -336,7 +337,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image, spl_image->load_addr, spl_image->size);return 0 ; } -#elif defined(CONFIG_CMD_BOOTZ) + }else if (CONFIG_IS_ENABLED (OS_BOOT ) &&IS_ENABLED (CONFIG_CMD_BOOTZ )) {ulong start, end;if (!bootz_setup ((ulong )header, &start, &end)) {
@@ -350,11 +351,11 @@ int spl_parse_image_header(struct spl_image_info *spl_image, spl_image->load_addr, spl_image->size);return 0 ; } -#endif -#endif + } -if (!spl_parse_board_header (spl_image, bootdev, (const void *)header,sizeof (*header))) -return 0 ; +if (!spl_parse_board_header (spl_image, bootdev, (const void *)header, +sizeof (*header))) +return 0 ;#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT /* Signature not found - assume u-boot.bin */
@@ -366,7 +367,6 @@ int spl_parse_image_header(struct spl_image_info *spl_image,debug ("Raw boot image support not enabled, proceeding to other boot methods\n" );return -EINVAL ;#endif - }return 0 ; }
Signature · 1 line
2.34.1
Re: [PATCH v2 03/14] spl: Remove some #ifdefs in spl_parse_image_header()
Hi Simon,
Quoted 29 lines · Simon Glass
This function has a number of unnecessary #ifdefs so remove them.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
common/spl/spl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)common/spl/spl.c +4
-2@@ -308,8 +308,10 @@ int spl_parse_image_header(struct spl_image_info *spl_image, ret =spl_parse_legacy_header (spl_image, header);if (ret)return ret; - }else { -#ifdef CONFIG_SPL_PANIC_ON_RAW_IMAGE +return 0 ; + } + +if (IS_ENABLED (CONFIG_SPL_PANIC_ON_RAW_IMAGE )) {/* * CONFIG_SPL_PANIC_ON_RAW_IMAGE is defined when the * code which loads images in SPL cannot guarantee that
common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 326
Quoted 9 lines
common/spl/spl.c +2
-3@@ -319,10 +321,9 @@ int spl_parse_image_header(struct spl_image_info *spl_image,* is bad, and thus should be skipped silently. */ panic ("** no mkimage signature but raw image not supported" ); -#endif + } -#if CONFIG_IS_ENABLED (OS_BOOT ) -#if defined(CONFIG_CMD_BOOTI ) +if (CONFIG_IS_ENABLED (OS_BOOT ) &&IS_ENABLED (CONFIG_CMD_BOOTI )) {
Ah, I see. Done in this commit :) Ignore comment on patch 2 then :)
Thanks!
Quentin
PATCH v2 4/14 spl: Remove remaining #ifdef in spl_parse_image_header()
In reply to Simon GlassDefine spl_set_header_raw_uboot() always so we can drop the last #ifdef in this function.
---
Changes in v2:
- Avoid changing comment
common/spl/spl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
common/spl/spl.c +4 -6
@@ -245,7 +245,6 @@ __weak struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size)return map_sysmem (CONFIG_TEXT_BASE + offset,0 ); } -#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT void spl_set_header_raw_uboot (struct spl_image_info *spl_image) {ulong u_boot_pos =spl_get_image_pos ();
@@ -273,7 +272,6 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image) spl_image->os =IH_OS_U_BOOT ; spl_image->name ="U-Boot" ; } -#endif __weak int spl_parse_board_header(struct spl_image_info *spl_image, const struct spl_boot_device *bootdev,
@@ -357,16 +355,16 @@ int spl_parse_image_header(struct spl_image_info *spl_image, sizeof(*header)))return 0 ; -#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT +if (IS_ENABLED (CONFIG_SPL_RAW_IMAGE_SUPPORT )) {/* Signature not found - assume u-boot.bin */ debug ("mkimage signature not found - ih_magic = %x\n" , - header->ih_magic); + header->ih_magic);spl_set_header_raw_uboot (spl_image); -#else + }else {/* RAW image not supported, proceed to other boot methods. */ debug ("Raw boot image support not enabled, proceeding to other boot methods\n" );return -EINVAL ; -#endif + }return 0 ; }
Signature · 1 line
2.34.1
Re: [PATCH v2 04/14] spl: Remove remaining #ifdef in spl_parse_image_header()
Hi Simon,
Quoted 26 lines · Simon Glass
Define
spl_set_header_raw_uboot()always so we can drop the last #ifdef in this function.Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>---
Changes in v2:
- Avoid changing commentcommon/spl/spl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)common/spl/spl.c +0
-1@@ -245,7 +245,6 @@ __weak struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size)return map_sysmem (CONFIG_TEXT_BASE + offset,0 ); } -#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT void spl_set_header_raw_uboot (struct spl_image_info *spl_image) {ulong u_boot_pos =spl_get_image_pos ();
common/spl/spl.c void spl_set_header_raw_uboot(struct spl_image_info *spl_image) · line 276
Quoted 4 lines
common/spl/spl.c +0
-1@@ -273,7 +272,6 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image) spl_image->os =IH_OS_U_BOOT ; spl_image->name ="U-Boot" ; } -#endif
I assume this doesn't add too much to the SPL in terms of size? Otherwise we could just define an empty function when CONFIG_SPL_RAW_IMAGE_SUPPORT isn't defined to avoid bloating the SPL?
Quoted 4 lines
common/spl/spl.c +0
-0__weak int spl_parse_board_header(struct spl_image_info *spl_image, const struct spl_boot_device *bootdev,
common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 362
Quoted 10 lines
common/spl/spl.c +2
-2@@ -357,16 +355,16 @@ int spl_parse_image_header(struct spl_image_info *spl_image, sizeof(*header)))return 0 ; -#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT +if (IS_ENABLED (CONFIG_SPL_RAW_IMAGE_SUPPORT )) {/* Signature not found - assume u-boot.bin */ debug ("mkimage signature not found - ih_magic = %x\n" , - header->ih_magic); + header->ih_magic);spl_set_header_raw_uboot (spl_image);
We could return 0 here.......
common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 363
Quoted 2 lines
common/spl/spl.c +1
-1-#else + }else {
.... to avoid here the else whose last instruction is returning -EINVAL.
In any case,
Thanks!
Quentin
Re: [PATCH v2 04/14] spl: Remove remaining #ifdef in spl_parse_image_header()
Hi Quentin,
Quoted 56 lines · Quentin Schulz
Hi Simon,
Quoted 26 lines · Simon Glass
Define
spl_set_header_raw_uboot()always so we can drop the last #ifdef in this function.Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>---
Changes in v2:
- Avoid changing commentcommon/spl/spl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)common/spl/spl.c +0
-1@@ -245,7 +245,6 @@ __weak struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size)return map_sysmem (CONFIG_TEXT_BASE + offset,0 ); } -#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT void spl_set_header_raw_uboot (struct spl_image_info *spl_image) {ulong u_boot_pos =spl_get_image_pos ();common/spl/spl.c void spl_set_header_raw_uboot(struct spl_image_info *spl_image) · line 276
Quoted 4 lines
common/spl/spl.c +0
-1@@ -273,7 +272,6 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image) spl_image->os =IH_OS_U_BOOT ; spl_image->name ="U-Boot" ; } -#endif I assume this doesn't add too much to the SPL in terms of size? Otherwise we could just define an empty function when
CONFIG_SPL_RAW_IMAGE_SUPPORTisn't defined to avoid bloating the SPL?Quoted 4 lines
common/spl/spl.c +0
-0__weak int spl_parse_board_header(struct spl_image_info *spl_image, const struct spl_boot_device *bootdev,common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 362
Quoted 10 lines
common/spl/spl.c +2
-2@@ -357,16 +355,16 @@ int spl_parse_image_header(struct spl_image_info *spl_image, sizeof(*header)))return 0 ; -#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT +if (IS_ENABLED (CONFIG_SPL_RAW_IMAGE_SUPPORT )) {/* Signature not found - assume u-boot.bin */ debug ("mkimage signature not found - ih_magic = %x\n" , - header->ih_magic); + header->ih_magic);spl_set_header_raw_uboot (spl_image);We could return 0 here.......
Quoted 4 lines
common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 363
Quoted 2 lines
common/spl/spl.c +1
-1-#else + }else {.... to avoid here the else whose last instruction is returning
-EINVAL.
Sure, but then the function would be returning -EINVAL at the end. We try to have functions end with success, with failure handled by its returning early. That way we can read the 'normal' flow of the function from top to bottom.
Quoted 6 lines
In any case,
Reviewed-by Quentin Schulz <[email protected]>Thanks!
Quentin
Thanks for all your reviews.
Regards,
Simon
PATCH v2 5/14 mmc: Use logging instead of printf()
In reply to Simon GlassThe code makes quite a few uses of __func__ which puts the function name into the resulting SPL image. Use the log subsystem instead, to reduce size.
The CONFIG_LOGF_FUNC option can be used to enable the function name.
---
Changes in v2:
- Various updates to log messages
- Drop an unnecessary cast
drivers/mmc/sdhci.c | 46 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 27 deletions(-)
drivers/mmc/sdhci.c +19 -27
@@ -32,8 +32,7 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)sdhci_writeb (host, mask,SDHCI_SOFTWARE_RESET );while (sdhci_readb (host,SDHCI_SOFTWARE_RESET ) & mask) {if (timeout ==0 ) { -printf ("%s: Reset 0x%x never completed.\n" , - __func__, (int )mask); +log_warning ("Reset %x never completed\n" , mask);return ; } timeout--;
@@ -139,8 +138,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data) do { stat = sdhci_readl(host, SDHCI_INT_STATUS); if (stat & SDHCI_INT_ERROR) { - pr_debug("%s: Error detected in status(0x%X)!\n", - __func__, stat); + log_debug("Error detected in status(%x)!\n", stat); return -EIO; } if (!transfer_done && (stat & rdy)) {
@@ -173,7 +171,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data)if (timeout-- >0 )udelay (10 );else { -printf ("%s: Transfer data timeout\n" , __func__); +log_err ("Transfer data timeout\n" );return -ETIMEDOUT ; } }while (!(stat &SDHCI_INT_DATA_END ));
@@ -232,7 +230,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,while (sdhci_readl (host,SDHCI_PRESENT_STATE ) & mask) {if (time >= cmd_timeout) { -printf ("%s: MMC: %d busy " , __func__, mmc_dev); +log_warning ("mmc%d busy " , mmc_dev);if (2 * cmd_timeout <=SDHCI_CMD_MAX_TIMEOUT ) { cmd_timeout += cmd_timeout; printf("timeout increasing to: %u ms.\n",
@@ -316,8 +314,8 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, }if (get_timer (start) >=SDHCI_READ_STATUS_TIMEOUT ) { -printf ("%s: Timeout for status update: %08x %08x\n" , - __func__, stat, mask); +log_warning ("Timeout for status update: %08x %08x\n" , + stat, mask);return -ETIMEDOUT ; } }while ((stat & mask) != mask);
@@ -358,7 +356,7 @@ static int sdhci_execute_tuning(struct udevice *dev, uint opcode)struct mmc *mmc =mmc_get_mmc_dev (dev);struct sdhci_host *host = mmc->priv; -debug ("%s\n" , __func__); +log_debug ("sdhci tuning\n" );if (host->ops && host->ops->platform_execute_tuning) { err = host->ops->platform_execute_tuning (mmc, opcode);
@@ -380,8 +378,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)while (sdhci_readl (host,SDHCI_PRESENT_STATE ) & (SDHCI_CMD_INHIBIT |SDHCI_DATA_INHIBIT )) {if (timeout ==0 ) { -printf ("%s: Timeout to wait cmd & data inhibit\n" , - __func__); +log_err ("Timeout waiting for cmd & data inhibit\n" );return -EBUSY ; }
@@ -397,7 +394,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)if (host->ops && host->ops->set_delay) { ret = host->ops->set_delay (host);if (ret) { -printf ("%s: Error while setting tap delay\n" , __func__); +log_err ("Error while setting tap delay\n" );return ret; } }
@@ -405,7 +402,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)if (host->ops && host->ops->config_dll) { ret = host->ops->config_dll (host, clock, false);if (ret) { -printf ("%s: Error while configuring dll\n" , __func__); +log_err ("Error configuring dll\n" );return ret; } }
@@ -456,7 +453,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)if (host->ops && host->ops->config_dll) { ret = host->ops->config_dll (host, clock, true);if (ret) { -printf ("%s: Error while configuring dll\n" , __func__); +log_err ("Error enabling dll\n" );return ret; } }
@@ -472,8 +469,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)while (!((clk =sdhci_readw (host,SDHCI_CLOCK_CONTROL )) &SDHCI_CLOCK_INT_STABLE )) {if (timeout ==0 ) { -printf ("%s: Internal clock never stabilised.\n" , - __func__); +log_err ("Internal clock never stabilised.\n" );return -EBUSY ; } timeout--;
@@ -738,8 +734,7 @@ static int sdhci_init(struct mmc *mmc)if (host->quirks &SDHCI_QUIRK_32BIT_DMA_ADDR ) { host->align_buffer =memalign (8 ,512 *1024 );if (!host->align_buffer) { -printf ("%s: Aligned buffer alloc failed!!!\n" , - __func__); +log_err ("Aligned buffer alloc failed\n" );return -ENOMEM ; } }
@@ -881,20 +876,18 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,#else caps =sdhci_readl (host,SDHCI_CAPABILITIES );#endif -debug ("%s, caps: 0x%x\n" , __func__, caps); +log_debug ("caps: 0x%x\n" , caps);#if CONFIG_IS_ENABLED (MMC_SDHCI_SDMA )if ((caps &SDHCI_CAN_DO_SDMA )) { host->flags |=USE_SDMA ; }else { -debug ("%s: Your controller doesn't support SDMA!!\n" , - __func__); +log_debug ("Controller doesn't support SDMA\n" ); }#endif #if CONFIG_IS_ENABLED (MMC_SDHCI_ADMA )if (!(caps &SDHCI_CAN_DO_ADMA2 )) { -printf ("%s: Your controller doesn't support ADMA!!\n" , - __func__); +log_err ("Controller doesn't support ADMA\n" );return -EINVAL ; }if (!host->adma_desc_table) {
@@ -927,7 +920,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,#else caps_1 =sdhci_readl (host,SDHCI_CAPABILITIES_1 );#endif -debug ("%s, caps_1: 0x%x\n" , __func__, caps_1); +log_debug ("caps_1: %x\n" , caps_1); host->clk_mul = (caps_1 &SDHCI_CLOCK_MUL_MASK ) >>SDHCI_CLOCK_MUL_SHIFT ;
@@ -953,8 +946,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host, host->max_clk *= host->clk_mul; }if (host->max_clk ==0 ) { -printf ("%s: Hardware doesn't specify base clock frequency\n" , - __func__); +log_err ("Hardware doesn't specify base clock frequency\n" );return -EINVAL ; }if (f_max && (f_max < host->max_clk))
@@ -1047,7 +1039,7 @@ int add_sdhci(struct sdhci_host *host, u32 f_max, u32 f_min) host->mmc =mmc_create (&host->cfg, host);if (host->mmc ==NULL ) { -printf ("%s: mmc create fail!\n" , __func__); +log_err ("mmc create fail\n" );return -ENOMEM ; }
Signature · 1 line
2.34.1
Re: [PATCH v2 05/14] mmc: Use logging instead of printf()
Hi Simon,
Quoted 6 lines · Simon Glass
The code makes quite a few uses of
__func__which puts the function name into the resulting SPL image. Use the log subsystem instead, to reduce size.The
CONFIG_LOGF_FUNCoption can be used to enable the function name.
If I didn't misread the code, I believe that __func__ is **always** in the image whenever LOG is defined, just that it may not be printed?
c.f. https://source.denx.de/u-boot/u-boot/-/blob/master/include/log.h?ref_type=heads#L196-L206
Quoted 15 lines
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Various updates to log messages
- Drop an unnecessary castdrivers/mmc/sdhci.c | 46 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 27 deletions(-)drivers/mmc/sdhci.c +0
-0
drivers/mmc/sdhci.c static void sdhci_reset(struct sdhci_host *host, u8 mask) · line 35
Quoted 6 lines
drivers/mmc/sdhci.c +1
-2@@ -32,8 +32,7 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)sdhci_writeb (host, mask,SDHCI_SOFTWARE_RESET );while (sdhci_readb (host,SDHCI_SOFTWARE_RESET ) & mask) {if (timeout ==0 ) { -printf ("%s: Reset 0x%x never completed.\n" , - __func__, (int )mask); +log_warning ("Reset %x never completed\n" , mask);
If log_* functions aren't changing the meaning of printf formats, please keep the 0x prefix to highlight it is hex digits as there's some overlap in hex and dec digits. This applies to all 0x%x that were changed to %x in this patch.
Quoted 23 lines
drivers/mmc/sdhci.c +2
-3return ; } timeout--;@@ -139,8 +138,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data) do { stat = sdhci_readl(host, SDHCI_INT_STATUS); if (stat & SDHCI_INT_ERROR) { - pr_debug("%s: Error detected in status(0x%X)!\n", - __func__, stat); + log_debug("Error detected in status(%x)!\n", stat); return -EIO; } if (!transfer_done && (stat & rdy)) {@@ -173,7 +171,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data)if (timeout-- >0 )udelay (10 );else { -printf ("%s: Transfer data timeout\n" , __func__); +log_err ("Transfer data timeout\n" );return -ETIMEDOUT ; } }while (!(stat &SDHCI_INT_DATA_END ));
drivers/mmc/sdhci.c static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, · line 236
Quoted 8 lines
drivers/mmc/sdhci.c +1
-1@@ -232,7 +230,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,while (sdhci_readl (host,SDHCI_PRESENT_STATE ) & mask) {if (time >= cmd_timeout) { -printf ("%s: MMC: %d busy " , __func__, mmc_dev); +log_warning ("mmc%d busy " , mmc_dev);if (2 * cmd_timeout <=SDHCI_CMD_MAX_TIMEOUT ) { cmd_timeout += cmd_timeout; printf("timeout increasing to: %u ms.\n",
I would suggest to migrate this to the same log level as the busy message. Same for the puts(timeout) which is outside of this git context.
Quoted 49 lines
drivers/mmc/sdhci.c +6
-7@@ -316,8 +314,8 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, }if (get_timer (start) >=SDHCI_READ_STATUS_TIMEOUT ) { -printf ("%s: Timeout for status update: %08x %08x\n" , - __func__, stat, mask); +log_warning ("Timeout for status update: %08x %08x\n" , + stat, mask);return -ETIMEDOUT ; } }while ((stat & mask) != mask);@@ -358,7 +356,7 @@ static int sdhci_execute_tuning(struct udevice *dev, uint opcode)struct mmc *mmc =mmc_get_mmc_dev (dev);struct sdhci_host *host = mmc->priv; -debug ("%s\n" , __func__); +log_debug ("sdhci tuning\n" );if (host->ops && host->ops->platform_execute_tuning) { err = host->ops->platform_execute_tuning (mmc, opcode);@@ -380,8 +378,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)while (sdhci_readl (host,SDHCI_PRESENT_STATE ) & (SDHCI_CMD_INHIBIT |SDHCI_DATA_INHIBIT )) {if (timeout ==0 ) { -printf ("%s: Timeout to wait cmd & data inhibit\n" , - __func__); +log_err ("Timeout waiting for cmd & data inhibit\n" );return -EBUSY ; }@@ -397,7 +394,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)if (host->ops && host->ops->set_delay) { ret = host->ops->set_delay (host);if (ret) { -printf ("%s: Error while setting tap delay\n" , __func__); +log_err ("Error while setting tap delay\n" );return ret; } }@@ -405,7 +402,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)if (host->ops && host->ops->config_dll) { ret = host->ops->config_dll (host, clock, false);if (ret) { -printf ("%s: Error while configuring dll\n" , __func__); +log_err ("Error configuring dll\n" );return ret; } }
drivers/mmc/sdhci.c int sdhci_set_clock(struct mmc *mmc, unsigned int clock) · line 456
Quoted 5 lines
drivers/mmc/sdhci.c +1
-1@@ -456,7 +453,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)if (host->ops && host->ops->config_dll) { ret = host->ops->config_dll (host, clock, true);if (ret) { -printf ("%s: Error while configuring dll\n" , __func__); +log_err ("Error enabling dll\n" );
Is this really only about enabling the DLL?
In rockchip_sdhci, the function does a lot more when enable=true than enable=false so I feel like it's a bit disingenuous to downgrade config_dll(..., 1) to "enabling dll".
Also not sure what made you decide on the log level but aside from the aforementioned issues, looks good to me.
Cheers,
Quentin
Re: [PATCH v2 05/14] mmc: Use logging instead of printf()
Hi Quentin,
Quoted 8 lines · Quentin Schulz
Hi Simon,
Quoted 4 lines · Simon Glass
The code makes quite a few uses of
__func__which puts the function name into the resulting SPL image. Use the log subsystem instead, to reduce size.
Quoted 8 lines
Quoted 2 lines
The
CONFIG_LOGF_FUNCoption can be used to enable the function name.If I didn't misread the code, I believe that
__func__is **always** in the image whenever LOG is defined, just that it may not be printed?c.f.
https://source.denx.de/u-boot/u-boot/-/blob/master/include/log.h?ref_type=heads#L196-L206
Yes that's right. It is fixed by [1]
Quoted 124 lines
Quoted 16 lines
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Various updates to log messages
- Drop an unnecessary castdrivers/mmc/sdhci.c | 46 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 27 deletions(-)drivers/mmc/sdhci.c +0
-0drivers/mmc/sdhci.c static void sdhci_reset(struct sdhci_host *host, u8 mask) · line 35
Quoted 6 lines
drivers/mmc/sdhci.c +1
-2@@ -32,8 +32,7 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)sdhci_writeb (host, mask,SDHCI_SOFTWARE_RESET );while (sdhci_readb (host,SDHCI_SOFTWARE_RESET ) & mask) {if (timeout ==0 ) { -printf ("%s: Reset 0x%x never completed.\n" , - __func__, (int )mask); +log_warning ("Reset %x never completed\n" , mask);If log_* functions aren't changing the meaning of printf formats, please keep the 0x prefix to highlight it is hex digits as there's some overlap in hex and dec digits. This applies to all 0x%x that were changed to %x in this patch.
Quoted 23 lines
drivers/mmc/sdhci.c +2
-3return ; } timeout--;@@ -139,8 +138,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data) do { stat = sdhci_readl(host, SDHCI_INT_STATUS); if (stat & SDHCI_INT_ERROR) { - pr_debug("%s: Error detected in status(0x%X)!\n", - __func__, stat); + log_debug("Error detected in status(%x)!\n", stat); return -EIO; } if (!transfer_done && (stat & rdy)) {@@ -173,7 +171,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data)if (timeout-- >0 )udelay (10 );else { -printf ("%s: Transfer data timeout\n" , __func__); +log_err ("Transfer data timeout\n" );return -ETIMEDOUT ; } }while (!(stat &SDHCI_INT_DATA_END ));drivers/mmc/sdhci.c static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, · line 236
Quoted 8 lines
drivers/mmc/sdhci.c +1
-1@@ -232,7 +230,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,while (sdhci_readl (host,SDHCI_PRESENT_STATE ) & mask) {if (time >= cmd_timeout) { -printf ("%s: MMC: %d busy " , __func__, mmc_dev); +log_warning ("mmc%d busy " , mmc_dev);if (2 * cmd_timeout <=SDHCI_CMD_MAX_TIMEOUT ) { cmd_timeout += cmd_timeout; printf("timeout increasing to: %u ms.\n",I would suggest to migrate this to the same log level as the busy message. Same for the puts(timeout) which is outside of this git context.
Quoted 49 lines
drivers/mmc/sdhci.c +6
-7@@ -316,8 +314,8 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, }if (get_timer (start) >=SDHCI_READ_STATUS_TIMEOUT ) { -printf ("%s: Timeout for status update: %08x %08x\n" , - __func__, stat, mask); +log_warning ("Timeout for status update: %08x %08x\n" , + stat, mask);return -ETIMEDOUT ; } }while ((stat & mask) != mask);@@ -358,7 +356,7 @@ static int sdhci_execute_tuning(struct udevice *dev, uint opcode)struct mmc *mmc =mmc_get_mmc_dev (dev);struct sdhci_host *host = mmc->priv; -debug ("%s\n" , __func__); +log_debug ("sdhci tuning\n" );if (host->ops && host->ops->platform_execute_tuning) { err = host->ops->platform_execute_tuning (mmc, opcode);@@ -380,8 +378,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)while (sdhci_readl (host,SDHCI_PRESENT_STATE ) & (SDHCI_CMD_INHIBIT |SDHCI_DATA_INHIBIT )) {if (timeout ==0 ) { -printf ("%s: Timeout to wait cmd & data inhibit\n" , - __func__); +log_err ("Timeout waiting for cmd & data inhibit\n" );return -EBUSY ; }@@ -397,7 +394,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)if (host->ops && host->ops->set_delay) { ret = host->ops->set_delay (host);if (ret) { -printf ("%s: Error while setting tap delay\n" , __func__); +log_err ("Error while setting tap delay\n" );return ret; } }@@ -405,7 +402,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)if (host->ops && host->ops->config_dll) { ret = host->ops->config_dll (host, clock, false);if (ret) { -printf ("%s: Error while configuring dll\n" , __func__); +log_err ("Error configuring dll\n" );return ret; } }drivers/mmc/sdhci.c int sdhci_set_clock(struct mmc *mmc, unsigned int clock) · line 456
Quoted 5 lines
drivers/mmc/sdhci.c +1
-1@@ -456,7 +453,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)if (host->ops && host->ops->config_dll) { ret = host->ops->config_dll (host, clock, true);if (ret) { -printf ("%s: Error while configuring dll\n" , __func__); +log_err ("Error enabling dll\n" );Is this really only about enabling the DLL?
In
rockchip_sdhci, the function does a lot more when enable=true than enable=false so I feel like it's a bit disingenuous to downgradeconfig_dll(..., 1)to "enabling dll".
Quoted 5 lines
Also not sure what made you decide on the log level but aside from the aforementioned issues, looks good to me.
Cheers,
Quentin
[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
PATCH v2 6/14 mmc: Use logging instead of pr_err()
In reply to Simon GlassUse the log subsystem instead of dev, to avoid including function names in the code.
The CONFIG_LOGF_FUNC option can be used to enable the function name.
---
(no changes since v1)
drivers/mmc/mmc.c | 49 ++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-)
drivers/mmc/mmc.c +25 -24
@@ -294,7 +294,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms)if (status &MMC_STATUS_MASK ) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("Status Error: 0x%08x\n" , status); +log_err ("Status Error: %08x\n" , status);#endif return -ECOMM ; }
@@ -307,7 +307,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms)if (timeout_ms <=0 ) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("Timeout waiting card ready\n" ); +log_err ("Timeout waiting card ready\n" );#endif return -ETIMEDOUT ; }
@@ -449,7 +449,7 @@ static int mmc_read_blocks(struct mmc *mmc, void *dst, lbaint_t start,if (blkcnt >1 ) {if (mmc_send_stop_transmission (mmc, false)) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("mmc fail to send stop cmd\n" ); +log_err ("mmc fail to send stop cmd\n" );#endif return 0 ; }
@@ -500,8 +500,8 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt,if ((start + blkcnt) > block_dev->lba) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("MMC: block number 0x" LBAF " exceeds max(0x" LBAF ")\n" , - start + blkcnt, block_dev->lba); +log_err ("MMC: block number " LBAF " exceeds max(" LBAF ")\n" , + start + blkcnt, block_dev->lba);#endif return 0 ; }
@@ -997,7 +997,7 @@ static int mmc_get_capabilities(struct mmc *mmc)return 0 ;if (!ext_csd) { -pr_err ("No ext_csd found!\n" );/* this should enver happen */ +log_err ("No ext_csd found!\n" );/* this should enver happen */ return -ENOTSUPP ; }
@@ -1109,17 +1109,17 @@ int mmc_hwpart_config(struct mmc *mmc,return -EINVAL ;if (IS_SD (mmc) || (mmc->version <MMC_VERSION_4_41 )) { -pr_err ("eMMC >= 4.4 required for enhanced user data area\n" ); +log_err ("eMMC >= 4.4 required for enhanced user data area\n" );return -EMEDIUMTYPE ; }if (!(mmc->part_support &PART_SUPPORT )) { -pr_err ("Card does not support partitioning\n" ); +log_err ("Card does not support partitioning\n" );return -EMEDIUMTYPE ; }if (!mmc->hc_wp_grp_size) { -pr_err ("Card does not define HC WP group size\n" ); +log_err ("Card does not define HC WP group size\n" );return -EMEDIUMTYPE ; }
@@ -1127,8 +1127,7 @@ int mmc_hwpart_config(struct mmc *mmc,if (conf->user.enh_size) {if (conf->user.enh_size % mmc->hc_wp_grp_size || conf->user.enh_start % mmc->hc_wp_grp_size) { -pr_err ("User data enhanced area not HC WP group " -"size aligned\n" ); +log_err ("User data enhanced area not HC WP group size aligned\n" );return -EINVAL ; } part_attrs |=EXT_CSD_ENH_USR ;
@@ -1146,8 +1145,8 @@ int mmc_hwpart_config(struct mmc *mmc,for (pidx =0 ; pidx <4 ; pidx++) {if (conf->gp_part[pidx].size % mmc->hc_wp_grp_size) { -pr_err ("GP%i partition not HC WP group size " -"aligned\n" , pidx+1 ); +log_err ("GP%i partition not HC WP group-size aligned\n" , + pidx +1 );return -EINVAL ; } gp_size_mult[pidx] = conf->gp_part[pidx].size / mmc->hc_wp_grp_size;
@@ -1158,7 +1157,7 @@ int mmc_hwpart_config(struct mmc *mmc, }if (part_attrs && ! (mmc->part_support &ENHNCD_SUPPORT )) { -pr_err ("Card does not support enhanced attribute\n" ); +log_err ("Card does not support enhanced attribute\n" );return -EMEDIUMTYPE ; }
@@ -1171,8 +1170,8 @@ int mmc_hwpart_config(struct mmc *mmc, (ext_csd[EXT_CSD_MAX_ENH_SIZE_MULT +1 ] <<8 ) + ext_csd[EXT_CSD_MAX_ENH_SIZE_MULT ];if (tot_enh_size_mult > max_enh_size_mult) { -pr_err ("Total enhanced size exceeds maximum (%u > %u)\n" , - tot_enh_size_mult, max_enh_size_mult); +log_err ("Total enhanced size exceeds maximum (%x > %x)\n" , + tot_enh_size_mult, max_enh_size_mult);return -EMEDIUMTYPE ; }
@@ -1205,7 +1204,7 @@ int mmc_hwpart_config(struct mmc *mmc,if (ext_csd[EXT_CSD_PARTITION_SETTING ] &EXT_CSD_PARTITION_SETTING_COMPLETED ) { -pr_err ("Card already partitioned\n" ); +log_err ("Card already partitioned\n" );return -EPERM ; }
@@ -1876,7 +1875,7 @@ error: } } -pr_err ("unable to select a mode\n" ); +log_err ("unable to select a mode\n" );return -ENOTSUPP ; }
@@ -2254,7 +2253,7 @@ error: } } -pr_err ("unable to select a mode : %d\n" , err); +log_err ("unable to select a mode: %d\n" , err);return -ENOTSUPP ; }
@@ -2921,8 +2920,10 @@ retry:if (err) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -if (!quiet) -pr_err ("Card did not respond to voltage select! : %d\n" , err); +if (!quiet) { +log_err ("Card did not respond to voltage select! : %d\n" , + err); + }#endif return -EOPNOTSUPP ; }
@@ -2955,7 +2956,7 @@ int mmc_start_init(struct mmc *mmc) | MMC_CAP(MMC_LEGACY) | MMC_MODE_1BIT); }else { -pr_err ("bus_mode requested is not supported\n" ); +log_err ("bus_mode requested is not supported\n" );return -EINVAL ; } }
@@ -2975,7 +2976,7 @@ int mmc_start_init(struct mmc *mmc)if (no_card) { mmc->has_init =0 ;#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("MMC: no card present\n" ); +log_err ("MMC: no card present\n" );#endif return -ENOMEDIUM ; }
@@ -3104,7 +3105,7 @@ static int mmc_probe(struct bd_info *bis) uclass_foreach_dev(dev, uc) { ret =device_probe (dev);if (ret) -pr_err ("%s - probe failed: %d\n" , dev->name, ret); +log_err ("%s - probe failed: %d\n" , dev->name, ret); }return 0 ;
Signature · 1 line
2.34.1
Re: [PATCH v2 06/14] mmc: Use logging instead of pr_err()
Hi Simon,
Quoted 19 lines · Simon Glass
Use the log subsystem instead of dev, to avoid including function names in the code.
The
CONFIG_LOGF_FUNCoption can be used to enable the function name.Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
drivers/mmc/mmc.c | 49 ++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-)drivers/mmc/mmc.c +0
-0
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms) · line 297
Quoted 5 lines
drivers/mmc/mmc.c +1
-1@@ -294,7 +294,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms)if (status &MMC_STATUS_MASK ) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("Status Error: 0x%08x\n" , status); +log_err ("Status Error: %08x\n" , status);
Please don't remove the 0x prefix (will not comment on other patches in this series if it happens again, please check :) ).
Quoted 22 lines
drivers/mmc/mmc.c +2
-2#endif return -ECOMM ; }@@ -307,7 +307,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms)if (timeout_ms <=0 ) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("Timeout waiting card ready\n" ); +log_err ("Timeout waiting card ready\n" );#endif return -ETIMEDOUT ; }@@ -449,7 +449,7 @@ static int mmc_read_blocks(struct mmc *mmc, void *dst, lbaint_t start,if (blkcnt >1 ) {if (mmc_send_stop_transmission (mmc, false)) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("mmc fail to send stop cmd\n" ); +log_err ("mmc fail to send stop cmd\n" );#endif return 0 ; }
drivers/mmc/mmc.c ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, · line 503
Quoted 6 lines
drivers/mmc/mmc.c +1
-2@@ -500,8 +500,8 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt,if ((start + blkcnt) > block_dev->lba) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("MMC: block number 0x" LBAF " exceeds max(0x" LBAF ")\n" , - start + blkcnt, block_dev->lba); + log_err("MMC: block number " LBAF " exceeds max(" LBAF ")\n",
DOn't remove the 0x prefix please.
Quoted 65 lines
drivers/mmc/mmc.c +9
-9+ start + blkcnt, block_dev->lba);#endif return 0 ; }@@ -997,7 +997,7 @@ static int mmc_get_capabilities(struct mmc *mmc)return 0 ;if (!ext_csd) { -pr_err ("No ext_csd found!\n" );/* this should enver happen */ +log_err ("No ext_csd found!\n" );/* this should enver happen */ return -ENOTSUPP ; }@@ -1109,17 +1109,17 @@ int mmc_hwpart_config(struct mmc *mmc,return -EINVAL ;if (IS_SD (mmc) || (mmc->version <MMC_VERSION_4_41 )) { -pr_err ("eMMC >= 4.4 required for enhanced user data area\n" ); +log_err ("eMMC >= 4.4 required for enhanced user data area\n" );return -EMEDIUMTYPE ; }if (!(mmc->part_support &PART_SUPPORT )) { -pr_err ("Card does not support partitioning\n" ); +log_err ("Card does not support partitioning\n" );return -EMEDIUMTYPE ; }if (!mmc->hc_wp_grp_size) { -pr_err ("Card does not define HC WP group size\n" ); +log_err ("Card does not define HC WP group size\n" );return -EMEDIUMTYPE ; }@@ -1127,8 +1127,7 @@ int mmc_hwpart_config(struct mmc *mmc,if (conf->user.enh_size) {if (conf->user.enh_size % mmc->hc_wp_grp_size || conf->user.enh_start % mmc->hc_wp_grp_size) { -pr_err ("User data enhanced area not HC WP group " -"size aligned\n" ); +log_err ("User data enhanced area not HC WP group size aligned\n" );return -EINVAL ; } part_attrs |=EXT_CSD_ENH_USR ;@@ -1146,8 +1145,8 @@ int mmc_hwpart_config(struct mmc *mmc,for (pidx =0 ; pidx <4 ; pidx++) {if (conf->gp_part[pidx].size % mmc->hc_wp_grp_size) { -pr_err ("GP%i partition not HC WP group size " -"aligned\n" , pidx+1 ); +log_err ("GP%i partition not HC WP group-size aligned\n" , + pidx +1 );return -EINVAL ; } gp_size_mult[pidx] = conf->gp_part[pidx].size / mmc->hc_wp_grp_size;@@ -1158,7 +1157,7 @@ int mmc_hwpart_config(struct mmc *mmc, }if (part_attrs && ! (mmc->part_support &ENHNCD_SUPPORT )) { -pr_err ("Card does not support enhanced attribute\n" ); +log_err ("Card does not support enhanced attribute\n" );return -EMEDIUMTYPE ; }
drivers/mmc/mmc.c int mmc_hwpart_config(struct mmc *mmc, · line 1173
Quoted 6 lines
drivers/mmc/mmc.c +1
-2@@ -1171,8 +1170,8 @@ int mmc_hwpart_config(struct mmc *mmc, (ext_csd[EXT_CSD_MAX_ENH_SIZE_MULT +1 ] <<8 ) + ext_csd[EXT_CSD_MAX_ENH_SIZE_MULT ];if (tot_enh_size_mult > max_enh_size_mult) { -pr_err ("Total enhanced size exceeds maximum (%u > %u)\n" , - tot_enh_size_mult, max_enh_size_mult); + log_err("Total enhanced size exceeds maximum (%x > %x)\n",
If you change the type (why?) to hex, please add 0x prefix to explicit the base.
Quoted 32 lines
drivers/mmc/mmc.c +4
-3+ tot_enh_size_mult, max_enh_size_mult);return -EMEDIUMTYPE ; }@@ -1205,7 +1204,7 @@ int mmc_hwpart_config(struct mmc *mmc,if (ext_csd[EXT_CSD_PARTITION_SETTING ] &EXT_CSD_PARTITION_SETTING_COMPLETED ) { -pr_err ("Card already partitioned\n" ); +log_err ("Card already partitioned\n" );return -EPERM ; }@@ -1876,7 +1875,7 @@ error: } } -pr_err ("unable to select a mode\n" ); +log_err ("unable to select a mode\n" );return -ENOTSUPP ; }@@ -2254,7 +2253,7 @@ error: } } -pr_err ("unable to select a mode : %d\n" , err); +log_err ("unable to select a mode: %d\n" , err);return -ENOTSUPP ; }
drivers/mmc/mmc.c retry: · line 2926
Quoted 9 lines
drivers/mmc/mmc.c +4
-2@@ -2921,8 +2920,10 @@ retry:if (err) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -if (!quiet) -pr_err ("Card did not respond to voltage select! : %d\n" , err); +if (!quiet) { +log_err ("Card did not respond to voltage select! : %d\n" , + err); + }
We still don't need the curly brackets here.
Looking good otherwise,
Cheers,
Quentin
Re: [PATCH v2 06/14] mmc: Use logging instead of pr_err()
Hi Quentin,
Quoted 24 lines · Quentin Schulz
Hi Simon,
Quoted 20 lines · Simon Glass
Use the log subsystem instead of dev, to avoid including function names in the code.
The
CONFIG_LOGF_FUNCoption can be used to enable the function name.Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
drivers/mmc/mmc.c | 49 ++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-)drivers/mmc/mmc.c +0
-0@@ -294,7 +294,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms)
Quoted 7 lines
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms) · line 297
Quoted 4 lines
drivers/mmc/mmc.c +1
-1if (status &MMC_STATUS_MASK ) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("Status Error: 0x%08x\n" , status); +log_err ("Status Error: %08x\n" , status);Please don't remove the 0x prefix (will not comment on other patches in this series if it happens again, please check :) ).
OK...hex is the default though.
Quoted 151 lines
Quoted 23 lines
drivers/mmc/mmc.c +2
-2#endif return -ECOMM ; }@@ -307,7 +307,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms)if (timeout_ms <=0 ) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("Timeout waiting card ready\n" ); +log_err ("Timeout waiting card ready\n" );#endif return -ETIMEDOUT ; }@@ -449,7 +449,7 @@ static int mmc_read_blocks(struct mmc *mmc, void *dst, lbaint_t start,if (blkcnt >1 ) {if (mmc_send_stop_transmission (mmc, false)) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("mmc fail to send stop cmd\n" ); +log_err ("mmc fail to send stop cmd\n" );#endif return 0 ; }drivers/mmc/mmc.c ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, · line 503
Quoted 6 lines
drivers/mmc/mmc.c +1
-2@@ -500,8 +500,8 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt,if ((start + blkcnt) > block_dev->lba) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("MMC: block number 0x" LBAF " exceeds max(0x" LBAF ")\n" , - start + blkcnt, block_dev->lba); + log_err("MMC: block number " LBAF " exceeds max(" LBAF ")\n",DOn't remove the 0x prefix please.
Quoted 65 lines
drivers/mmc/mmc.c +9
-9+ start + blkcnt, block_dev->lba);#endif return 0 ; }@@ -997,7 +997,7 @@ static int mmc_get_capabilities(struct mmc *mmc)return 0 ;if (!ext_csd) { -pr_err ("No ext_csd found!\n" );/* this should enver happen */ +log_err ("No ext_csd found!\n" );/* this should enver happen */ return -ENOTSUPP ; }@@ -1109,17 +1109,17 @@ int mmc_hwpart_config(struct mmc *mmc,return -EINVAL ;if (IS_SD (mmc) || (mmc->version <MMC_VERSION_4_41 )) { -pr_err ("eMMC >= 4.4 required for enhanced user data area\n" ); +log_err ("eMMC >= 4.4 required for enhanced user data area\n" );return -EMEDIUMTYPE ; }if (!(mmc->part_support &PART_SUPPORT )) { -pr_err ("Card does not support partitioning\n" ); +log_err ("Card does not support partitioning\n" );return -EMEDIUMTYPE ; }if (!mmc->hc_wp_grp_size) { -pr_err ("Card does not define HC WP group size\n" ); +log_err ("Card does not define HC WP group size\n" );return -EMEDIUMTYPE ; }@@ -1127,8 +1127,7 @@ int mmc_hwpart_config(struct mmc *mmc,if (conf->user.enh_size) {if (conf->user.enh_size % mmc->hc_wp_grp_size || conf->user.enh_start % mmc->hc_wp_grp_size) { -pr_err ("User data enhanced area not HC WP group " -"size aligned\n" ); +log_err ("User data enhanced area not HC WP group size aligned\n" );return -EINVAL ; } part_attrs |=EXT_CSD_ENH_USR ;@@ -1146,8 +1145,8 @@ int mmc_hwpart_config(struct mmc *mmc,for (pidx =0 ; pidx <4 ; pidx++) {if (conf->gp_part[pidx].size % mmc->hc_wp_grp_size) { -pr_err ("GP%i partition not HC WP group size " -"aligned\n" , pidx+1 ); +log_err ("GP%i partition not HC WP group-size aligned\n" , + pidx +1 );return -EINVAL ; } gp_size_mult[pidx] = conf->gp_part[pidx].size / mmc->hc_wp_grp_size;@@ -1158,7 +1157,7 @@ int mmc_hwpart_config(struct mmc *mmc, }if (part_attrs && ! (mmc->part_support &ENHNCD_SUPPORT )) { -pr_err ("Card does not support enhanced attribute\n" ); +log_err ("Card does not support enhanced attribute\n" );return -EMEDIUMTYPE ; }drivers/mmc/mmc.c int mmc_hwpart_config(struct mmc *mmc, · line 1173
Quoted 6 lines
drivers/mmc/mmc.c +1
-2@@ -1171,8 +1170,8 @@ int mmc_hwpart_config(struct mmc *mmc, (ext_csd[EXT_CSD_MAX_ENH_SIZE_MULT +1 ] <<8 ) + ext_csd[EXT_CSD_MAX_ENH_SIZE_MULT ];if (tot_enh_size_mult > max_enh_size_mult) { -pr_err ("Total enhanced size exceeds maximum (%u > %u)\n" , - tot_enh_size_mult, max_enh_size_mult); + log_err("Total enhanced size exceeds maximum (%x > %x)\n",If you change the type (why?) to hex, please add 0x prefix to explicit the base.
Quoted 32 lines
drivers/mmc/mmc.c +4
-3+ tot_enh_size_mult, max_enh_size_mult);return -EMEDIUMTYPE ; }@@ -1205,7 +1204,7 @@ int mmc_hwpart_config(struct mmc *mmc,if (ext_csd[EXT_CSD_PARTITION_SETTING ] &EXT_CSD_PARTITION_SETTING_COMPLETED ) { -pr_err ("Card already partitioned\n" ); +log_err ("Card already partitioned\n" );return -EPERM ; }@@ -1876,7 +1875,7 @@ error: } } -pr_err ("unable to select a mode\n" ); +log_err ("unable to select a mode\n" );return -ENOTSUPP ; }@@ -2254,7 +2253,7 @@ error: } } -pr_err ("unable to select a mode : %d\n" , err); +log_err ("unable to select a mode: %d\n" , err);return -ENOTSUPP ; }drivers/mmc/mmc.c retry: · line 2926
Quoted 9 lines
drivers/mmc/mmc.c +4
-2@@ -2921,8 +2920,10 @@ retry:if (err) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -if (!quiet) -pr_err ("Card did not respond to voltage select! : %d\n" , err); +if (!quiet) { +log_err ("Card did not respond to voltage select! : %d\n" , + err); + }We still don't need the curly brackets here.
Quoted 1 line
Looking good otherwise,
Regards,
Simon
Re: [PATCH v2 06/14] mmc: Use logging instead of pr_err()
Hi Simon,
Quoted 35 lines · Simon Glass
Hi Quentin,
Quoted 24 lines · Quentin Schulz
Hi Simon,
Quoted 20 lines · Simon Glass
Use the log subsystem instead of dev, to avoid including function names in the code.
The
CONFIG_LOGF_FUNCoption can be used to enable the function name.Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
drivers/mmc/mmc.c | 49 ++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-)drivers/mmc/mmc.c +0
-0@@ -294,7 +294,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms)Quoted 7 lines
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms) · line 297
Quoted 4 lines
drivers/mmc/mmc.c +1
-1if (status &MMC_STATUS_MASK ) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("Status Error: 0x%08x\n" , status); +log_err ("Status Error: %08x\n" , status);Please don't remove the 0x prefix (will not comment on other patches in this series if it happens again, please check :) ).
Quoted 2 lines
OK...hex is the default though.
Can you please clarify what you meant by "it's the default though"?
Cheers,
Quentin
Re: [PATCH v2 06/14] mmc: Use logging instead of pr_err()
Hi Quentin,
Quoted 39 lines · Quentin Schulz
Hi Simon,
Quoted 35 lines · Simon Glass
Hi Quentin,
Quoted 31 lines · Quentin Schulz
Hi Simon,
Quoted 19 lines · Simon Glass
Use the log subsystem instead of dev, to avoid including function names in the code.
The
CONFIG_LOGF_FUNCoption can be used to enable the function name.Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
drivers/mmc/mmc.c | 49 ++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-)drivers/mmc/mmc.c +0
-0drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms) · line 297
Quoted 5 lines
drivers/mmc/mmc.c +1
-1@@ -294,7 +294,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms)if (status &MMC_STATUS_MASK ) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("Status Error: 0x%08x\n" , status); +log_err ("Status Error: %08x\n" , status);Please don't remove the 0x prefix (will not comment on other patches in this series if it happens again, please check :) ).
Quoted 4 lines
Quoted 2 lines
OK...hex is the default though.
Can you please clarify what you meant by "it's the default though"?
U-Boot uses hex by default, so anything printed out or entered is normally in hex. There are a few exceptions, not all of them correct. I did send a series to allow decimal numbers but it has been deferred for a while now[1].
Regards,
Simon
[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Re: [PATCH v2 06/14] mmc: Use logging instead of pr_err()
Hi Simon,
Quoted 42 lines · Simon Glass
Hi Quentin,
Quoted 39 lines · Quentin Schulz
Hi Simon,
Quoted 35 lines · Simon Glass
Hi Quentin,
Quoted 31 lines · Quentin Schulz
Hi Simon,
Quoted 19 lines · Simon Glass
Use the log subsystem instead of dev, to avoid including function names in the code.
The
CONFIG_LOGF_FUNCoption can be used to enable the function name.Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
drivers/mmc/mmc.c | 49 ++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-)drivers/mmc/mmc.c +0
-0drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms) · line 297
Quoted 5 lines
drivers/mmc/mmc.c +1
-1@@ -294,7 +294,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms)if (status &MMC_STATUS_MASK ) {#if !defined(CONFIG_SPL_BUILD ) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT ) -pr_err ("Status Error: 0x%08x\n" , status); +log_err ("Status Error: %08x\n" , status);Please don't remove the 0x prefix (will not comment on other patches in this series if it happens again, please check :) ).
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
OK...hex is the default though.
Can you please clarify what you meant by "it's the default though"?
U-Boot uses hex by default, so anything printed out or entered is normally in hex. There are a few exceptions, not all of them correct.
Gotcha. This actually has been painful to me and I've made the mistake a few times already, e.g. writing 256 blocks instead of 100 (100 aka 0x100 instead of base10 100). Are you aware whether this is made explicit in the docs somewhere? So I could refer to it if I ever need to explain stuff?
Quoted 3 lines
I did send a series to allow decimal numbers but it has been deferred for a while now[1].
Interesting :)
Cheers,
Quentin
Re: [PATCH v2 06/14] mmc: Use logging instead of pr_err()
Hi Quentin,
Quoted 7 lines · Quentin Schulz
Hi Simon,
Quoted 3 lines · Simon Glass
Hi Quentin,
On Mon, 12 Aug 2024 at 02:58, Quentin Schulz <[email protected]>
Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 7 lines
Hi Simon,
Quoted 3 lines · Simon Glass
Hi Quentin,
On Tue, 6 Aug 2024 at 08:10, Quentin Schulz <[email protected]>
Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Hi Simon,
Quoted 1 line · Simon Glass
Use the log subsystem instead of dev, to avoid including function
names
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
in the code.
The
CONFIG_LOGF_FUNCoption can be used to enable the function name.Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
drivers/mmc/mmc.c | 49
++++++++++++++++++++++++-----------------------
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int
Quoted 7 lines
1 file changed, 25 insertions(+), 24 deletions(-)drivers/mmc/mmc.c +0
-0@@ -294,7 +294,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int
timeout_ms)
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int · line 295
Quoted 3 lines
drivers/mmc/mmc.c +0
-0if (status &MMC_STATUS_MASK ) { #if !defined(CONFIG_SPL_BUILD) ||
defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int timeout_ms) · line 297
Quoted 2 lines
drivers/mmc/mmc.c +1
-1-pr_err ("Status Error: 0x%08x\n" , status); +log_err ("Status Error: %08x\n" , status);Please don't remove the 0x prefix (will not comment on other patches
in
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
this series if it happens again, please check :) ).
OK...hex is the default though.
Can you please clarify what you meant by "it's the default though"?
Quoted 7 lines
Quoted 2 lines
U-Boot uses hex by default, so anything printed out or entered is normally in hex. There are a few exceptions, not all of them correct.
Gotcha. This actually has been painful to me and I've made the mistake a few times already, e.g. writing 256 blocks instead of 100 (100 aka
0x100instead of base10 100). Are you aware whether this is made explicit in the docs somewhere? So I could refer to it if I ever need to explain
stuff?
I believe it was in the old Denx manual. I found it in a Digi one [2]:
Numbers used by U-Boot are always considered to be in hexadecimal format.
Quoted 2 lines
For example, U-Boot
understands number 30100000 as0x30100000.
Perhaps we should add something like that to doc/usage?
Quoted 9 lines
Quoted 4 lines
I did send a series to allow decimal numbers but it has been deferred for a while now[1].
Interesting :)
Cheers,
Quentin
[2] https://hub.digi.com/dp/path=/support/asset/u-boot-reference-manual/
Re: [PATCH v2 06/14] mmc: Use logging instead of pr_err()
Hi Simon,
Quoted 71 lines · Simon Glass
Hi Quentin,
Quoted 7 lines · Quentin Schulz
Hi Simon,
Quoted 3 lines · Simon Glass
Hi Quentin,
On Mon, 12 Aug 2024 at 02:58, Quentin Schulz <[email protected]>
Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 7 lines
Hi Simon,
Quoted 3 lines · Simon Glass
Hi Quentin,
On Tue, 6 Aug 2024 at 08:10, Quentin Schulz <[email protected]>
Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Hi Simon,
Quoted 1 line · Simon Glass
Use the log subsystem instead of dev, to avoid including function
names
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
in the code.
The
CONFIG_LOGF_FUNCoption can be used to enable the function name.Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
drivers/mmc/mmc.c | 49++++++++++++++++++++++++-----------------------
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int
Quoted 7 lines
1 file changed, 25 insertions(+), 24 deletions(-)drivers/mmc/mmc.c +0
-0@@ -294,7 +294,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int
timeout_ms)Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int · line 295
Quoted 3 lines
drivers/mmc/mmc.c +0
-0if (status &MMC_STATUS_MASK ) { #if !defined(CONFIG_SPL_BUILD) ||
defined(CONFIG_SPL_LIBCOMMON_SUPPORT)Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int · line 296
Quoted 2 lines
drivers/mmc/mmc.c +1
-1-pr_err ("Status Error: 0x%08x\n" , status); +log_err ("Status Error: %08x\n" , status);Please don't remove the 0x prefix (will not comment on other patches
in
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
this series if it happens again, please check :) ).
OK...hex is the default though.
Can you please clarify what you meant by "it's the default though"?
Quoted 7 lines
Quoted 2 lines
U-Boot uses hex by default, so anything printed out or entered is normally in hex. There are a few exceptions, not all of them correct.
Gotcha. This actually has been painful to me and I've made the mistake a few times already, e.g. writing 256 blocks instead of 100 (100 aka
0x100instead of base10 100). Are you aware whether this is made explicit in the docs somewhere? So I could refer to it if I ever need to explainstuff?
Quoted 9 lines
I believe it was in the old Denx manual. I found it in a Digi one [2]:
Numbers used by U-Boot are always considered to be in hexadecimal format.
Quoted 2 lines
For example, U-Boot
understands number 30100000 as0x30100000.Perhaps we should add something like that to doc/usage?
Should have grepped in doc/ myself before asking others to do so for me :)
https://docs.u-boot.org/en/latest/usage/cmdline.html#representing-numbers documents this.
I would guess this is "good enough"? If not, not sure how to make this better? Hopefully, the commands that do not interpret as hex any string missing the 0x prefix have their help text specify this!
Cheers,
Quentin
Re: [PATCH v2 06/14] mmc: Use logging instead of pr_err()
Hi Quentin,
Quoted 82 lines · Quentin Schulz
Hi Simon,
Quoted 78 lines · Simon Glass
Hi Quentin,
Quoted 7 lines · Quentin Schulz
Hi Simon,
Quoted 3 lines · Simon Glass
Hi Quentin,
On Mon, 12 Aug 2024 at 02:58, Quentin Schulz <[email protected]>
Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 7 lines
Hi Simon,
Quoted 3 lines · Simon Glass
Hi Quentin,
On Tue, 6 Aug 2024 at 08:10, Quentin Schulz <[email protected]>
Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Hi Simon,
Quoted 1 line · Simon Glass
Use the log subsystem instead of dev, to avoid including function
names
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
in the code.
The
CONFIG_LOGF_FUNCoption can be used to enable the function name.Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>---
(no changes since v1)
drivers/mmc/mmc.c | 49++++++++++++++++++++++++-----------------------
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int
Quoted 7 lines
1 file changed, 25 insertions(+), 24 deletions(-)drivers/mmc/mmc.c +0
-0@@ -294,7 +294,7 @@ int mmc_poll_for_busy(struct mmc *mmc, int
timeout_ms)Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int · line 295
Quoted 3 lines
drivers/mmc/mmc.c +0
-0if (status &MMC_STATUS_MASK ) { #if !defined(CONFIG_SPL_BUILD) ||
defined(CONFIG_SPL_LIBCOMMON_SUPPORT)Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/mmc/mmc.c int mmc_poll_for_busy(struct mmc *mmc, int · line 296
Quoted 2 lines
drivers/mmc/mmc.c +1
-1-pr_err ("Status Error: 0x%08x\n" , status); +log_err ("Status Error: %08x\n" , status);Please don't remove the 0x prefix (will not comment on other patches
in
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
this series if it happens again, please check :) ).
OK...hex is the default though.
Can you please clarify what you meant by "it's the default though"?
Quoted 7 lines
Quoted 2 lines
U-Boot uses hex by default, so anything printed out or entered is normally in hex. There are a few exceptions, not all of them correct.
Gotcha. This actually has been painful to me and I've made the mistake a few times already, e.g. writing 256 blocks instead of 100 (100 aka
0x100instead of base10 100). Are you aware whether this is made explicit in the docs somewhere? So I could refer to it if I ever need to explainstuff?
I believe it was in the old Denx manual. I found it in a Digi one [2]:
Numbers used by U-Boot are always considered to be in hexadecimal format.
Quoted 2 lines
For example, U-Boot
understands number 30100000 as0x30100000.
Quoted 7 lines
Quoted 2 lines
Perhaps we should add something like that to doc/usage?
Should have grepped in doc/ myself before asking others to do so for me :)
https://docs.u-boot.org/en/latest/usage/cmdline.html#representing-numbers
documents this.
Ah, good spotting!
Quoted 3 lines
I would guess this is "good enough"? If not, not sure how to make this better? Hopefully, the commands that do not interpret as hex any string missing the 0x prefix have their help text specify this!
Yes, one hopes so. Tests can help with that too, so long as the numbers are larger than 9.
Regards,
SImon
PATCH v2 7/14 log: Avoid including function names by default
In reply to Simon GlassUnless function names are requested, the logging system should not compile these into the code. Adjust the macros to handle this.
This means that turning on function names at runtime won't work unless CONFIG_LOGF_FUNC is enabled. We could perhaps split this into a separate option if that is a problem.
Enable CONFIG_LOGF_FUNC logging for sandbox since the tests expect the function names to be included. Fix up the pinmux test which checks a logging statement.
---
Changes in v2:
- Update commit message to mention the runtime impact
- Leave assert() alone since it is only compiled in with LOG_DEBUG
common/log_console.c | 4 ++-- configs/sandbox_defconfig | 1 + include/log.h | 16 +++++++++++----- test/cmd/pinmux.c | 8 +++++++- test/log/log_test.c | 4 ++-- 5 files changed, 23 insertions(+), 10 deletions(-)
common/log_console.c +2 -2
@@ -38,10 +38,10 @@ static int log_console_emit(struct log_device *ldev, struct log_rec *rec)printf ("%d-" , rec->line);if (fmt &BIT (LOGF_FUNC )) {if (CONFIG_IS_ENABLED (USE_TINY_PRINTF )) { -printf ("%s()" , rec->func); +printf ("%s()" , rec->func ?:"?" ); }else {printf ("%*s()" ,CONFIG_LOGF_FUNC_PAD , - rec->func); + rec->func ?:"?" ); } } }
configs/sandbox_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_PRE_CONSOLE_BUFFER=y CONFIG_LOG=y CONFIG_LOG_MAX_LEVEL=9 CONFIG_LOG_DEFAULT_LEVEL=6 +CONFIG_LOGF_FUNC=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_STACKPROTECTOR=y CONFIG_CMD_CPU=y
include/log.h +11 -5
@@ -125,7 +125,7 @@ static inline int log_uc_cat(enum uclass_id id)* @level: Level of log record (indicating its severity) * @file: File name of file where log record was generated * @line: Line number in file where log record was generated -* @func: Function where log record was generated +* @func: Function where log record was generated, NULL if not known * @fmt: printf() format string for log record * @...: Optional parameters, according to the format string @fmt * Return: 0 if log record was emitted, -ve on error
@@ -141,7 +141,7 @@ int _log(enum log_category_t cat, enum log_level_t level, const char *file,* @level: Level of log record (indicating its severity) * @file: File name of file where log record was generated * @line: Line number in file where log record was generated -* @func: Function where log record was generated +* @func: Function where log record was generated, NULL if not known * @addr: Starting address to display at start of line * @data: pointer to data buffer * @width: data value width. May be 1, 2, or 4.
@@ -193,6 +193,12 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,#define _LOG_DEBUG 0#endif +#ifdef CONFIG_LOGF_FUNC +#define _log_func __func__ +#else +#define _log_func NULL +#endif +#if CONFIG_IS_ENABLED (LOG )/* Emit a log record if the level is less that the maximum */
@@ -201,7 +207,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,if (_LOG_DEBUG !=0 || _l <= _LOG_MAX_LEVEL) \_log ((enum log_category_t )(_cat), \ (enum log_level_t )(_l | _LOG_DEBUG), __FILE__, \ - __LINE__, __func__, \ + __LINE__, _log_func, \ pr_fmt(_fmt), ##_args); \ })
@@ -211,7 +217,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,if (_LOG_DEBUG !=0 || _l <= _LOG_MAX_LEVEL) \_log_buffer ((enum log_category_t )(_cat), \ (enum log_level_t )(_l | _LOG_DEBUG), __FILE__, \ - __LINE__, __func__, _addr, _data, \ + __LINE__, _log_func, _addr, _data, \ _width, _count, _linelen); \ })#else
@@ -314,7 +320,7 @@ void __assert_fail(const char *assertion, const char *file, unsigned int line,#define assert_noisy (x) \ ({ bool _val = (x); \ if (!_val) \ - __assert_fail(#x, "?", __LINE__, __func__); \ + __assert_fail(#x, "?", __LINE__, _log_func); \ _val; \ })
test/cmd/pinmux.c +7 -1
@@ -30,7 +30,13 @@ static int dm_test_cmd_pinmux_status_pinname(struct unit_test_state *uts)console_record_reset ();run_command ("pinmux status P9" ,0 ); -ut_assert_nextlinen ("single-pinctrl pinctrl-single-no-width: missing register width" ); +if (IS_ENABLED (CONFIG_LOGF_FUNC )) { +ut_assert_nextlinen ( +" single_of_to_plat() single-pinctrl pinctrl-single-no-width: missing register width" ); + }else { +ut_assert_nextlinen ( +"single-pinctrl pinctrl-single-no-width: missing register width" ); + }ut_assert_nextlinen ("P9 not found" );ut_assert_console_end ();
test/log/log_test.c +2 -2
@@ -452,8 +452,8 @@ int log_test_buffer(struct unit_test_state *uts)/* This one should product no output due to the debug level */ log_buffer (LOGC_BOOT ,LOGL_DEBUG ,0 , buf,1 ,0x12 ,0 ); -ut_assert_nextline ("00000000: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff ..\"3DUfw........" ); -ut_assert_nextline ("00000010: 10 00 .." ); +ut_assert_nextline (" log_test_buffer() 00000000: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff ..\"3DUfw........" ); +ut_assert_nextline (" log_test_buffer() 00000010: 10 00 .." );ut_assert_console_end ();free (buf);
Signature · 1 line
2.34.1
Re: [PATCH v2 07/14] log: Avoid including function names by default
Hi Simon,
Quoted 11 lines · Simon Glass
Unless function names are requested, the logging system should not compile these into the code. Adjust the macros to handle this.
This means that turning on function names at runtime won't work unless
CONFIG_LOGF_FUNCis enabled. We could perhaps split this into a separate option if that is a problem.Enable
CONFIG_LOGF_FUNClogging for sandbox since the tests expect the function names to be included. Fix up the pinmux test which checks a logging statement.
I now understand the statement in patches earlier in this series :)
Quoted 19 lines
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Update commit message to mention the runtime impact
- Leaveassert()alone since it is only compiled in withLOG_DEBUGcommon/log_console.c | 4 ++-- configs/sandbox_defconfig | 1 + include/log.h | 16 +++++++++++----- test/cmd/pinmux.c | 8 +++++++- test/log/log_test.c | 4 ++-- 5 files changed, 23 insertions(+), 10 deletions(-)common/log_console.c +0
-0
common/log_console.c static int log_console_emit(struct log_device *ldev, struct log_rec *rec) · line 41
Quoted 5 lines
common/log_console.c +1
-1@@ -38,10 +38,10 @@ static int log_console_emit(struct log_device *ldev, struct log_rec *rec)printf ("%d-" , rec->line);if (fmt &BIT (LOGF_FUNC )) {if (CONFIG_IS_ENABLED (USE_TINY_PRINTF )) { -printf ("%s()" , rec->func); +printf ("%s()" , rec->func ?:"?" );
What about setting _log_func to "?" if LOGF_FUNC isn't set?
common/log_console.c static int log_console_emit(struct log_device *ldev, struct log_rec *rec) · line 44
Quoted 4 lines
common/log_console.c +1
-1}else {printf ("%*s()" ,CONFIG_LOGF_FUNC_PAD , - rec->func); + rec->func ?:"?" );
I think you missed a similar change in common/log_syslog.c if I can trust my grep-fu?
Cheers,
Quentin
Re: [PATCH v2 07/14] log: Avoid including function names by default
Hi Quentin,
Quoted 32 lines · Quentin Schulz
Hi Simon,
Quoted 11 lines · Simon Glass
Unless function names are requested, the logging system should not compile these into the code. Adjust the macros to handle this.
This means that turning on function names at runtime won't work unless
CONFIG_LOGF_FUNCis enabled. We could perhaps split this into a separate option if that is a problem.Enable
CONFIG_LOGF_FUNClogging for sandbox since the tests expect the function names to be included. Fix up the pinmux test which checks a logging statement.I now understand the statement in patches earlier in this series :)
Quoted 14 lines
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Update commit message to mention the runtime impact
- Leaveassert()alone since it is only compiled in withLOG_DEBUGcommon/log_console.c | 4 ++-- configs/sandbox_defconfig | 1 + include/log.h | 16 +++++++++++----- test/cmd/pinmux.c | 8 +++++++- test/log/log_test.c | 4 ++-- 5 files changed, 23 insertions(+), 10 deletions(-)
Quoted 12 lines
common/log_console.c static int log_console_emit(struct log_device *ldev, struct log_rec *rec) · line 41
Quoted 10 lines
common/log_console.c +1
-1@@ -38,10 +38,10 @@ static int log_console_emit(struct log_device *ldev, struct log_rec *rec)printf ("%d-" , rec->line);if (fmt &BIT (LOGF_FUNC )) {if (CONFIG_IS_ENABLED (USE_TINY_PRINTF )) { -printf ("%s()" , rec->func); +printf ("%s()" , rec->func ?:"?" );What about setting
_log_functo "?" ifLOGF_FUNCisn't set?
That would require all call sites to pass a pointer to the string, rather than just NULL. I suspect it would increase code size?
Quoted 8 lines
common/log_console.c static int log_console_emit(struct log_device *ldev, struct log_rec *rec) · line 44
Quoted 5 lines
common/log_console.c +1
-1}else {printf ("%*s()" ,CONFIG_LOGF_FUNC_PAD , - rec->func); + rec->func ?:"?" );I think you missed a similar change in
common/log_syslog.cif I can trust my grep-fu?
Yes, thanks.
Regards,
Simon
Re: [PATCH v2 07/14] log: Avoid including function names by default
Hi Simon,
Quoted 48 lines · Simon Glass
Hi Quentin,
Quoted 32 lines · Quentin Schulz
Hi Simon,
Quoted 11 lines · Simon Glass
Unless function names are requested, the logging system should not compile these into the code. Adjust the macros to handle this.
This means that turning on function names at runtime won't work unless
CONFIG_LOGF_FUNCis enabled. We could perhaps split this into a separate option if that is a problem.Enable
CONFIG_LOGF_FUNClogging for sandbox since the tests expect the function names to be included. Fix up the pinmux test which checks a logging statement.I now understand the statement in patches earlier in this series :)
Quoted 14 lines
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Update commit message to mention the runtime impact
- Leaveassert()alone since it is only compiled in withLOG_DEBUGcommon/log_console.c | 4 ++-- configs/sandbox_defconfig | 1 + include/log.h | 16 +++++++++++----- test/cmd/pinmux.c | 8 +++++++- test/log/log_test.c | 4 ++-- 5 files changed, 23 insertions(+), 10 deletions(-)Quoted 12 lines
common/log_console.c static int log_console_emit(struct log_device *ldev, struct log_rec *rec) · line 41
Quoted 10 lines
common/log_console.c +1
-1@@ -38,10 +38,10 @@ static int log_console_emit(struct log_device *ldev, struct log_rec *rec)printf ("%d-" , rec->line);if (fmt &BIT (LOGF_FUNC )) {if (CONFIG_IS_ENABLED (USE_TINY_PRINTF )) { -printf ("%s()" , rec->func); +printf ("%s()" , rec->func ?:"?" );What about setting
_log_functo "?" ifLOGF_FUNCisn't set?
Quoted 3 lines
That would require all call sites to pass a pointer to the string, rather than just NULL. I suspect it would increase code size?
I probably missed something, but log_rec->func doesn't seem to be used in many places (common/log_console.c and common/log_syslog.c).
log_console_emit() is only called through log_dispatch() itself only called from _log().
_log is called from:
- cmd/log.c:do_log_rec(), the func parameter is provided by argv[5] which I assume cannot be NULL because argc<7 is checked.
- common/log.c:_log_buffer() which is called by log_buffer()
- include/log.h:log()/log_buffer() which is modified to swap __func__ with _log_func (so __func__ or <insert placeholder> which is NULL or "?" I suggested there). the rec->func argument cannot be changed from any of the caller.
So I assume we would be fine?
As for the size increase, I would hope that the compiler knows it can store the same string at only one place and then reuse it instead of having it in many places, but I know nothing about compilers so it's just me guessing :)
In any case, either is fine by me!
Cheers,
Quentin
Re: [PATCH v2 07/14] log: Avoid including function names by default
Hi Quentin,
Quoted 71 lines · Quentin Schulz
Hi Simon,
Quoted 48 lines · Simon Glass
Hi Quentin,
Quoted 32 lines · Quentin Schulz
Hi Simon,
Quoted 11 lines · Simon Glass
Unless function names are requested, the logging system should not compile these into the code. Adjust the macros to handle this.
This means that turning on function names at runtime won't work unless
CONFIG_LOGF_FUNCis enabled. We could perhaps split this into a separate option if that is a problem.Enable
CONFIG_LOGF_FUNClogging for sandbox since the tests expect the function names to be included. Fix up the pinmux test which checks a logging statement.I now understand the statement in patches earlier in this series :)
Quoted 14 lines
Signed-off-by Simon Glass <[email protected]>---
Changes in v2:
- Update commit message to mention the runtime impact
- Leaveassert()alone since it is only compiled in withLOG_DEBUGcommon/log_console.c | 4 ++-- configs/sandbox_defconfig | 1 + include/log.h | 16 +++++++++++----- test/cmd/pinmux.c | 8 +++++++- test/log/log_test.c | 4 ++-- 5 files changed, 23 insertions(+), 10 deletions(-)Quoted 12 lines
common/log_console.c static int log_console_emit(struct log_device *ldev, struct log_rec *rec) · line 41
Quoted 10 lines
common/log_console.c +1
-1@@ -38,10 +38,10 @@ static int log_console_emit(struct log_device *ldev, struct log_rec *rec)printf ("%d-" , rec->line);if (fmt &BIT (LOGF_FUNC )) {if (CONFIG_IS_ENABLED (USE_TINY_PRINTF )) { -printf ("%s()" , rec->func); +printf ("%s()" , rec->func ?:"?" );What about setting
_log_functo "?" ifLOGF_FUNCisn't set?Quoted 3 lines
That would require all call sites to pass a pointer to the string, rather than just NULL. I suspect it would increase code size?
I probably missed something, but
log_rec->funcdoesn't seem to be used in many places (common/log_console.candcommon/log_syslog.c).
log_console_emit()is only called throughlog_dispatch()itself only called from_log().
_logis called from:
- cmd/log.c:do_log_rec(), the func parameter is provided by argv[5] which I assume cannot be NULL because argc<7 is checked.
- common/log.c:_log_buffer() which is called bylog_buffer()
- include/log.h:log()/log_buffer() which is modified to swap__func__with_log_func(so__func__or <insert placeholder> which is NULL or "?" I suggested there). therec->funcargument cannot be changed from any of the caller.
Quoted 6 lines
So I assume we would be fine?
As for the size increase, I would hope that the compiler knows it can store the same string at only one place and then reuse it instead of having it in many places, but I know nothing about compilers so it's just me guessing :)
Just a note that I never got back to checking this. Common strings with the preprocessor end up with a single string in the object file, or at least they do in my experience. Since the function name is likely unique within U-Boot, this should be fine, as you say.
Outside a single compilation unit it can be a different story. I suspect (and hope) that LTO would deal with this OK, but otherwise I'm really not sure what would happen.
Quoted 2 lines
In any case, either is fine by me!
I suspect we may tweak this again, but this patch does resolve the code-size issue that bugged me.
Regards,
Simon
PATCH v2 8/14 spl: mmc: Drop checks for CONFIG_SPL_LIBCOMMON_SUPPORT
In reply to Simon GlassThis check is not needed now, since printf() resolved to nothing if not available. Drop the #ifdefs
---
(no changes since v1)
common/spl/spl_mmc.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-)
common/spl/spl_mmc.c +1 -19
@@ -51,9 +51,7 @@ int mmc_load_image_raw_sector(struct spl_image_info *spl_image, load.read = h_spl_load_read; ret =spl_load (spl_image, bootdev, &load,0 , sector << bd->log2blksz);if (ret) { -#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT puts ("mmc_load_image_raw_sector: mmc block read error\n" ); -#endif return -1 ; }
@@ -70,9 +68,7 @@ static int spl_mmc_get_device_index(u32 boot_device)return 1 ; } -#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf ("spl: unsupported mmc boot device.\n" ); -#endif return -ENODEV ; }
@@ -91,18 +87,14 @@ static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device) err =mmc_initialize (NULL );#endif /* DM_MMC */ if (err) { -#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf ("spl: could not initialize mmc. error: %d\n" , err); -#endif return err; } *mmcp =find_mmc_device (mmc_dev); err = *mmcp ?0 : -ENODEV ;if (err) { -#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf ("spl: could not find mmc device %d. error: %d\n" , mmc_dev, err); -#endif return err; }
@@ -135,10 +127,8 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, err =part_get_info (mmc_get_blk_desc (mmc), partition, &info);if (err) { -#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT puts ("spl: partition error\n" ); -#endif -return -1 ; +return -err; }#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
@@ -164,9 +154,7 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image,CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS , (void *)CONFIG_SPL_PAYLOAD_ARGS_ADDR);if (count !=CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS ) { -#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT puts ("mmc_load_image_raw_os: mmc block read error\n" ); -#endif return -1 ; }#endif /* CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR */
@@ -368,9 +356,7 @@ int spl_mmc_load(struct spl_image_info *spl_image, err =mmc_init (mmc);if (err) { mmc =NULL ; -#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf ("spl: mmc init failed with error: %d\n" , err); -#endif return err; } }
@@ -387,9 +373,7 @@ int spl_mmc_load(struct spl_image_info *spl_image, err =blk_dselect_hwpart (mmc_get_blk_desc (mmc), part);if (err) { -#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT puts ("spl: mmc partition switch failed\n" ); -#endif return err; }/* Fall through */
@@ -428,10 +412,8 @@ int spl_mmc_load(struct spl_image_info *spl_image,break ;#endif -#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT default :puts ("spl: mmc: wrong boot mode\n" ); -#endif }return err;
Signature · 1 line
2.34.1
Re: [PATCH v2 08/14] spl: mmc: Drop checks for CONFIG_SPL_LIBCOMMON_SUPPORT
Hi Simon,
Quoted 5 lines · Simon Glass
This check is not needed now, since
printf()resolved to nothing if not available. Drop the #ifdefsSigned-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>
Thanks!
Quentin
PATCH v2 9/14 spl: mmc: Handle error codes consistently
In reply to Simon GlassUse 'ret' as the return code, since it may not be an error and this is the common name in U-Boot. Make sure to return the error code when given, rather than transforming it into -1 (-EPERM).
---
Changes in v2:
- Update 'return ret' to 'return 0' when ret is known to be 0
common/spl/spl_mmc.c | 129 ++++++++++++++++++++++--------------------- 1 file changed, 65 insertions(+), 64 deletions(-)
common/spl/spl_mmc.c +65 -64
@@ -52,7 +52,7 @@ int mmc_load_image_raw_sector(struct spl_image_info *spl_image, ret =spl_load (spl_image, bootdev, &load,0 , sector << bd->log2blksz);if (ret) {puts ("mmc_load_image_raw_sector: mmc block read error\n" ); -return -1 ; +return ret; }return 0 ;
@@ -75,27 +75,27 @@ static int spl_mmc_get_device_index(u32 boot_device)static int spl_mmc_find_device (struct mmc **mmcp,u32 boot_device) { -int err, mmc_dev; +int ret, mmc_dev; mmc_dev =spl_mmc_get_device_index (boot_device);if (mmc_dev <0 )return mmc_dev;#if CONFIG_IS_ENABLED (DM_MMC ) - err =mmc_init_device (mmc_dev); + ret =mmc_init_device (mmc_dev);#else - err =mmc_initialize (NULL ); + ret =mmc_initialize (NULL );#endif /* DM_MMC */ -if (err) { -printf ("spl: could not initialize mmc. error: %d\n" , err); -return err; +if (ret) { +printf ("spl: could not initialize mmc. error: %d\n" , ret); +return ret; } *mmcp =find_mmc_device (mmc_dev); - err = *mmcp ?0 : -ENODEV ; -if (err) { + ret = *mmcp ?0 : -ENODEV ; +if (ret) {printf ("spl: could not find mmc device %d. error: %d\n" , - mmc_dev, err); -return err; + mmc_dev, ret); +return ret; }return 0 ;
@@ -108,14 +108,14 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, unsigned long sector) {struct disk_partition info; -int err; +int ret;#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE int type_part;/* Only support MBR so DOS_ENTRY_NUMBERS */ for (type_part =1 ; type_part <=DOS_ENTRY_NUMBERS ; type_part++) { - err =part_get_info (mmc_get_blk_desc (mmc), type_part, &info); -if (err) + ret =part_get_info (mmc_get_blk_desc (mmc), type_part, &info); +if (ret)continue ;if (info.sys_ind ==CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE ) {
@@ -125,10 +125,10 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, }#endif - err =part_get_info (mmc_get_blk_desc (mmc), partition, &info); -if (err) { + ret =part_get_info (mmc_get_blk_desc (mmc), partition, &info); +if (ret) {puts ("spl: partition error\n" ); -return -err; +return ret; }#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
@@ -155,7 +155,7 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image, (void *)CONFIG_SPL_PAYLOAD_ARGS_ADDR);if (count !=CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS ) {puts ("mmc_load_image_raw_os: mmc block read error\n" ); -return -1 ; +return -EIO ; }#endif /* CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR */
@@ -193,7 +193,7 @@ static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image,struct mmc *mmc, const char *filename) { - int err = -ENOSYS; + int ret = -ENOSYS;__maybe_unused int partition =CONFIG_SYS_MMCSD_FS_BOOT_PARTITION ;
@@ -202,8 +202,8 @@ static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image,struct disk_partition info;debug ("Checking for the first MBR bootable partition\n" );for (int type_part =1 ; type_part <=DOS_ENTRY_NUMBERS ; type_part++) { - err =part_get_info (mmc_get_blk_desc (mmc), type_part, &info); -if (err) + ret =part_get_info (mmc_get_blk_desc (mmc), type_part, &info); +if (ret)continue ;debug ("Partition %d is of type %d and bootable=%d\n" , type_part, info.sys_ind, info.bootable);if (info.bootable !=0 ) {
@@ -221,40 +221,40 @@ static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image,#ifdef CONFIG_SPL_FS_FAT if (!spl_start_uboot ()) { - err =spl_load_image_fat_os (spl_image, bootdev,mmc_get_blk_desc (mmc), - partition); -if (!err) -return err; + ret =spl_load_image_fat_os (spl_image, bootdev,mmc_get_blk_desc (mmc), + partition); +if (!ret) +return 0 ; }#ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME - err =spl_load_image_fat (spl_image, bootdev,mmc_get_blk_desc (mmc), + ret =spl_load_image_fat (spl_image, bootdev,mmc_get_blk_desc (mmc), partition, filename); -if (!err) -return err; +if (!ret) +return ret;#endif #endif #ifdef CONFIG_SPL_FS_EXT4 if (!spl_start_uboot ()) { - err =spl_load_image_ext_os (spl_image, bootdev,mmc_get_blk_desc (mmc), - partition); -if (!err) -return err; + ret =spl_load_image_ext_os (spl_image, bootdev,mmc_get_blk_desc (mmc), + partition); +if (!ret) +return 0 ; }#ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME - err =spl_load_image_ext (spl_image, bootdev,mmc_get_blk_desc (mmc), + ret =spl_load_image_ext (spl_image, bootdev,mmc_get_blk_desc (mmc), partition, filename); -if (!err) -return err; +if (!ret) +return 0 ;#endif #endif #if defined(CONFIG_SPL_FS_FAT ) || defined(CONFIG_SPL_FS_EXT4 ) - err = -ENOENT ; + ret = -ENOENT ;#endif - return err; + return ret; }#endif
@@ -342,73 +342,74 @@ int spl_mmc_load(struct spl_image_info *spl_image, unsigned long raw_sect) {u32 boot_mode; -int err =0 ; +int ret =0 ;__maybe_unused int part =0 ;int mmc_dev;/* Perform peripheral init only once for an mmc device */ mmc_dev =spl_mmc_get_device_index (bootdev->boot_device);if (!mmc ||spl_mmc_get_mmc_devnum (mmc) != mmc_dev) { - err =spl_mmc_find_device (&mmc, bootdev->boot_device); -if (err) -return err; + ret =spl_mmc_find_device (&mmc, bootdev->boot_device); +if (ret) +return ret; - err =mmc_init (mmc); -if (err) { + ret =mmc_init (mmc); +if (ret) { mmc =NULL ; -printf ("spl: mmc init failed with error: %d\n" , err); -return err; +printf ("spl: mmc init failed with error: %d\n" , ret); +return ret; } } boot_mode =spl_mmc_boot_mode (mmc, bootdev->boot_device); - err = -EINVAL ; + ret = -EINVAL ;switch (boot_mode) {case MMCSD_MODE_EMMCBOOT : part =spl_mmc_emmc_boot_partition (mmc);if (CONFIG_IS_ENABLED (MMC_TINY )) - err =mmc_switch_part (mmc, part); + ret =mmc_switch_part (mmc, part);else - err =blk_dselect_hwpart (mmc_get_blk_desc (mmc), part); + ret =blk_dselect_hwpart (mmc_get_blk_desc (mmc), part); -if (err) { +if (ret) {puts ("spl: mmc partition switch failed\n" ); -return err; +return ret; }/* Fall through */ case MMCSD_MODE_RAW :debug ("spl: mmc boot mode: raw\n" );if (!spl_start_uboot ()) { - err =mmc_load_image_raw_os (spl_image, bootdev, mmc); -if (!err) -return err; + ret =mmc_load_image_raw_os (spl_image, bootdev, mmc); +if (!ret) +return 0 ; } raw_sect =spl_mmc_get_uboot_raw_sector (mmc, raw_sect);#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION - err =mmc_load_image_raw_partition (spl_image, bootdev, + ret =mmc_load_image_raw_partition (spl_image, bootdev, mmc, raw_part, raw_sect); -if (!err) -return err; +if (!ret) +return 0 ;#endif #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR - err =mmc_load_image_raw_sector (spl_image, bootdev, mmc, - raw_sect +spl_mmc_raw_uboot_offset (part)); -if (!err) -return err; + ret =mmc_load_image_raw_sector (spl_image, bootdev, mmc, + raw_sect + +spl_mmc_raw_uboot_offset (part)); +if (!ret) +return 0 ;#endif /* If RAW mode fails, try FS mode. */ #ifdef CONFIG_SYS_MMCSD_FS_BOOT case MMCSD_MODE_FS :debug ("spl: mmc boot mode: fs\n" ); - err =spl_mmc_do_fs_boot (spl_image, bootdev, mmc, filename); -if (!err) -return err; + ret =spl_mmc_do_fs_boot (spl_image, bootdev, mmc, filename); +if (!ret) +return 0 ;break ;#endif
@@ -416,7 +417,7 @@ int spl_mmc_load(struct spl_image_info *spl_image,puts ("spl: mmc: wrong boot mode\n" ); } -return err; +return ret; } int spl_mmc_load_image(struct spl_image_info *spl_image,
Signature · 1 line
2.34.1
PATCH v2 10/14 spl: mmc: Adjust args of spl_mmc_find_device()
In reply to Simon GlassAt present spl_mmc_load() is the only caller of this function, passing it a boot_device, an index into the available MMC devices. Pass the device number instead, since it is known by the caller and simplifies the code.
---
Changes in v2:
- Use uint for arg to spl_mmc_get_device_index()
common/spl/spl_mmc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
common/spl/spl_mmc.c +4 -8
@@ -58,7 +58,7 @@ int mmc_load_image_raw_sector(struct spl_image_info *spl_image,return 0 ; } -static int spl_mmc_get_device_index (u32 boot_device) +static int spl_mmc_get_device_index (uint boot_device) {switch (boot_device) {case BOOT_DEVICE_MMC1 :
@@ -73,13 +73,9 @@ static int spl_mmc_get_device_index(u32 boot_device)return -ENODEV ; } -static int spl_mmc_find_device (struct mmc **mmcp,u32 boot_device) +static int spl_mmc_find_device (struct mmc **mmcp,int mmc_dev) { -int ret, mmc_dev; - - mmc_dev =spl_mmc_get_device_index (boot_device); -if (mmc_dev <0 ) -return mmc_dev; +int ret;#if CONFIG_IS_ENABLED (DM_MMC ) ret =mmc_init_device (mmc_dev);
@@ -349,7 +345,7 @@ int spl_mmc_load(struct spl_image_info *spl_image,/* Perform peripheral init only once for an mmc device */ mmc_dev =spl_mmc_get_device_index (bootdev->boot_device);if (!mmc ||spl_mmc_get_mmc_devnum (mmc) != mmc_dev) { - ret =spl_mmc_find_device (&mmc, bootdev->boot_device); + ret =spl_mmc_find_device (&mmc, mmc_dev);if (ret)return ret;
Signature · 1 line
2.34.1
Re: [PATCH v2 10/14] spl: mmc: Adjust args of spl_mmc_find_device()
Hi Simon,
Quoted 7 lines · Simon Glass
At present
spl_mmc_load()is the only caller of this function, passing it aboot_device, an index into the available MMC devices. Pass the device number instead, since it is known by the caller and simplifies the code.Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>
Thanks!
Quentin
PATCH v2 11/14 spl: mmc: Try to clean up raw-mode options
In reply to Simon GlassMake the raw-mode options depend on SPL_SYS_MMCSD_RAW_MODE in a more direct way. This makes it easier to understand the options with 'make menuconfig'.
There are three different ways of specifying the offset:
- sector offset
- partition number
- partition type
So make these a choice, so it is more obvious what is going on.
Update existing boards to enable SPL_SYS_MMCSD_RAW_MODE where needed.
---
(no changes since v1)
arch/arm/mach-imx/imx8m/soc.c | 2 + arch/arm/mach-imx/spl_imx_romapi.c | 13 ++++- .../imx8mp_rsb3720a1/imx8mp_rsb3720a1.c | 4 +- common/spl/Kconfig | 52 +++++++++++-------- configs/am335x_guardian_defconfig | 2 +- configs/am335x_pdu001_defconfig | 2 +- configs/am3517_evm_defconfig | 2 +- configs/am62ax_evm_a53_defconfig | 1 + configs/am62ax_evm_r5_defconfig | 1 + configs/am62px_evm_a53_defconfig | 1 + configs/am62px_evm_r5_defconfig | 1 + configs/am62x_beagleplay_a53_defconfig | 1 + configs/am62x_beagleplay_r5_defconfig | 1 + configs/am62x_evm_a53_defconfig | 1 + configs/am62x_evm_r5_defconfig | 1 + configs/am64x_evm_a53_defconfig | 1 + configs/am64x_evm_r5_defconfig | 1 + configs/am65x_evm_a53_defconfig | 1 + configs/am65x_evm_r5_defconfig | 1 + configs/brppt2_defconfig | 2 +- configs/brsmarc1_defconfig | 2 +- configs/cgtqmx8_defconfig | 1 + configs/chromebit_mickey_defconfig | 2 +- configs/chromebook_jerry_defconfig | 2 +- configs/chromebook_minnie_defconfig | 2 +- configs/chromebook_speedy_defconfig | 2 +- configs/ci20_mmc_defconfig | 1 + configs/da850evm_defconfig | 2 +- configs/da850evm_nand_defconfig | 2 +- configs/deneb_defconfig | 1 + configs/display5_defconfig | 2 +- configs/display5_factory_defconfig | 2 +- configs/draco-rastaban_defconfig | 2 +- configs/draco-thuban_defconfig | 2 +- .../gardena-smart-gateway-at91sam_defconfig | 2 +- configs/giedi_defconfig | 1 + configs/imx28_xea_defconfig | 1 + configs/imx28_xea_sb_defconfig | 1 + configs/imx6q_logic_defconfig | 2 +- configs/imx8mm-cl-iot-gate-optee_defconfig | 1 + configs/imx8mm-cl-iot-gate_defconfig | 1 + configs/imx8mm-icore-mx8mm-ctouch2_defconfig | 1 + configs/imx8mm-icore-mx8mm-edimm2.2_defconfig | 1 + configs/imx8mm-mx8menlo_defconfig | 1 + configs/imx8mm-phygate-tauri-l_defconfig | 1 + configs/imx8mm_beacon_defconfig | 1 + configs/imx8mm_beacon_fspi_defconfig | 1 + configs/imx8mm_data_modul_edm_sbc_defconfig | 1 + configs/imx8mm_evk_defconfig | 1 + configs/imx8mm_evk_fspi_defconfig | 1 + configs/imx8mm_phg_defconfig | 1 + configs/imx8mm_venice_defconfig | 1 + configs/imx8mn_beacon_2g_defconfig | 1 + configs/imx8mn_beacon_defconfig | 1 + configs/imx8mn_beacon_fspi_defconfig | 1 + configs/imx8mn_bsh_smm_s2_defconfig | 1 + configs/imx8mn_bsh_smm_s2pro_defconfig | 1 + configs/imx8mn_ddr4_evk_defconfig | 1 + configs/imx8mn_evk_defconfig | 1 + configs/imx8mn_var_som_defconfig | 1 + configs/imx8mn_venice_defconfig | 1 + configs/imx8mp-icore-mx8mp-edimm2.2_defconfig | 1 + configs/imx8mp_beacon_defconfig | 1 + configs/imx8mp_data_modul_edm_sbc_defconfig | 1 + configs/imx8mp_debix_model_a_defconfig | 1 + configs/imx8mp_dhcom_pdk2_defconfig | 1 + configs/imx8mp_dhcom_pdk3_defconfig | 1 + configs/imx8mp_evk_defconfig | 1 + configs/imx8mp_rsb3720a1_4G_defconfig | 2 + configs/imx8mp_rsb3720a1_6G_defconfig | 1 + configs/imx8mp_venice_defconfig | 1 + configs/imx8mq_cm_defconfig | 1 + configs/imx8mq_evk_defconfig | 1 + configs/imx8mq_phanbell_defconfig | 1 + configs/imx8mq_reform2_defconfig | 1 + configs/imx8qm_mek_defconfig | 1 + configs/imx8qxp_mek_defconfig | 1 + configs/imx8ulp_evk_defconfig | 1 + configs/imx93-phyboard-segin_defconfig | 1 + configs/imx93_11x11_evk_defconfig | 1 + configs/imx93_11x11_evk_ld_defconfig | 1 + configs/imx93_var_som_defconfig | 1 + configs/imxrt1020-evk_defconfig | 1 + configs/imxrt1050-evk_defconfig | 1 + configs/imxrt1050-evk_fspi_defconfig | 1 + configs/imxrt1170-evk_defconfig | 1 + configs/iot2050_defconfig | 1 + configs/j7200_evm_a72_defconfig | 1 + configs/j7200_evm_r5_defconfig | 1 + configs/j721e_beagleboneai64_a72_defconfig | 1 + configs/j721e_beagleboneai64_r5_defconfig | 1 + configs/j721e_evm_a72_defconfig | 1 + configs/j721e_evm_r5_defconfig | 1 + configs/j721s2_evm_a72_defconfig | 1 + configs/j721s2_evm_r5_defconfig | 1 + configs/j722s_evm_a53_defconfig | 1 + configs/j722s_evm_r5_defconfig | 1 + configs/j784s4_evm_a72_defconfig | 1 + configs/j784s4_evm_r5_defconfig | 1 + configs/kontron-sl-mx8mm_defconfig | 1 + configs/kontron_pitx_imx8m_defconfig | 1 + configs/kontron_sl28_defconfig | 1 + configs/librem5_defconfig | 1 + configs/ls1021aiot_sdcard_defconfig | 1 + configs/ls1021aqds_nand_defconfig | 1 + configs/ls1021aqds_sdcard_ifc_defconfig | 1 + configs/ls1021aqds_sdcard_qspi_defconfig | 1 + configs/ls1021atsn_sdcard_defconfig | 1 + ...s1021atwr_sdcard_ifc_SECURE_BOOT_defconfig | 1 + configs/ls1021atwr_sdcard_ifc_defconfig | 1 + configs/ls1021atwr_sdcard_qspi_defconfig | 1 + configs/msc_sm2s_imx8mp_defconfig | 1 + configs/omap35_logic_defconfig | 2 +- configs/omap35_logic_somlv_defconfig | 2 +- configs/omap3_logic_defconfig | 2 +- configs/omap3_logic_somlv_defconfig | 2 +- configs/phycore-imx8mm_defconfig | 1 + configs/phycore-imx8mp_defconfig | 1 + configs/phycore_am62x_a53_defconfig | 1 + configs/phycore_am62x_r5_defconfig | 1 + configs/phycore_am64x_a53_defconfig | 1 + configs/phycore_am64x_r5_defconfig | 1 + configs/pico-imx8mq_defconfig | 1 + configs/sama5d27_wlsom1_ek_mmc_defconfig | 2 +- .../sama5d27_wlsom1_ek_qspiflash_defconfig | 2 +- configs/sama5d2_icp_mmc_defconfig | 2 +- configs/sandbox_noinst_defconfig | 1 + configs/sniper_defconfig | 2 +- configs/socfpga_secu1_defconfig | 2 +- configs/verdin-am62_a53_defconfig | 1 + configs/verdin-am62_r5_defconfig | 1 + configs/verdin-imx8mm_defconfig | 1 + configs/verdin-imx8mp_defconfig | 1 + 133 files changed, 175 insertions(+), 52 deletions(-)
arch/arm/mach-imx/imx8m/soc.c +2 -0
@@ -735,6 +735,7 @@ int boot_mode_getprisec(void)#endif #if defined(CONFIG_IMX8MN ) || defined(CONFIG_IMX8MP ) +#ifdef SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION #define IMG_CNTN_SET1_OFFSET GENMASK(22, 19)unsigned long arch_spl_mmc_get_uboot_raw_sector (struct mmc *mmc,unsigned long raw_sect)
@@ -769,6 +770,7 @@ unsigned long arch_spl_mmc_get_uboot_raw_sector(struct mmc *mmc,return raw_sect; } +#endif /* SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION */ #endif bool is_usb_boot (void )
arch/arm/mach-imx/spl_imx_romapi.c +11 -2
@@ -33,8 +33,17 @@ ulong spl_romapi_raw_seekable_read(u32 offset, u32 size, void *buf)ulong __weak spl_romapi_get_uboot_base (u32 image_offset,u32 rom_bt_dev) { -return image_offset + - (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR *512 -0x8000 ); +u32 sector =0 ; + +/* +* Some boards use this value even though MMC is not enabled in SPL, for +* example imx8mn_bsh_smm_s2 +*/ +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR + sector =CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR ; +#endif + +return image_offset + sector *512 -0x8000 ; }static int is_boot_from_stream_device (u32 boot)
board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c +2 -2
@@ -190,7 +190,7 @@ int board_late_init(void)return 0 ; } -#ifdef CONFIG_SPL_MMC +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR #define UBOOT_RAW_SECTOR_OFFSET 0x40unsigned long board_spl_mmc_get_uboot_raw_sector (struct mmc *mmc,unsigned long raw_sector)
@@ -204,4 +204,4 @@ unsigned long board_spl_mmc_get_uboot_raw_sector(struct mmc *mmc, return CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR; } } -#endif /* CONFIG_SPL_MMC */ +#endif /* CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR */
common/spl/Kconfig +30 -22
87 lines not on this page · raw message
configs/am335x_guardian_defconfig +1 -1
@@ -34,7 +34,7 @@ CONFIG_ARCH_MISC_INIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_ETH=y CONFIG_SPL_I2C=y
configs/am335x_pdu001_defconfig +1 -1
@@ -26,7 +26,7 @@ CONFIG_BOOTCOMMAND="run eval_boot_device;part uuid mmc ${mmc_boot}:${root_fs_par CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_I2C=y # CONFIG_SPL_NAND_SUPPORT is not set CONFIG_SPL_POWER=y
configs/am3517_evm_defconfig +1 -1
@@ -25,7 +25,7 @@ CONFIG_SPL_MAX_SIZE=0xec00 CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set # CONFIG_SPL_FS_EXT4 is not set # CONFIG_SPL_I2C is not set CONFIG_SPL_MTD=y
configs/am62ax_evm_a53_defconfig +1 -0
@@ -30,6 +30,7 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_PAD_TO=0x0 CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
configs/am62ax_evm_r5_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_DMA=y
configs/am62px_evm_a53_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_PAD_TO=0x0 CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_DMA=y
configs/am62px_evm_r5_defconfig +1 -0
@@ -40,6 +40,7 @@ CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_DMA=y
configs/am62x_beagleplay_a53_defconfig +1 -0
@@ -40,6 +40,7 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
configs/am62x_beagleplay_r5_defconfig +1 -0
@@ -45,6 +45,7 @@ CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_DM_MAILBOX=y
configs/am62x_evm_a53_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
configs/am62x_evm_r5_defconfig +1 -0
@@ -47,6 +47,7 @@ CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_DM_MAILBOX=y
configs/am64x_evm_a53_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1800 CONFIG_SPL_DMA=y
configs/am64x_evm_r5_defconfig +1 -0
@@ -50,6 +50,7 @@ CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_DMA=y
configs/am65x_evm_a53_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_DMA=y
configs/am65x_evm_r5_defconfig +1 -0
@@ -46,6 +46,7 @@ CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_DMA=y
configs/brppt2_defconfig +1 -1
@@ -34,7 +34,7 @@ CONFIG_SYS_PBSIZE=532 CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC=y -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_I2C=y CONFIG_SPL_DM_SPI_FLASH=y CONFIG_SPL_SPI_LOAD=y
configs/brsmarc1_defconfig +1 -1
@@ -43,7 +43,7 @@ CONFIG_ARCH_MISC_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x500000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_I2C=y # CONFIG_SPL_NAND_SUPPORT is not set CONFIG_SPL_DM_SPI_FLASH=y
configs/cgtqmx8_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x120000 CONFIG_SPL_SYS_MALLOC_SIZE=0x3000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SYS_MMCSD_FS_BOOT_PARTITION=0
configs/chromebit_mickey_defconfig +1 -1
@@ -38,7 +38,7 @@ CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000 CONFIG_CMD_GPIO=y
configs/chromebook_jerry_defconfig +1 -1
@@ -37,7 +37,7 @@ CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000 CONFIG_CMD_GPIO=y
configs/chromebook_minnie_defconfig +1 -1
@@ -38,7 +38,7 @@ CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000 CONFIG_CMD_GPIO=y
configs/chromebook_speedy_defconfig +1 -1
@@ -38,7 +38,7 @@ CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_NO_BSS_LIMIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000 CONFIG_CMD_GPIO=y
configs/ci20_mmc_defconfig +1 -0
@@ -32,6 +32,7 @@ CONFIG_SYS_MALLOC_BOOTPARAMS=y CONFIG_SPL_MAX_SIZE=0x2e00 # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set # CONFIG_SPL_BANNER_PRINT is not set +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1c CONFIG_SPL_MMC_TINY=y
configs/da850evm_defconfig +1 -1
@@ -50,7 +50,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0xc0f70000 CONFIG_SPL_SYS_MALLOC_SIZE=0x110000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_DM_SPI_FLASH=y CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x8000
configs/da850evm_nand_defconfig +1 -1
@@ -46,7 +46,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0xc0f70000 CONFIG_SPL_SYS_MALLOC_SIZE=0x110000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y
configs/deneb_defconfig +1 -0
@@ -55,6 +55,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x120000 CONFIG_SPL_SYS_MALLOC_SIZE=0x3000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_POWER_DOMAIN=y
configs/display5_defconfig +1 -1
@@ -42,7 +42,7 @@ CONFIG_SYS_PBSIZE=2076 CONFIG_MISC_INIT_R=y CONFIG_SPL_BOOTCOUNT_LIMIT=y CONFIG_SPL_SYS_MALLOC=y -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_DMA=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_SAVEENV=y
configs/display5_factory_defconfig +1 -1
@@ -39,7 +39,7 @@ CONFIG_SYS_CBSIZE=2048 CONFIG_SYS_PBSIZE=2084 CONFIG_MISC_INIT_R=y CONFIG_SPL_SYS_MALLOC=y -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_DMA=y CONFIG_SPL_I2C=y CONFIG_SPL_OS_BOOT=y
configs/draco-rastaban_defconfig +1 -1
@@ -35,7 +35,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x80208000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_I2C=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y
configs/draco-thuban_defconfig +1 -1
@@ -35,7 +35,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x80208000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_I2C=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y
configs/gardena-smart-gateway-at91sam_defconfig +1 -1
@@ -46,7 +46,7 @@ CONFIG_SPL_SYS_MALLOC_SIMPLE=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_NAND_RAW_ONLY=y CONFIG_SPL_NAND_DRIVERS=y
configs/giedi_defconfig +1 -0
@@ -55,6 +55,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x120000 CONFIG_SPL_SYS_MALLOC_SIZE=0x3000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_POWER_DOMAIN=y
configs/imx28_xea_defconfig +1 -0
@@ -48,6 +48,7 @@ CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SYS_MALLOC_SIMPLE=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x0 CONFIG_SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG=y
configs/imx28_xea_sb_defconfig +1 -0
@@ -29,6 +29,7 @@ CONFIG_SPL_NO_BSS_LIMIT=y CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0 CONFIG_SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG=y
configs/imx6q_logic_defconfig +1 -1
@@ -30,7 +30,7 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_SPL_RAW_IMAGE_SUPPORT=y CONFIG_SPL_SYS_MALLOC=y -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_DMA=y CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot-dtb.img" CONFIG_SPL_I2C=y
configs/imx8mm-cl-iot-gate-optee_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mm-cl-iot-gate_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mm-icore-mx8mm-ctouch2_defconfig +1 -0
@@ -36,6 +36,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_POWER=y
configs/imx8mm-icore-mx8mm-edimm2.2_defconfig +1 -0
@@ -36,6 +36,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_POWER=y
configs/imx8mm-mx8menlo_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mm-phygate-tauri-l_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mm_beacon_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mm_beacon_fspi_defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mm_data_modul_edm_sbc_defconfig +1 -0
@@ -59,6 +59,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mm_evk_defconfig +1 -0
@@ -35,6 +35,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mm_evk_fspi_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mm_phg_defconfig +1 -0
@@ -36,6 +36,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mm_venice_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mn_beacon_2g_defconfig +1 -0
@@ -48,6 +48,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mn_beacon_defconfig +1 -0
@@ -47,6 +47,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mn_beacon_fspi_defconfig +1 -0
@@ -47,6 +47,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mn_bsh_smm_s2_defconfig +1 -0
@@ -42,6 +42,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_DMA=y
configs/imx8mn_bsh_smm_s2pro_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mn_ddr4_evk_defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mn_evk_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mn_var_som_defconfig +1 -0
@@ -46,6 +46,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mn_venice_defconfig +1 -0
@@ -46,6 +46,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mp-icore-mx8mp-edimm2.2_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mp_beacon_defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mp_data_modul_edm_sbc_defconfig +1 -0
@@ -66,6 +66,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x4c000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mp_debix_model_a_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_BOOTROM_SUPPORT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mp_dhcom_pdk2_defconfig +1 -0
@@ -64,6 +64,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x4c000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 # CONFIG_SPL_FIT_IMAGE_TINY is not set
configs/imx8mp_dhcom_pdk3_defconfig +1 -0
@@ -66,6 +66,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x4c000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 # CONFIG_SPL_FIT_IMAGE_TINY is not set
configs/imx8mp_evk_defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mp_rsb3720a1_4G_defconfig +2 -0
@@ -53,6 +53,8 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mp_rsb3720a1_6G_defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mp_venice_defconfig +1 -0
@@ -48,6 +48,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mq_cm_defconfig +1 -0
@@ -40,6 +40,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mq_evk_defconfig +1 -0
@@ -42,6 +42,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mq_phanbell_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8mq_reform2_defconfig +1 -0
@@ -45,6 +45,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/imx8qm_mek_defconfig +1 -0
@@ -48,6 +48,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x120000 CONFIG_SPL_SYS_MALLOC_SIZE=0x3000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_POWER_DOMAIN=y
configs/imx8qxp_mek_defconfig +1 -0
@@ -49,6 +49,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x120000 CONFIG_SPL_SYS_MALLOC_SIZE=0x3000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_POWER_DOMAIN=y
configs/imx8ulp_evk_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x22040000 CONFIG_SPL_SYS_MALLOC_SIZE=0x8000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_WATCHDOG=y
configs/imx93-phyboard-segin_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_BOOTROM_SUPPORT=y CONFIG_SPL_LOAD_IMX_CONTAINER=y CONFIG_IMX_CONTAINER_CFG="arch/arm/mach-imx/imx9/container.cfg" # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1040 CONFIG_SPL_I2C=y
configs/imx93_11x11_evk_defconfig +1 -0
@@ -42,6 +42,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x83200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1040 CONFIG_SPL_I2C=y
configs/imx93_11x11_evk_ld_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x83200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1040 CONFIG_SPL_I2C=y
configs/imx93_var_som_defconfig +1 -0
@@ -45,6 +45,7 @@ CONFIG_SPL_BOOTROM_SUPPORT=y CONFIG_SPL_LOAD_IMX_CONTAINER=y CONFIG_IMX_CONTAINER_CFG="arch/arm/mach-imx/imx9/container.cfg" # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1040 CONFIG_SPL_I2C=y
configs/imxrt1020-evk_defconfig +1 -0
@@ -31,6 +31,7 @@ CONFIG_SPL_NO_BSS_LIMIT=y CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x100 # CONFIG_BOOTM_NETBSD is not set
configs/imxrt1050-evk_defconfig +1 -0
@@ -35,6 +35,7 @@ CONFIG_SPL_NO_BSS_LIMIT=y CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x100 CONFIG_SPL_NOR_SUPPORT=y
configs/imxrt1050-evk_fspi_defconfig +1 -0
@@ -36,6 +36,7 @@ CONFIG_SPL_NO_BSS_LIMIT=y CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x100 CONFIG_SPL_NOR_SUPPORT=y
configs/imxrt1170-evk_defconfig +1 -0
@@ -31,6 +31,7 @@ CONFIG_SPL_NO_BSS_LIMIT=y CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x100 # CONFIG_BOOTM_NETBSD is not set
configs/iot2050_defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_DM_MAILBOX=y
configs/j7200_evm_a72_defconfig +1 -0
@@ -45,6 +45,7 @@ CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1800 CONFIG_SPL_DMA=y
configs/j7200_evm_r5_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 CONFIG_SPL_DMA=y
configs/j721e_beagleboneai64_a72_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_DMA=y
configs/j721e_beagleboneai64_r5_defconfig +1 -0
@@ -42,6 +42,7 @@ CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_DMA=y
configs/j721e_evm_a72_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_DMA=y
configs/j721e_evm_r5_defconfig +1 -0
@@ -49,6 +49,7 @@ CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_DMA=y
configs/j721s2_evm_a72_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_DMA=y
configs/j721s2_evm_r5_defconfig +1 -0
@@ -50,6 +50,7 @@ CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_DMA=y
configs/j722s_evm_a53_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_PAD_TO=0x0 CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_DMA=y
configs/j722s_evm_r5_defconfig +1 -0
@@ -40,6 +40,7 @@ CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_DMA=y
configs/j784s4_evm_a72_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_LOGLEVEL=7 CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_DMA=y
configs/j784s4_evm_r5_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_DMA=y
configs/kontron-sl-mx8mm_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/kontron_pitx_imx8m_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/kontron_sl28_defconfig +1 -0
@@ -51,6 +51,7 @@ CONFIG_SPL_MAX_SIZE=0x20000 CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_SYS_MALLOC=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x900 CONFIG_SPL_MPC8XXX_INIT_DDR=y
configs/librem5_defconfig +1 -0
@@ -46,6 +46,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/ls1021aiot_sdcard_defconfig +1 -0
@@ -49,6 +49,7 @@ CONFIG_SPL_FSL_PBL=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x82080000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8 CONFIG_SPL_ENV_SUPPORT=y
configs/ls1021aqds_nand_defconfig +1 -0
@@ -60,6 +60,7 @@ CONFIG_SPL_FSL_PBL=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x80200000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8 CONFIG_SPL_ENV_SUPPORT=y
configs/ls1021aqds_sdcard_ifc_defconfig +1 -0
@@ -59,6 +59,7 @@ CONFIG_SPL_FSL_PBL=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x820c0000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8 CONFIG_SPL_ENV_SUPPORT=y
configs/ls1021aqds_sdcard_qspi_defconfig +1 -0
@@ -58,6 +58,7 @@ CONFIG_SPL_FSL_PBL=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x820c0000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8 CONFIG_SPL_ENV_SUPPORT=y
configs/ls1021atsn_sdcard_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_SPL_FSL_PBL=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x82100000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8 CONFIG_SPL_ENV_SUPPORT=y
configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig +1 -0
@@ -60,6 +60,7 @@ CONFIG_SPL_FSL_PBL=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x82104000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8 CONFIG_SPL_ENV_SUPPORT=y
configs/ls1021atwr_sdcard_ifc_defconfig +1 -0
@@ -61,6 +61,7 @@ CONFIG_SPL_FSL_PBL=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x82100000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8 CONFIG_SPL_ENV_SUPPORT=y
configs/ls1021atwr_sdcard_qspi_defconfig +1 -0
@@ -62,6 +62,7 @@ CONFIG_SPL_FSL_PBL=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x82100000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8 CONFIG_SPL_ENV_SUPPORT=y
configs/msc_sm2s_imx8mp_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/omap35_logic_defconfig +1 -1
@@ -28,7 +28,7 @@ CONFIG_SPL_MAX_SIZE=0xec00 CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set # CONFIG_SPL_FS_EXT4 is not set # CONFIG_SPL_I2C is not set CONFIG_SPL_MTD=y
configs/omap35_logic_somlv_defconfig +1 -1
@@ -29,7 +29,7 @@ CONFIG_SPL_MAX_SIZE=0xec00 CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set # CONFIG_SPL_FS_EXT4 is not set # CONFIG_SPL_I2C is not set CONFIG_SPL_MTD=y
configs/omap3_logic_defconfig +1 -1
@@ -27,7 +27,7 @@ CONFIG_SPL_MAX_SIZE=0xec00 CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set # CONFIG_SPL_FS_EXT4 is not set # CONFIG_SPL_I2C is not set CONFIG_SPL_MTD=y
configs/omap3_logic_somlv_defconfig +1 -1
@@ -29,7 +29,7 @@ CONFIG_SPL_MAX_SIZE=0xec00 CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set # CONFIG_SPL_FS_EXT4 is not set # CONFIG_SPL_I2C is not set CONFIG_SPL_MTD=y
configs/phycore-imx8mm_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/phycore-imx8mp_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 # CONFIG_SPL_CRYPTO is not set
configs/phycore_am62x_a53_defconfig +1 -0
@@ -47,6 +47,7 @@ CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_ENV_SUPPORT=y
configs/phycore_am62x_r5_defconfig +1 -0
@@ -48,6 +48,7 @@ CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_I2C=y
configs/phycore_am64x_a53_defconfig +1 -0
@@ -45,6 +45,7 @@ CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_DMA=y
configs/phycore_am64x_r5_defconfig +1 -0
@@ -49,6 +49,7 @@ CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_DMA=y
configs/pico-imx8mq_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/sama5d27_wlsom1_ek_mmc_defconfig +1 -1
@@ -48,7 +48,7 @@ CONFIG_SPL_MAX_SIZE=0x10000 CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 CONFIG_SPL_DISPLAY_PRINT=y -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_AT91_MCK_BYPASS=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y
configs/sama5d27_wlsom1_ek_qspiflash_defconfig +1 -1
@@ -48,7 +48,7 @@ CONFIG_SPL_MAX_SIZE=0x10000 CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 CONFIG_SPL_DISPLAY_PRINT=y -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_DM_SPI_FLASH=y CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000
configs/sama5d2_icp_mmc_defconfig +1 -1
@@ -49,7 +49,7 @@ CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 CONFIG_SPL_DISPLAY_PRINT=y -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SPL_RAM_SUPPORT=y CONFIG_SPL_RAM_DEVICE=y CONFIG_SPL_AT91_MCK_BYPASS=y
configs/sandbox_noinst_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0xa000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x4000000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x0 CONFIG_SPL_ENV_SUPPORT=y
configs/sniper_defconfig +1 -1
@@ -22,7 +22,7 @@ CONFIG_SPL_MAX_SIZE=0xec00 CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x80208000 -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=2 # CONFIG_SPL_FS_EXT4 is not set
configs/socfpga_secu1_defconfig +1 -1
@@ -42,7 +42,7 @@ CONFIG_SPL_PAD_TO=0x10000 CONFIG_SPL_NO_BSS_LIMIT=y CONFIG_SPL_LEGACY_IMAGE_CRC_CHECK=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set +# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=0x1 # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE is not set CONFIG_SPL_MTD=y
configs/verdin-am62_a53_defconfig +1 -0
@@ -51,6 +51,7 @@ CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 CONFIG_SPL_DMA=y
configs/verdin-am62_r5_defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x84000000 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 CONFIG_SPL_ENV_SUPPORT=y
configs/verdin-imx8mm_defconfig +1 -0
@@ -47,6 +47,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
configs/verdin-imx8mp_defconfig +1 -0
@@ -60,6 +60,7 @@ CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 CONFIG_SPL_I2C=y
Signature · 1 line
2.34.1
Re: [PATCH v2 11/14] spl: mmc: Try to clean up raw-mode options
Hi Simon,
Quoted 224 lines · Simon Glass
Make the raw-mode options depend on
SPL_SYS_MMCSD_RAW_MODEin a more direct way. This makes it easier to understand the options with 'make menuconfig'.There are three different ways of specifying the offset:
- sector offset
- partition number
- partition typeSo make these a choice, so it is more obvious what is going on.
Update existing boards to enable
SPL_SYS_MMCSD_RAW_MODEwhere needed.Reviewed-by Sean Anderson <[email protected]>Signed-off-by Simon Glass <[email protected]>---
(no changes since v1)
arch/arm/mach-imx/imx8m/soc.c | 2 + arch/arm/mach-imx/spl_imx_romapi.c | 13 ++++- .../imx8mp_rsb3720a1/imx8mp_rsb3720a1.c | 4 +- common/spl/Kconfig | 52 +++++++++++-------- configs/am335x_guardian_defconfig | 2 +- configs/am335x_pdu001_defconfig | 2 +- configs/am3517_evm_defconfig | 2 +- configs/am62ax_evm_a53_defconfig | 1 + configs/am62ax_evm_r5_defconfig | 1 + configs/am62px_evm_a53_defconfig | 1 + configs/am62px_evm_r5_defconfig | 1 + configs/am62x_beagleplay_a53_defconfig | 1 + configs/am62x_beagleplay_r5_defconfig | 1 + configs/am62x_evm_a53_defconfig | 1 + configs/am62x_evm_r5_defconfig | 1 + configs/am64x_evm_a53_defconfig | 1 + configs/am64x_evm_r5_defconfig | 1 + configs/am65x_evm_a53_defconfig | 1 + configs/am65x_evm_r5_defconfig | 1 + configs/brppt2_defconfig | 2 +- configs/brsmarc1_defconfig | 2 +- configs/cgtqmx8_defconfig | 1 + configs/chromebit_mickey_defconfig | 2 +- configs/chromebook_jerry_defconfig | 2 +- configs/chromebook_minnie_defconfig | 2 +- configs/chromebook_speedy_defconfig | 2 +- configs/ci20_mmc_defconfig | 1 + configs/da850evm_defconfig | 2 +- configs/da850evm_nand_defconfig | 2 +- configs/deneb_defconfig | 1 + configs/display5_defconfig | 2 +- configs/display5_factory_defconfig | 2 +- configs/draco-rastaban_defconfig | 2 +- configs/draco-thuban_defconfig | 2 +- .../gardena-smart-gateway-at91sam_defconfig | 2 +- configs/giedi_defconfig | 1 + configs/imx28_xea_defconfig | 1 + configs/imx28_xea_sb_defconfig | 1 + configs/imx6q_logic_defconfig | 2 +- configs/imx8mm-cl-iot-gate-optee_defconfig | 1 + configs/imx8mm-cl-iot-gate_defconfig | 1 + configs/imx8mm-icore-mx8mm-ctouch2_defconfig | 1 + configs/imx8mm-icore-mx8mm-edimm2.2_defconfig | 1 + configs/imx8mm-mx8menlo_defconfig | 1 + configs/imx8mm-phygate-tauri-l_defconfig | 1 + configs/imx8mm_beacon_defconfig | 1 + configs/imx8mm_beacon_fspi_defconfig | 1 + configs/imx8mm_data_modul_edm_sbc_defconfig | 1 + configs/imx8mm_evk_defconfig | 1 + configs/imx8mm_evk_fspi_defconfig | 1 + configs/imx8mm_phg_defconfig | 1 + configs/imx8mm_venice_defconfig | 1 + configs/imx8mn_beacon_2g_defconfig | 1 + configs/imx8mn_beacon_defconfig | 1 + configs/imx8mn_beacon_fspi_defconfig | 1 + configs/imx8mn_bsh_smm_s2_defconfig | 1 + configs/imx8mn_bsh_smm_s2pro_defconfig | 1 + configs/imx8mn_ddr4_evk_defconfig | 1 + configs/imx8mn_evk_defconfig | 1 + configs/imx8mn_var_som_defconfig | 1 + configs/imx8mn_venice_defconfig | 1 + configs/imx8mp-icore-mx8mp-edimm2.2_defconfig | 1 + configs/imx8mp_beacon_defconfig | 1 + configs/imx8mp_data_modul_edm_sbc_defconfig | 1 + configs/imx8mp_debix_model_a_defconfig | 1 + configs/imx8mp_dhcom_pdk2_defconfig | 1 + configs/imx8mp_dhcom_pdk3_defconfig | 1 + configs/imx8mp_evk_defconfig | 1 + configs/imx8mp_rsb3720a1_4G_defconfig | 2 + configs/imx8mp_rsb3720a1_6G_defconfig | 1 + configs/imx8mp_venice_defconfig | 1 + configs/imx8mq_cm_defconfig | 1 + configs/imx8mq_evk_defconfig | 1 + configs/imx8mq_phanbell_defconfig | 1 + configs/imx8mq_reform2_defconfig | 1 + configs/imx8qm_mek_defconfig | 1 + configs/imx8qxp_mek_defconfig | 1 + configs/imx8ulp_evk_defconfig | 1 + configs/imx93-phyboard-segin_defconfig | 1 + configs/imx93_11x11_evk_defconfig | 1 + configs/imx93_11x11_evk_ld_defconfig | 1 + configs/imx93_var_som_defconfig | 1 + configs/imxrt1020-evk_defconfig | 1 + configs/imxrt1050-evk_defconfig | 1 + configs/imxrt1050-evk_fspi_defconfig | 1 + configs/imxrt1170-evk_defconfig | 1 + configs/iot2050_defconfig | 1 + configs/j7200_evm_a72_defconfig | 1 + configs/j7200_evm_r5_defconfig | 1 + configs/j721e_beagleboneai64_a72_defconfig | 1 + configs/j721e_beagleboneai64_r5_defconfig | 1 + configs/j721e_evm_a72_defconfig | 1 + configs/j721e_evm_r5_defconfig | 1 + configs/j721s2_evm_a72_defconfig | 1 + configs/j721s2_evm_r5_defconfig | 1 + configs/j722s_evm_a53_defconfig | 1 + configs/j722s_evm_r5_defconfig | 1 + configs/j784s4_evm_a72_defconfig | 1 + configs/j784s4_evm_r5_defconfig | 1 + configs/kontron-sl-mx8mm_defconfig | 1 + configs/kontron_pitx_imx8m_defconfig | 1 + configs/kontron_sl28_defconfig | 1 + configs/librem5_defconfig | 1 + configs/ls1021aiot_sdcard_defconfig | 1 + configs/ls1021aqds_nand_defconfig | 1 + configs/ls1021aqds_sdcard_ifc_defconfig | 1 + configs/ls1021aqds_sdcard_qspi_defconfig | 1 + configs/ls1021atsn_sdcard_defconfig | 1 + ...s1021atwr_sdcard_ifc_SECURE_BOOT_defconfig | 1 + configs/ls1021atwr_sdcard_ifc_defconfig | 1 + configs/ls1021atwr_sdcard_qspi_defconfig | 1 + configs/msc_sm2s_imx8mp_defconfig | 1 + configs/omap35_logic_defconfig | 2 +- configs/omap35_logic_somlv_defconfig | 2 +- configs/omap3_logic_defconfig | 2 +- configs/omap3_logic_somlv_defconfig | 2 +- configs/phycore-imx8mm_defconfig | 1 + configs/phycore-imx8mp_defconfig | 1 + configs/phycore_am62x_a53_defconfig | 1 + configs/phycore_am62x_r5_defconfig | 1 + configs/phycore_am64x_a53_defconfig | 1 + configs/phycore_am64x_r5_defconfig | 1 + configs/pico-imx8mq_defconfig | 1 + configs/sama5d27_wlsom1_ek_mmc_defconfig | 2 +- .../sama5d27_wlsom1_ek_qspiflash_defconfig | 2 +- configs/sama5d2_icp_mmc_defconfig | 2 +- configs/sandbox_noinst_defconfig | 1 + configs/sniper_defconfig | 2 +- configs/socfpga_secu1_defconfig | 2 +- configs/verdin-am62_a53_defconfig | 1 + configs/verdin-am62_r5_defconfig | 1 + configs/verdin-imx8mm_defconfig | 1 + configs/verdin-imx8mp_defconfig | 1 + 133 files changed, 175 insertions(+), 52 deletions(-)arch/arm/mach-imx/imx8m/soc.c +2
-0@@ -735,6 +735,7 @@ int boot_mode_getprisec(void)#endif #if defined(CONFIG_IMX8MN ) || defined(CONFIG_IMX8MP ) +#ifdef SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION #define IMG_CNTN_SET1_OFFSET GENMASK(22, 19)unsigned long arch_spl_mmc_get_uboot_raw_sector (struct mmc *mmc,unsigned long raw_sect)@@ -769,6 +770,7 @@ unsigned long arch_spl_mmc_get_uboot_raw_sector(struct mmc *mmc,return raw_sect; } +#endif /* SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION */ #endif bool is_usb_boot (void )arch/arm/mach-imx/spl_imx_romapi.c +11
-2@@ -33,8 +33,17 @@ ulong spl_romapi_raw_seekable_read(u32 offset, u32 size, void *buf)ulong __weak spl_romapi_get_uboot_base (u32 image_offset,u32 rom_bt_dev) { -return image_offset + - (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR *512 -0x8000 ); +u32 sector =0 ; + +/* +* Some boards use this value even though MMC is not enabled in SPL, for +* example imx8mn_bsh_smm_s2 +*/ +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR + sector =CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR ; +#endif + +return image_offset + sector *512 -0x8000 ; }static int is_boot_from_stream_device (u32 boot)board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c +2
-2@@ -190,7 +190,7 @@ int board_late_init(void)return 0 ; } -#ifdef CONFIG_SPL_MMC +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR #define UBOOT_RAW_SECTOR_OFFSET 0x40unsigned long board_spl_mmc_get_uboot_raw_sector (struct mmc *mmc,unsigned long raw_sector)@@ -204,4 +204,4 @@ unsigned long board_spl_mmc_get_uboot_raw_sector(struct mmc *mmc, return CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR; } } -#endif /* CONFIG_SPL_MMC */ +#endif /* CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR */ common/spl/Kconfig +0
-0@@ -490,24 +490,45 @@ config SPL_DISPLAY_PRINT the board.
common/spl/Kconfig config SPL_DISPLAY_PRINT · line 494
Quoted 10 lines
common/spl/Kconfig +2
-6config SPL_SYS_MMCSD_RAW_MODE - bool - help - Support booting from an MMC without a filesystem. - -config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR - bool "MMC raw mode: by sector" + bool "Use raw reads to locate the next boot phase" + depends on SPL_DM_MMC || SPL_MMC
This one is a weird one to me, we can have DM_MMC without MMC? Shouldn't we fix it?
Quoted 7 lines
common/spl/Kconfig +1
-0default y if ARCH_SUNXI || ARCH_DAVINCI || ARCH_UNIPHIER || \ ARCH_MX6 || ARCH_MX7 || \ ARCH_ROCKCHIP || ARCH_MVEBU || ARCH_SOCFPGA || \ ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \ OMAP44XX || OMAP54XX || AM33XX || AM43XX || \ TARGET_SIFIVE_UNLEASHED || TARGET_SIFIVE_UNMATCHED + help
common/spl/Kconfig config SPL_DISPLAY_PRINT · line 511
Quoted 10 lines
common/spl/Kconfig +9
-0+ Support booting from an MMC without a filesystem. + +if SPL_SYS_MMCSD_RAW_MODE + +choice + prompt "Method for locating next phase of boot (e.g. U-Boot)" + +config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR + bool "MMC raw mode: by sector" select SPL_LOAD_BLOCK if SPL_MMC
We can remove the if SPL_MMC here as SPL_SYS_MMCSD_RAW_MODE already depends on it and this choice is guarded by it.
common/spl/Kconfig config SPL_DISPLAY_PRINT · line 517
Quoted 7 lines
common/spl/Kconfig +2
-1- select SPL_SYS_MMCSD_RAW_MODE if SPL_MMC help Use sector number for specifying U-Boot location on MMC/SD in raw mode. +config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION + bool "MMC Raw mode: by partition"
Lower case "raw" here to match the two other choices?
common/spl/Kconfig config SPL_DISPLAY_PRINT · line 518
Quoted 1 line
common/spl/Kconfig +1
-0+ select SPL_LOAD_BLOCK if SPL_MMC
Ditto wrt SPL_MMC that I brought up earlier.
common/spl/Kconfig config SPL_DISPLAY_PRINT · line 524
Quoted 6 lines
common/spl/Kconfig +6
-0+ help + Use a partition for loading U-Boot when using MMC/SD in raw mode. + +config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE + bool "MMC raw mode: by partition type" + depends on DOS_PARTITION && SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
This can never be met, as SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION is another option in the same choice.
Cheers,
Quentin
Re: [PATCH v2 11/14] spl: mmc: Try to clean up raw-mode options
Hi Quentin,
Quoted 229 lines · Quentin Schulz
Hi Simon,
Quoted 225 lines · Simon Glass
Make the raw-mode options depend on
SPL_SYS_MMCSD_RAW_MODEin a more direct way. This makes it easier to understand the options with 'make menuconfig'.There are three different ways of specifying the offset:
- sector offset
- partition number
- partition typeSo make these a choice, so it is more obvious what is going on.
Update existing boards to enable
SPL_SYS_MMCSD_RAW_MODEwhere needed.Reviewed-by Sean Anderson <[email protected]>Signed-off-by Simon Glass <[email protected]>---
(no changes since v1)
arch/arm/mach-imx/imx8m/soc.c | 2 + arch/arm/mach-imx/spl_imx_romapi.c | 13 ++++- .../imx8mp_rsb3720a1/imx8mp_rsb3720a1.c | 4 +- common/spl/Kconfig | 52 +++++++++++-------- configs/am335x_guardian_defconfig | 2 +- configs/am335x_pdu001_defconfig | 2 +- configs/am3517_evm_defconfig | 2 +- configs/am62ax_evm_a53_defconfig | 1 + configs/am62ax_evm_r5_defconfig | 1 + configs/am62px_evm_a53_defconfig | 1 + configs/am62px_evm_r5_defconfig | 1 + configs/am62x_beagleplay_a53_defconfig | 1 + configs/am62x_beagleplay_r5_defconfig | 1 + configs/am62x_evm_a53_defconfig | 1 + configs/am62x_evm_r5_defconfig | 1 + configs/am64x_evm_a53_defconfig | 1 + configs/am64x_evm_r5_defconfig | 1 + configs/am65x_evm_a53_defconfig | 1 + configs/am65x_evm_r5_defconfig | 1 + configs/brppt2_defconfig | 2 +- configs/brsmarc1_defconfig | 2 +- configs/cgtqmx8_defconfig | 1 + configs/chromebit_mickey_defconfig | 2 +- configs/chromebook_jerry_defconfig | 2 +- configs/chromebook_minnie_defconfig | 2 +- configs/chromebook_speedy_defconfig | 2 +- configs/ci20_mmc_defconfig | 1 + configs/da850evm_defconfig | 2 +- configs/da850evm_nand_defconfig | 2 +- configs/deneb_defconfig | 1 + configs/display5_defconfig | 2 +- configs/display5_factory_defconfig | 2 +- configs/draco-rastaban_defconfig | 2 +- configs/draco-thuban_defconfig | 2 +- .../gardena-smart-gateway-at91sam_defconfig | 2 +- configs/giedi_defconfig | 1 + configs/imx28_xea_defconfig | 1 + configs/imx28_xea_sb_defconfig | 1 + configs/imx6q_logic_defconfig | 2 +- configs/imx8mm-cl-iot-gate-optee_defconfig | 1 + configs/imx8mm-cl-iot-gate_defconfig | 1 + configs/imx8mm-icore-mx8mm-ctouch2_defconfig | 1 + configs/imx8mm-icore-mx8mm-edimm2.2_defconfig | 1 + configs/imx8mm-mx8menlo_defconfig | 1 + configs/imx8mm-phygate-tauri-l_defconfig | 1 + configs/imx8mm_beacon_defconfig | 1 + configs/imx8mm_beacon_fspi_defconfig | 1 + configs/imx8mm_data_modul_edm_sbc_defconfig | 1 + configs/imx8mm_evk_defconfig | 1 + configs/imx8mm_evk_fspi_defconfig | 1 + configs/imx8mm_phg_defconfig | 1 + configs/imx8mm_venice_defconfig | 1 + configs/imx8mn_beacon_2g_defconfig | 1 + configs/imx8mn_beacon_defconfig | 1 + configs/imx8mn_beacon_fspi_defconfig | 1 + configs/imx8mn_bsh_smm_s2_defconfig | 1 + configs/imx8mn_bsh_smm_s2pro_defconfig | 1 + configs/imx8mn_ddr4_evk_defconfig | 1 + configs/imx8mn_evk_defconfig | 1 + configs/imx8mn_var_som_defconfig | 1 + configs/imx8mn_venice_defconfig | 1 + configs/imx8mp-icore-mx8mp-edimm2.2_defconfig | 1 + configs/imx8mp_beacon_defconfig | 1 + configs/imx8mp_data_modul_edm_sbc_defconfig | 1 + configs/imx8mp_debix_model_a_defconfig | 1 + configs/imx8mp_dhcom_pdk2_defconfig | 1 + configs/imx8mp_dhcom_pdk3_defconfig | 1 + configs/imx8mp_evk_defconfig | 1 + configs/imx8mp_rsb3720a1_4G_defconfig | 2 + configs/imx8mp_rsb3720a1_6G_defconfig | 1 + configs/imx8mp_venice_defconfig | 1 + configs/imx8mq_cm_defconfig | 1 + configs/imx8mq_evk_defconfig | 1 + configs/imx8mq_phanbell_defconfig | 1 + configs/imx8mq_reform2_defconfig | 1 + configs/imx8qm_mek_defconfig | 1 + configs/imx8qxp_mek_defconfig | 1 + configs/imx8ulp_evk_defconfig | 1 + configs/imx93-phyboard-segin_defconfig | 1 + configs/imx93_11x11_evk_defconfig | 1 + configs/imx93_11x11_evk_ld_defconfig | 1 + configs/imx93_var_som_defconfig | 1 + configs/imxrt1020-evk_defconfig | 1 + configs/imxrt1050-evk_defconfig | 1 + configs/imxrt1050-evk_fspi_defconfig | 1 + configs/imxrt1170-evk_defconfig | 1 + configs/iot2050_defconfig | 1 + configs/j7200_evm_a72_defconfig | 1 + configs/j7200_evm_r5_defconfig | 1 + configs/j721e_beagleboneai64_a72_defconfig | 1 + configs/j721e_beagleboneai64_r5_defconfig | 1 + configs/j721e_evm_a72_defconfig | 1 + configs/j721e_evm_r5_defconfig | 1 + configs/j721s2_evm_a72_defconfig | 1 + configs/j721s2_evm_r5_defconfig | 1 + configs/j722s_evm_a53_defconfig | 1 + configs/j722s_evm_r5_defconfig | 1 + configs/j784s4_evm_a72_defconfig | 1 + configs/j784s4_evm_r5_defconfig | 1 + configs/kontron-sl-mx8mm_defconfig | 1 + configs/kontron_pitx_imx8m_defconfig | 1 + configs/kontron_sl28_defconfig | 1 + configs/librem5_defconfig | 1 + configs/ls1021aiot_sdcard_defconfig | 1 + configs/ls1021aqds_nand_defconfig | 1 + configs/ls1021aqds_sdcard_ifc_defconfig | 1 + configs/ls1021aqds_sdcard_qspi_defconfig | 1 + configs/ls1021atsn_sdcard_defconfig | 1 + ...s1021atwr_sdcard_ifc_SECURE_BOOT_defconfig | 1 + configs/ls1021atwr_sdcard_ifc_defconfig | 1 + configs/ls1021atwr_sdcard_qspi_defconfig | 1 + configs/msc_sm2s_imx8mp_defconfig | 1 + configs/omap35_logic_defconfig | 2 +- configs/omap35_logic_somlv_defconfig | 2 +- configs/omap3_logic_defconfig | 2 +- configs/omap3_logic_somlv_defconfig | 2 +- configs/phycore-imx8mm_defconfig | 1 + configs/phycore-imx8mp_defconfig | 1 + configs/phycore_am62x_a53_defconfig | 1 + configs/phycore_am62x_r5_defconfig | 1 + configs/phycore_am64x_a53_defconfig | 1 + configs/phycore_am64x_r5_defconfig | 1 + configs/pico-imx8mq_defconfig | 1 + configs/sama5d27_wlsom1_ek_mmc_defconfig | 2 +- .../sama5d27_wlsom1_ek_qspiflash_defconfig | 2 +- configs/sama5d2_icp_mmc_defconfig | 2 +- configs/sandbox_noinst_defconfig | 1 + configs/sniper_defconfig | 2 +- configs/socfpga_secu1_defconfig | 2 +- configs/verdin-am62_a53_defconfig | 1 + configs/verdin-am62_r5_defconfig | 1 + configs/verdin-imx8mm_defconfig | 1 + configs/verdin-imx8mp_defconfig | 1 + 133 files changed, 175 insertions(+), 52 deletions(-)arch/arm/mach-imx/imx8m/soc.c +2
-0@@ -735,6 +735,7 @@ int boot_mode_getprisec(void)#endif #if defined(CONFIG_IMX8MN ) || defined(CONFIG_IMX8MP ) +#ifdef SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION #define IMG_CNTN_SET1_OFFSET GENMASK(22, 19)unsigned long arch_spl_mmc_get_uboot_raw_sector (struct mmc *mmc,unsigned long raw_sect)@@ -769,6 +770,7 @@ unsigned long arch_spl_mmc_get_uboot_raw_sector(struct mmc *mmc,return raw_sect; } +#endif /* SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION */ #endif bool is_usb_boot (void )arch/arm/mach-imx/spl_imx_romapi.c +11
-2@@ -33,8 +33,17 @@ ulong spl_romapi_raw_seekable_read(u32 offset, u32 size, void *buf)ulong __weak spl_romapi_get_uboot_base (u32 image_offset,u32 rom_bt_dev) { -return image_offset + - (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR *512 -0x8000 ); +u32 sector =0 ; + +/* +* Some boards use this value even though MMC is not enabled in SPL, for +* example imx8mn_bsh_smm_s2 +*/ +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR + sector =CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR ; +#endif + +return image_offset + sector *512 -0x8000 ; }static int is_boot_from_stream_device (u32 boot)board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c +2
-2@@ -190,7 +190,7 @@ int board_late_init(void)return 0 ; } -#ifdef CONFIG_SPL_MMC +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR #define UBOOT_RAW_SECTOR_OFFSET 0x40unsigned long board_spl_mmc_get_uboot_raw_sector (struct mmc *mmc,unsigned long raw_sector)@@ -204,4 +204,4 @@ unsigned long board_spl_mmc_get_uboot_raw_sector(struct mmc *mmc, return CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR; } } -#endif /* CONFIG_SPL_MMC */ +#endif /* CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR */ common/spl/Kconfig +0
-0@@ -490,24 +490,45 @@ config SPL_DISPLAY_PRINT the board.
Quoted 12 lines
common/spl/Kconfig config SPL_DISPLAY_PRINT · line 494
Quoted 9 lines
common/spl/Kconfig +2
-6config SPL_SYS_MMCSD_RAW_MODE - bool - help - Support booting from an MMC without a filesystem. - -config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR - bool "MMC raw mode: by sector" + bool "Use raw reads to locate the next boot phase" + depends on SPL_DM_MMC || SPL_MMCThis one is a weird one to me, we can have
DM_MMCwithout MMC? Shouldn't we fix it?
My understanding is that MMC means it supports mmc without driver model.
./tools/qconfig.py -f ~SPL_MMC SPL_DM_MMC
93 matches./tools/qconfig.py -f SPL_MMC ~SPL_DM_MMC
254 matches
so there are cases on both sides...so it looks like we need it as I have it?
Quoted 13 lines
Quoted 13 lines
common/spl/Kconfig +6
-0default y if ARCH_SUNXI || ARCH_DAVINCI || ARCH_UNIPHIER || \ ARCH_MX6 || ARCH_MX7 || \ ARCH_ROCKCHIP || ARCH_MVEBU || ARCH_SOCFPGA || \ ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \ OMAP44XX || OMAP54XX || AM33XX || AM43XX || \ TARGET_SIFIVE_UNLEASHED || TARGET_SIFIVE_UNMATCHED + help + Support booting from an MMC without a filesystem. + +if SPL_SYS_MMCSD_RAW_MODE + +choice
Quoted 8 lines
common/spl/Kconfig config SPL_DISPLAY_PRINT · line 511
Quoted 5 lines
common/spl/Kconfig +4
-0+ prompt "Method for locating next phase of boot (e.g. U-Boot)" + +config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR + bool "MMC raw mode: by sector" select SPL_LOAD_BLOCK if SPL_MMCWe can remove the if
SPL_MMChere asSPL_SYS_MMCSD_RAW_MODEalready depends on it and this choice is guarded by it.
Oh that's interesting...will fix. it makes me wonder what happens with this mode with SPL_DM_MMC??
Quoted 27 lines
common/spl/Kconfig config SPL_DISPLAY_PRINT · line 517
Quoted 8 lines
common/spl/Kconfig +2
-1- select SPL_SYS_MMCSD_RAW_MODE if SPL_MMC help Use sector number for specifying U-Boot location on MMC/SD in raw mode. +config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION + bool "MMC Raw mode: by partition"Lower case "raw" here to match the two other choices?
common/spl/Kconfig config SPL_DISPLAY_PRINT · line 518
Quoted 1 line
common/spl/Kconfig +1
-0+ select SPL_LOAD_BLOCK if SPL_MMCDitto wrt
SPL_MMCthat I brought up earlier.common/spl/Kconfig config SPL_DISPLAY_PRINT · line 524
Quoted 6 lines
common/spl/Kconfig +6
-0+ help + Use a partition for loading U-Boot when using MMC/SD in raw mode. + +config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE + bool "MMC raw mode: by partition type" + depends on DOS_PARTITION && SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITIONThis can never be met, as
SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITIONis another option in the same choice.Cheers,
Quentin
PATCH v2 12/14 spl: Use unified inline functions for spl_load_info
In reply to Simon GlassRather than declaring completely separate functions, put the code for each case into the same function. This makes it easier to read.
---
(no changes since v1)
include/spl.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)
include/spl.h +7 -11
@@ -306,31 +306,27 @@ struct spl_load_info { void *buf);#if IS_ENABLED (CONFIG_SPL_LOAD_BLOCK )int bl_len; +#endif };static inline int spl_get_bl_len (struct spl_load_info *info) { +#if IS_ENABLED (CONFIG_SPL_LOAD_BLOCK )return info->bl_len; -} - -static inline void spl_set_bl_len (struct spl_load_info *info,int bl_len) -{ - info->bl_len = bl_len; -}#else -}; - -static inline int spl_get_bl_len (struct spl_load_info *info) -{return 1 ; +#endif }static inline void spl_set_bl_len (struct spl_load_info *info,int bl_len) { +#if IS_ENABLED (CONFIG_SPL_LOAD_BLOCK ) + info->bl_len = bl_len; +#else if (bl_len !=1 )panic ("CONFIG_SPL_LOAD_BLOCK not enabled" ); -}#endif +}/* * We need to know the position of U-Boot in memory so we can jump to it. We
Signature · 1 line
2.34.1
Re: [PATCH v2 12/14] spl: Use unified inline functions for spl_load_info
Hi Simon,
Quoted 5 lines · Simon Glass
Rather than declaring completely separate functions, put the code for each case into the same function. This makes it easier to read.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>
Thanks!
Quentin
PATCH v2 13/14 spl: Create a function to init spl_load_info
In reply to Simon GlassRather than having every caller set this up individually, create a common init function. This allows new fields to be added without the risk of them being left uninited.
---
(no changes since v1)
arch/arm/mach-imx/spl_imx_romapi.c | 14 ++------- arch/arm/mach-sunxi/spl_spi_sunxi.c | 3 +- common/spl/spl_blk_fs.c | 9 ++---- common/spl/spl_ext.c | 3 +- common/spl/spl_fat.c | 10 +++---- common/spl/spl_mmc.c | 4 +-- common/spl/spl_nand.c | 4 +-- common/spl/spl_net.c | 3 +- common/spl/spl_nor.c | 6 ++-- common/spl/spl_ram.c | 3 +- common/spl/spl_semihosting.c | 4 +-- common/spl/spl_spi.c | 4 +-- common/spl/spl_ymodem.c | 4 +-- drivers/usb/gadget/f_sdp.c | 8 ++---- include/spl.h | 44 ++++++++++++++++++++--------- test/image/spl_load.c | 4 +-- test/image/spl_load_os.c | 6 +--- 17 files changed, 55 insertions(+), 78 deletions(-)
arch/arm/mach-imx/spl_imx_romapi.c +3 -11
@@ -108,18 +108,13 @@ static int spl_romapi_load_image_seekable(struct spl_image_info *spl_image,if (IS_ENABLED (CONFIG_SPL_LOAD_FIT ) &&image_get_magic (header) ==FDT_MAGIC ) {struct spl_load_info load; -memset (&load,0 ,sizeof (load)); -spl_set_bl_len (&load, pagesize); - load.read = spl_romapi_read_seekable; +spl_load_init (&load, spl_romapi_read_seekable,NULL , pagesize);return spl_load_simple_fit (spl_image, &load, offset, header); }else if (IS_ENABLED (CONFIG_SPL_LOAD_IMX_CONTAINER ) &&valid_container_hdr ((void *)header)) {struct spl_load_info load; -memset (&load,0 ,sizeof (load)); -spl_set_bl_len (&load, pagesize); - load.read = spl_romapi_read_seekable; - +spl_load_init (&load, spl_romapi_read_seekable,NULL , pagesize); ret =spl_load_imx_container (spl_image, &load, offset); }else {/* TODO */
@@ -341,10 +336,7 @@ static int spl_romapi_load_image_stream(struct spl_image_info *spl_image, ss.end = p; ss.pagesize = pagesize; -memset (&load,0 ,sizeof (load)); -spl_set_bl_len (&load,1 ); - load.read = spl_romapi_read_stream; - load.priv = &ss; +spl_load_init (&load, spl_romapi_read_stream, &ss,1 );return spl_load_simple_fit (spl_image, &load, (ulong )phdr, phdr); }
arch/arm/mach-sunxi/spl_spi_sunxi.c +1 -2
@@ -390,8 +390,7 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,struct spl_load_info load;debug ("Found FIT image\n" ); -spl_set_bl_len (&load,1 ); - load.read = spi_load_read; +spl_load_init (&load, spi_load_read,NULL ,1 ); ret =spl_load_simple_fit (spl_image, &load, load_offset, header); }else {
common/spl/spl_blk_fs.c +3 -6
@@ -80,11 +80,8 @@ int spl_blk_load_image(struct spl_image_info *spl_image,return ret; } - load.read = spl_fit_read; -if (IS_ENABLED (CONFIG_SPL_FS_FAT_DMA_ALIGN )) -spl_set_bl_len (&load,ARCH_DMA_MINALIGN ); -else -spl_set_bl_len (&load,1 ); - load.priv = &dev; +spl_load_init (&load, spl_fit_read, &dev, +IS_ENABLED (CONFIG_SPL_FS_FAT_DMA_ALIGN ) ? +ARCH_DMA_MINALIGN :1 );return spl_load (spl_image, bootdev, &load, filesize,0 ); }
common/spl/spl_ext.c +1 -2
@@ -51,8 +51,7 @@ int spl_load_image_ext(struct spl_image_info *spl_image, goto end; } -spl_set_bl_len (&load,1 ); - load.read = spl_fit_read; +spl_load_init (&load, spl_fit_read,NULL ,1 ); err =spl_load (spl_image, bootdev, &load, filelen,0 ); end:
common/spl/spl_fat.c +4 -6
@@ -83,12 +83,10 @@ int spl_load_image_fat(struct spl_image_info *spl_image, size =0 ; } - load.read = spl_fit_read; -if (IS_ENABLED (CONFIG_SPL_FS_FAT_DMA_ALIGN )) -spl_set_bl_len (&load,ARCH_DMA_MINALIGN ); -else -spl_set_bl_len (&load,1 ); - load.priv = (void *)filename; +spl_load_init (&load, spl_fit_read, (void *)filename, +IS_ENABLED (CONFIG_SPL_FS_FAT_DMA_ALIGN ) ? +ARCH_DMA_MINALIGN :1 ); + err =spl_load (spl_image, bootdev, &load, size,0 ); end:
common/spl/spl_mmc.c +1 -3
@@ -46,9 +46,7 @@ int mmc_load_image_raw_sector(struct spl_image_info *spl_image,struct blk_desc *bd =mmc_get_blk_desc (mmc);struct spl_load_info load; - load.priv = bd; -spl_set_bl_len (&load, bd->blksz); - load.read = h_spl_load_read; +spl_load_init (&load, h_spl_load_read, bd, bd->blksz); ret =spl_load (spl_image, bootdev, &load,0 , sector << bd->log2blksz);if (ret) {puts ("mmc_load_image_raw_sector: mmc block read error\n" );
common/spl/spl_nand.c +1 -3
@@ -71,9 +71,7 @@ static int spl_nand_load_element(struct spl_image_info *spl_image, {struct spl_load_info load; - load.priv = &offset; -spl_set_bl_len (&load,1 ); - load.read = spl_nand_read; +spl_load_init (&load, spl_nand_read, &offset,1 );return spl_load (spl_image, bootdev, &load,0 , offset); }
common/spl/spl_net.c +1 -2
@@ -47,8 +47,7 @@ static int spl_net_load_image(struct spl_image_info *spl_image, return rv; } -spl_set_bl_len (&load,1 ); - load.read = spl_net_load_read; +spl_load_init (&load, spl_net_load_read,NULL ,1 );return spl_load (spl_image, bootdev, &load,0 ,0 ); }#endif
common/spl/spl_nor.c +2 -4
@@ -49,8 +49,7 @@ static int spl_nor_load_image(struct spl_image_info *spl_image,int ret;debug ("Found FIT\n" ); -spl_set_bl_len (&load,1 ); - load.read = spl_nor_load_read; +spl_load_init (&load, spl_nor_load_read,NULL ,1 ); ret = spl_load_simple_fit(spl_image, &load, CONFIG_SYS_OS_BASE,
@@ -93,8 +92,7 @@ static int spl_nor_load_image(struct spl_image_info *spl_image,* Load real U-Boot from its location in NOR flash to its * defined location in SDRAM */ -spl_set_bl_len (&load,1 ); - load.read = spl_nor_load_read; +spl_load_init (&load, spl_nor_load_read,NULL ,1 );return spl_load (spl_image, bootdev, &load,0 ,spl_nor_get_uboot_base ()); }SPL_LOAD_IMAGE_METHOD ("NOR" ,0 ,BOOT_DEVICE_NOR , spl_nor_load_image);
common/spl/spl_ram.c +1 -2
@@ -69,8 +69,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,struct spl_load_info load;debug ("Found FIT\n" ); -spl_set_bl_len (&load,1 ); - load.read = spl_ram_load_read; +spl_load_init (&load, spl_ram_load_read,NULL ,1 ); ret =spl_load_simple_fit (spl_image, &load,0 , header); }else {ulong u_boot_pos =spl_get_image_pos ();
common/spl/spl_semihosting.c +1 -3
@@ -43,9 +43,7 @@ static int spl_smh_load_image(struct spl_image_info *spl_image, } len = ret; - load.read = smh_fit_read; -spl_set_bl_len (&load,1 ); - load.priv = &fd; +spl_load_init (&load, smh_fit_read, &fd,1 ); ret =spl_load (spl_image, bootdev, &load, len,0 );if (ret)log_debug ("could not read %s: %d\n" , filename, ret);
common/spl/spl_spi.c +1 -3
@@ -77,9 +77,7 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,return -ENODEV ; } - load.priv = flash; -spl_set_bl_len (&load,1 ); - load.read = spl_spi_fit_read; +spl_load_init (&load, spl_spi_fit_read, flash,1 );#if CONFIG_IS_ENABLED (OS_BOOT )if (spl_start_uboot ()) {
common/spl/spl_ymodem.c +1 -3
@@ -132,11 +132,9 @@ int spl_ymodem_load_image(struct spl_image_info *spl_image,struct ymodem_fit_info info;debug ("Found FIT\n" ); - load.priv = (void *)&info; -spl_set_bl_len (&load,1 ); +spl_load_init (&load, ymodem_read_fit, (void *)&info,1 ); info.buf = buf; info.image_read =BUF_SIZE ; - load.read = ymodem_read_fit; ret =spl_load_simple_fit (spl_image, &load,0 , (void *)buf); size = info.image_read;
drivers/usb/gadget/f_sdp.c +2 -6
@@ -843,9 +843,7 @@ static int sdp_handle_in_ep(struct spl_image_info *spl_image,struct spl_load_info load;debug ("Found FIT\n" ); - load.priv = header; -spl_set_bl_len (&load,1 ); - load.read = sdp_load_read; +spl_load_init (&load, sdp_load_read, header,1 );spl_load_simple_fit (spl_image, &load,0 , header);
@@ -856,9 +854,7 @@ static int sdp_handle_in_ep(struct spl_image_info *spl_image, valid_container_hdr((void *)header)) {struct spl_load_info load; - load.priv = header; -spl_set_bl_len (&load,1 ); - load.read = sdp_load_read; +spl_load_init (&load, sdp_load_read, header,1 );spl_load_imx_container (spl_image, &load,0 );return SDP_EXIT ; }
include/spl.h +30 -14
64 lines not on this page · raw message
test/image/spl_load.c +1 -3
@@ -343,9 +343,7 @@ static int spl_test_image(struct unit_test_state *uts, const char *test_name, }else {struct spl_load_info load; -spl_set_bl_len (&load,1 ); - load.priv = img; - load.read = spl_test_read; +spl_load_init (&load, spl_test_read, img,1 );if (type ==IMX8 )ut_assertok (spl_load_imx_container (&info_read, &load,0 ));
test/image/spl_load_os.c +1 -5
@@ -49,9 +49,7 @@ static int spl_test_load(struct unit_test_state *uts)int ret;int fd; -memset (&load,'\0' ,sizeof (load)); -spl_set_bl_len (&load,512 ); - load.read = read_fit_image; +spl_load_init (&load, read_fit_image, &text_ctx,512 ); ret =sandbox_find_next_phase (fname,sizeof (fname), true);if (ret)
@@ -64,8 +62,6 @@ static int spl_test_load(struct unit_test_state *uts)ut_asserteq (512 ,os_read (fd, header,512 )); text_ctx.fd = fd; - load.priv = &text_ctx; -ut_assertok (spl_load_simple_fit (&image, &load,0 , header));return 0 ;
Signature · 1 line
2.34.1
PATCH v2 14/14 blk: Correct comment for blk_get_devnum_by_uclass_idname()
In reply to Simon GlassUpdate the comment to match the function. Fix the indentation while we are here.
---
(no changes since v1)
include/blk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/blk.h +2 -2
@@ -650,7 +650,7 @@ struct blk_driver *blk_driver_lookup_type(int uclass_id);struct blk_desc *blk_get_devnum_by_uclass_id (enum uclass_id uclass_id,int devnum);/** -* blk_get_devnum_by_uclass_id() - Get a block device by type name, and number +* blk_get_devnum_by_uclass_idname() - Get block device by type name and number * * This looks up the block device type based on @uclass_idname, then calls * blk_get_devnum_by_uclass_id().
@@ -660,7 +660,7 @@ struct blk_desc *blk_get_devnum_by_uclass_id(enum uclass_id uclass_id, int devnu* Return: point to block device descriptor, or NULL if not found */ struct blk_desc *blk_get_devnum_by_uclass_idname (const char *uclass_idname, -int devnum); +int devnum);/** * blk_dselect_hwpart() - select a hardware partition
Signature · 1 line
2.34.1
Re: [PATCH v2 14/14] blk: Correct comment for blk_get_devnum_by_uclass_idname()
Hi Simon,
Quoted 5 lines · Simon Glass
Update the comment to match the function. Fix the indentation while we are here.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Sean Anderson <[email protected]>
Thanks!
Quentin