[U-Boot] [PATCH v1 00/11] Update STM32 MCU configs

This series : - Remove unused configs flags in include/configs/stm32fxx files - Enable instruction and data caches for stm32f4 _ Migrate CMD_CACHE flag from include/configs/ to defconfig for stm32f746 and stm32h7 - Add DISTRO_DEFAULT support for stm32f4 and stm32h7 boards
Patrice Chotard (11): board: stm32: use bi_dram[0].start instead of hardcoded value configs: stm32fxxx: Remove CONFIG_SYS_CLK_FREQ configs: stm32f429-disco: Remove CONFIG_SYS_RAM_CS configs: stm32f4xx: Enable ICACHE and DCACHE configs: stm32f746-disco: Migrate CONFIG_CMD_CACHE to defconfig configs: stm32h7xx: Migrate CONFIG_CMD_CACHE to defconfig configs: stm32f4xx: Remove CONFIG_SYS_RAM_FREQ_DIV configs: stm32h743-evaluation: Add DISTRO_DEFAULT support configs: stm32h743-discovery: Add DISTRO_DEFAULT support configs: stm32f469-discovery: Add DISTRO_DEFAULT support configs: stm32f429-evaluation: Add DISTRO_DEFAULT support
board/st/stm32f429-discovery/stm32f429-discovery.c | 2 +- .../st/stm32f429-evaluation/stm32f429-evaluation.c | 2 +- board/st/stm32f469-discovery/stm32f469-discovery.c | 2 +- configs/stm32f429-evaluation_defconfig | 11 ++++----- configs/stm32f469-discovery_defconfig | 11 ++++----- configs/stm32f746-disco_defconfig | 1 + configs/stm32h743-disco_defconfig | 13 ++++------- configs/stm32h743-eval_defconfig | 13 ++++------- include/configs/stm32f429-discovery.h | 9 -------- include/configs/stm32f429-evaluation.h | 26 ++++++++++++---------- include/configs/stm32f469-discovery.h | 26 ++++++++++++---------- include/configs/stm32f746-disco.h | 2 -- include/configs/stm32h743-disco.h | 19 +++++++++++----- include/configs/stm32h743-eval.h | 19 +++++++++++----- 14 files changed, 76 insertions(+), 80 deletions(-)

Use gd->bd->bi_dram[0].start initialized from DT instead of using hardcoded CONFIG_SYS_SDRAM_BASE from config file.
Remove unused CONFIG_SYS_RAM_BASE and CONFIG_SYS_SDRAM_BASE defines.
Signed-off-by: Patrice Chotard patrice.chotard@st.com ---
board/st/stm32f429-discovery/stm32f429-discovery.c | 2 +- board/st/stm32f429-evaluation/stm32f429-evaluation.c | 2 +- board/st/stm32f469-discovery/stm32f469-discovery.c | 2 +- include/configs/stm32f429-discovery.h | 2 -- include/configs/stm32f429-evaluation.h | 2 -- include/configs/stm32f469-discovery.h | 2 -- include/configs/stm32h743-disco.h | 2 -- include/configs/stm32h743-eval.h | 2 -- 8 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c index e800d70f763b..500dc5fe3a6b 100644 --- a/board/st/stm32f429-discovery/stm32f429-discovery.c +++ b/board/st/stm32f429-discovery/stm32f429-discovery.c @@ -54,7 +54,7 @@ int board_early_init_f(void)
int board_init(void) { - gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
return 0; } diff --git a/board/st/stm32f429-evaluation/stm32f429-evaluation.c b/board/st/stm32f429-evaluation/stm32f429-evaluation.c index fd2109b27c0f..8ab2fa5d59ab 100644 --- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c +++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c @@ -48,7 +48,7 @@ int board_early_init_f(void)
int board_init(void) { - gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
return 0; } diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c index a457f9095276..70d23d90f4ca 100644 --- a/board/st/stm32f469-discovery/stm32f469-discovery.c +++ b/board/st/stm32f469-discovery/stm32f469-discovery.c @@ -48,7 +48,7 @@ int board_early_init_f(void)
int board_init(void) { - gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
return 0; } diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h index 46eda1d51829..458d433a6aca 100644 --- a/include/configs/stm32f429-discovery.h +++ b/include/configs/stm32f429-discovery.h @@ -22,8 +22,6 @@ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_RAM_CS 1 #define CONFIG_SYS_RAM_FREQ_DIV 2 -#define CONFIG_SYS_RAM_BASE 0x90000000 -#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_RAM_BASE #define CONFIG_SYS_LOAD_ADDR 0x90400000 #define CONFIG_LOADADDR 0x90400000
diff --git a/include/configs/stm32f429-evaluation.h b/include/configs/stm32f429-evaluation.h index 67cb584165fe..881cb2dedcbb 100644 --- a/include/configs/stm32f429-evaluation.h +++ b/include/configs/stm32f429-evaluation.h @@ -21,8 +21,6 @@ */ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_RAM_FREQ_DIV 2 -#define CONFIG_SYS_RAM_BASE 0x00000000 -#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_RAM_BASE #define CONFIG_SYS_LOAD_ADDR 0x00400000 #define CONFIG_LOADADDR 0x00400000
diff --git a/include/configs/stm32f469-discovery.h b/include/configs/stm32f469-discovery.h index b5259ee21457..3d628cc71d75 100644 --- a/include/configs/stm32f469-discovery.h +++ b/include/configs/stm32f469-discovery.h @@ -21,8 +21,6 @@ */ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_RAM_FREQ_DIV 2 -#define CONFIG_SYS_RAM_BASE 0x00000000 -#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_RAM_BASE #define CONFIG_SYS_LOAD_ADDR 0x00400000 #define CONFIG_LOADADDR 0x00400000
diff --git a/include/configs/stm32h743-disco.h b/include/configs/stm32h743-disco.h index 5b6ee76e7c6b..a8dcfe3b7a55 100644 --- a/include/configs/stm32h743-disco.h +++ b/include/configs/stm32h743-disco.h @@ -16,8 +16,6 @@ * Configuration of the external SDRAM memory */ #define CONFIG_NR_DRAM_BANKS 1 -#define CONFIG_SYS_RAM_BASE 0xD0000000 -#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_RAM_BASE #define CONFIG_SYS_LOAD_ADDR 0xD0400000 #define CONFIG_LOADADDR 0xD0400000
diff --git a/include/configs/stm32h743-eval.h b/include/configs/stm32h743-eval.h index 5b6ee76e7c6b..a8dcfe3b7a55 100644 --- a/include/configs/stm32h743-eval.h +++ b/include/configs/stm32h743-eval.h @@ -16,8 +16,6 @@ * Configuration of the external SDRAM memory */ #define CONFIG_NR_DRAM_BANKS 1 -#define CONFIG_SYS_RAM_BASE 0xD0000000 -#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_RAM_BASE #define CONFIG_SYS_LOAD_ADDR 0xD0400000 #define CONFIG_LOADADDR 0xD0400000

On Fri, Aug 03, 2018 at 11:46:11AM +0200, Patrice Chotard wrote:
Use gd->bd->bi_dram[0].start initialized from DT instead of using hardcoded CONFIG_SYS_SDRAM_BASE from config file.
Remove unused CONFIG_SYS_RAM_BASE and CONFIG_SYS_SDRAM_BASE defines.
Signed-off-by: Patrice Chotard patrice.chotard@st.com
Applied to u-boot/master, thanks!

Since commit aa5e3e22f4d6 ("board: stm32: switch to DM STM32 timer") SYS_CLK_FREQ is useless, remove it from stm32f4 and stm32f7 boards.
Signed-off-by: Patrice Chotard patrice.chotard@st.com ---
include/configs/stm32f429-discovery.h | 2 -- include/configs/stm32f429-evaluation.h | 1 - include/configs/stm32f469-discovery.h | 1 - include/configs/stm32f746-disco.h | 1 - 4 files changed, 5 deletions(-)
diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h index 458d433a6aca..e0f604db0e21 100644 --- a/include/configs/stm32f429-discovery.h +++ b/include/configs/stm32f429-discovery.h @@ -37,8 +37,6 @@
#define CONFIG_STM32_FLASH
-#define CONFIG_SYS_CLK_FREQ 180000000 /* 180 MHz */ - #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */
#define CONFIG_CMDLINE_TAG diff --git a/include/configs/stm32f429-evaluation.h b/include/configs/stm32f429-evaluation.h index 881cb2dedcbb..258ae767d233 100644 --- a/include/configs/stm32f429-evaluation.h +++ b/include/configs/stm32f429-evaluation.h @@ -33,7 +33,6 @@
#define CONFIG_STM32_FLASH
-#define CONFIG_SYS_CLK_FREQ 180000000 /* 180 MHz */ #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */
#define CONFIG_CMDLINE_TAG diff --git a/include/configs/stm32f469-discovery.h b/include/configs/stm32f469-discovery.h index 3d628cc71d75..a9182450e607 100644 --- a/include/configs/stm32f469-discovery.h +++ b/include/configs/stm32f469-discovery.h @@ -33,7 +33,6 @@
#define CONFIG_STM32_FLASH
-#define CONFIG_SYS_CLK_FREQ 180000000 /* 180 MHz */ #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */
#define CONFIG_CMDLINE_TAG diff --git a/include/configs/stm32f746-disco.h b/include/configs/stm32f746-disco.h index 567e7f2a0078..aa45d29b803b 100644 --- a/include/configs/stm32f746-disco.h +++ b/include/configs/stm32f746-disco.h @@ -34,7 +34,6 @@ #define CONFIG_MII #define CONFIG_PHY_SMSC
-#define CONFIG_SYS_CLK_FREQ 200000000 /* 200 MHz */ #define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */
#define CONFIG_CMDLINE_TAG

On Fri, Aug 03, 2018 at 11:46:12AM +0200, Patrice Chotard wrote:
Since commit aa5e3e22f4d6 ("board: stm32: switch to DM STM32 timer") SYS_CLK_FREQ is useless, remove it from stm32f4 and stm32f7 boards.
Signed-off-by: Patrice Chotard patrice.chotard@st.com
Applied to u-boot/master, thanks!

This flag is not used, remove it.
Signed-off-by: Patrice Chotard patrice.chotard@st.com ---
include/configs/stm32f429-discovery.h | 1 - 1 file changed, 1 deletion(-)
diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h index e0f604db0e21..38af704c3b96 100644 --- a/include/configs/stm32f429-discovery.h +++ b/include/configs/stm32f429-discovery.h @@ -20,7 +20,6 @@ * Configuration of the external SDRAM memory */ #define CONFIG_NR_DRAM_BANKS 1 -#define CONFIG_SYS_RAM_CS 1 #define CONFIG_SYS_RAM_FREQ_DIV 2 #define CONFIG_SYS_LOAD_ADDR 0x90400000 #define CONFIG_LOADADDR 0x90400000

On Fri, Aug 03, 2018 at 11:46:13AM +0200, Patrice Chotard wrote:
This flag is not used, remove it.
Signed-off-by: Patrice Chotard patrice.chotard@st.com
Applied to u-boot/master, thanks!

Enable instruction and data caches. Fix boot_sd command as since commit d409c962169b ("armv7m: disable icache before linux booting"), instruction cache is automatically disable before linux booting. "icache off" from boot_sd command becomes useless, remove it.
Signed-off-by: Patrice Chotard patrice.chotard@st.com ---
include/configs/stm32f429-discovery.h | 3 --- include/configs/stm32f429-evaluation.h | 5 +---- include/configs/stm32f469-discovery.h | 5 +---- 3 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h index 38af704c3b96..90d7429e706b 100644 --- a/include/configs/stm32f429-discovery.h +++ b/include/configs/stm32f429-discovery.h @@ -13,9 +13,6 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x10010000
-#define CONFIG_SYS_ICACHE_OFF -#define CONFIG_SYS_DCACHE_OFF - /* * Configuration of the external SDRAM memory */ diff --git a/include/configs/stm32f429-evaluation.h b/include/configs/stm32f429-evaluation.h index 258ae767d233..d48940d0c884 100644 --- a/include/configs/stm32f429-evaluation.h +++ b/include/configs/stm32f429-evaluation.h @@ -13,9 +13,6 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x10010000
-#define CONFIG_SYS_ICACHE_OFF -#define CONFIG_SYS_DCACHE_OFF - /* * Configuration of the external SDRAM memory */ @@ -48,7 +45,7 @@ "run boot_sd"
#define CONFIG_EXTRA_ENV_SETTINGS \ - "boot_sd=mmc dev 0;fatload mmc 0 0x00700000 stm32429i-eval.dtb; fatload mmc 0 0x00008000 zImage; icache off; bootz 0x00008000 - 0x00700000" + "boot_sd=mmc dev 0;fatload mmc 0 0x00700000 stm32429i-eval.dtb; fatload mmc 0 0x00008000 zImage; bootz 0x00008000 - 0x00700000"
/* * Command line configuration. diff --git a/include/configs/stm32f469-discovery.h b/include/configs/stm32f469-discovery.h index a9182450e607..be8c2331566b 100644 --- a/include/configs/stm32f469-discovery.h +++ b/include/configs/stm32f469-discovery.h @@ -13,9 +13,6 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x10010000
-#define CONFIG_SYS_ICACHE_OFF -#define CONFIG_SYS_DCACHE_OFF - /* * Configuration of the external SDRAM memory */ @@ -48,7 +45,7 @@ "run boot_sd"
#define CONFIG_EXTRA_ENV_SETTINGS \ - "boot_sd=mmc dev 0;fatload mmc 0 0x00700000 stm32f469-disco.dtb; fatload mmc 0 0x00008000 zImage; icache off; bootz 0x00008000 - 0x00700000" + "boot_sd=mmc dev 0;fatload mmc 0 0x00700000 stm32f469-disco.dtb; fatload mmc 0 0x00008000 zImage; bootz 0x00008000 - 0x00700000"
/* * Command line configuration.

On Fri, Aug 03, 2018 at 11:46:14AM +0200, Patrice Chotard wrote:
Enable instruction and data caches. Fix boot_sd command as since commit d409c962169b ("armv7m: disable icache before linux booting"), instruction cache is automatically disable before linux booting. "icache off" from boot_sd command becomes useless, remove it.
Signed-off-by: Patrice Chotard patrice.chotard@st.com
Applied to u-boot/master, thanks!

Remove CONFIG_CMD_CACHE from include/configs/stm32f746-disco.h and enable it in stm32f746-disco_defconfig
Signed-off-by: Patrice Chotard patrice.chotard@st.com ---
configs/stm32f746-disco_defconfig | 1 + include/configs/stm32f746-disco.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig index aa7403f3c516..79566049d2a2 100644 --- a/configs/stm32f746-disco_defconfig +++ b/configs/stm32f746-disco_defconfig @@ -30,6 +30,7 @@ CONFIG_CMD_SNTP=y CONFIG_CMD_DNS=y CONFIG_CMD_LINK_LOCAL=y CONFIG_CMD_BMP=y +CONFIG_CMD_CACHE=y CONFIG_CMD_TIMER=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y diff --git a/include/configs/stm32f746-disco.h b/include/configs/stm32f746-disco.h index aa45d29b803b..3a76c5807a9c 100644 --- a/include/configs/stm32f746-disco.h +++ b/include/configs/stm32f746-disco.h @@ -57,7 +57,6 @@ /* * Command line configuration. */ -#define CONFIG_CMD_CACHE #define CONFIG_BOARD_LATE_INIT #define CONFIG_DISPLAY_BOARDINFO

On Fri, Aug 03, 2018 at 11:46:15AM +0200, Patrice Chotard wrote:
Remove CONFIG_CMD_CACHE from include/configs/stm32f746-disco.h and enable it in stm32f746-disco_defconfig
Signed-off-by: Patrice Chotard patrice.chotard@st.com
Applied to u-boot/master, thanks!

Remove CONFIG_CMD_CACHE from include/configs/stm32h7xx.h and enable it in stm32h7xx_defconfig
Signed-off-by: Patrice Chotard patrice.chotard@st.com ---
configs/stm32h743-disco_defconfig | 1 + configs/stm32h743-eval_defconfig | 1 + include/configs/stm32h743-disco.h | 1 - include/configs/stm32h743-eval.h | 1 - 4 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configs/stm32h743-disco_defconfig b/configs/stm32h743-disco_defconfig index c6a0d10bdbd7..67c754b90d22 100644 --- a/configs/stm32h743-disco_defconfig +++ b/configs/stm32h743-disco_defconfig @@ -19,6 +19,7 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_CACHE=y CONFIG_CMD_TIMER=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y diff --git a/configs/stm32h743-eval_defconfig b/configs/stm32h743-eval_defconfig index ab5273ba90aa..1122202c543b 100644 --- a/configs/stm32h743-eval_defconfig +++ b/configs/stm32h743-eval_defconfig @@ -19,6 +19,7 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y # CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_CACHE=y CONFIG_CMD_TIMER=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y diff --git a/include/configs/stm32h743-disco.h b/include/configs/stm32h743-disco.h index a8dcfe3b7a55..90fc736c3f28 100644 --- a/include/configs/stm32h743-disco.h +++ b/include/configs/stm32h743-disco.h @@ -37,7 +37,6 @@ /* * Command line configuration. */ -#define CONFIG_CMD_CACHE #define CONFIG_BOARD_LATE_INIT
#endif /* __CONFIG_H */ diff --git a/include/configs/stm32h743-eval.h b/include/configs/stm32h743-eval.h index a8dcfe3b7a55..90fc736c3f28 100644 --- a/include/configs/stm32h743-eval.h +++ b/include/configs/stm32h743-eval.h @@ -37,7 +37,6 @@ /* * Command line configuration. */ -#define CONFIG_CMD_CACHE #define CONFIG_BOARD_LATE_INIT
#endif /* __CONFIG_H */

On Fri, Aug 03, 2018 at 11:46:16AM +0200, Patrice Chotard wrote:
Remove CONFIG_CMD_CACHE from include/configs/stm32h7xx.h and enable it in stm32h7xx_defconfig
Signed-off-by: Patrice Chotard patrice.chotard@st.com
Applied to u-boot/master, thanks!

Since commit bfea69ad2793 ("stm32f7: sdram: correct sdram configuration as per micron sdram"), CONFIG_SYS_RAM_FREQ_DIV flag is no more used, remove it.
Signed-off-by: Patrice Chotard patrice.chotard@st.com ---
include/configs/stm32f429-discovery.h | 1 - include/configs/stm32f429-evaluation.h | 1 - include/configs/stm32f469-discovery.h | 1 - 3 files changed, 3 deletions(-)
diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h index 90d7429e706b..b8848f16106a 100644 --- a/include/configs/stm32f429-discovery.h +++ b/include/configs/stm32f429-discovery.h @@ -17,7 +17,6 @@ * Configuration of the external SDRAM memory */ #define CONFIG_NR_DRAM_BANKS 1 -#define CONFIG_SYS_RAM_FREQ_DIV 2 #define CONFIG_SYS_LOAD_ADDR 0x90400000 #define CONFIG_LOADADDR 0x90400000
diff --git a/include/configs/stm32f429-evaluation.h b/include/configs/stm32f429-evaluation.h index d48940d0c884..ab730e1a47dd 100644 --- a/include/configs/stm32f429-evaluation.h +++ b/include/configs/stm32f429-evaluation.h @@ -17,7 +17,6 @@ * Configuration of the external SDRAM memory */ #define CONFIG_NR_DRAM_BANKS 1 -#define CONFIG_SYS_RAM_FREQ_DIV 2 #define CONFIG_SYS_LOAD_ADDR 0x00400000 #define CONFIG_LOADADDR 0x00400000
diff --git a/include/configs/stm32f469-discovery.h b/include/configs/stm32f469-discovery.h index be8c2331566b..3e4e89bc4078 100644 --- a/include/configs/stm32f469-discovery.h +++ b/include/configs/stm32f469-discovery.h @@ -17,7 +17,6 @@ * Configuration of the external SDRAM memory */ #define CONFIG_NR_DRAM_BANKS 1 -#define CONFIG_SYS_RAM_FREQ_DIV 2 #define CONFIG_SYS_LOAD_ADDR 0x00400000 #define CONFIG_LOADADDR 0x00400000

On Fri, Aug 03, 2018 at 11:46:17AM +0200, Patrice Chotard wrote:
Since commit bfea69ad2793 ("stm32f7: sdram: correct sdram configuration as per micron sdram"), CONFIG_SYS_RAM_FREQ_DIV flag is no more used, remove it.
Signed-off-by: Patrice Chotard patrice.chotard@st.com
Applied to u-boot/master, thanks!

Add DISTRO_DEFAULT support to be able to boot on mmc by default on boot.
Signed-off-by: Patrice Chotard patrice.chotard@st.com ---
configs/stm32h743-eval_defconfig | 12 +++--------- include/configs/stm32h743-eval.h | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/configs/stm32h743-eval_defconfig b/configs/stm32h743-eval_defconfig index 1122202c543b..84d0ca7a8474 100644 --- a/configs/stm32h743-eval_defconfig +++ b/configs/stm32h743-eval_defconfig @@ -5,34 +5,28 @@ CONFIG_SYS_MALLOC_F_LEN=0xF00 CONFIG_STM32H7=y CONFIG_TARGET_STM32H743_EVAL=y CONFIG_DEFAULT_DEVICE_TREE="stm32h743i-eval" -CONFIG_ENV_VARS_UBOOT_CONFIG=y +CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=3 +# CONFIG_USE_BOOTCOMMAND is not set CONFIG_DEFAULT_FDT_FILE="stm32h743i-eval" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="U-Boot > " CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Hit SPACE in %d seconds to stop autoboot.\n" CONFIG_AUTOBOOT_STOP_STR=" " -CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_CACHE=y CONFIG_CMD_TIMER=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y +# CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y -# CONFIG_NET is not set CONFIG_DM_MMC=y CONFIG_STM32_SDMMC2=y # CONFIG_PINCTRL_FULL is not set # CONFIG_SPL_SERIAL_PRESENT is not set -CONFIG_REGEX=y CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER is not set diff --git a/include/configs/stm32h743-eval.h b/include/configs/stm32h743-eval.h index 90fc736c3f28..b49dc1a34a8a 100644 --- a/include/configs/stm32h743-eval.h +++ b/include/configs/stm32h743-eval.h @@ -31,8 +31,20 @@ #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024)
-#define CONFIG_BOOTARGS \ - "console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel" +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) + +#include <config_distro_bootcmd.h> +#define CONFIG_EXTRA_ENV_SETTINGS \ + "kernel_addr_r=0xD0008000\0" \ + "fdtfile=stm32h743i-eval.dtb\0" \ + "fdt_addr_r=0xD0700000\0" \ + "scriptaddr=0xD0800000\0" \ + "pxefile_addr_r=0xD0800000\0" \ + "fdt_high=0xffffffffffffffff\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "ramdisk_addr_r=0xD0900000\0" \ + BOOTENV
/* * Command line configuration.

On Fri, Aug 03, 2018 at 11:46:18AM +0200, Patrice Chotard wrote:
Add DISTRO_DEFAULT support to be able to boot on mmc by default on boot.
Signed-off-by: Patrice Chotard patrice.chotard@st.com
Applied to u-boot/master, thanks!

Add DISTRO_DEFAULT support to be able to boot on mmc by default on boot.
Signed-off-by: Patrice Chotard patrice.chotard@st.com ---
configs/stm32h743-disco_defconfig | 12 +++--------- include/configs/stm32h743-disco.h | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/configs/stm32h743-disco_defconfig b/configs/stm32h743-disco_defconfig index 67c754b90d22..e98d18c11df4 100644 --- a/configs/stm32h743-disco_defconfig +++ b/configs/stm32h743-disco_defconfig @@ -5,34 +5,28 @@ CONFIG_SYS_MALLOC_F_LEN=0xF00 CONFIG_STM32H7=y CONFIG_TARGET_STM32H743_DISCO=y CONFIG_DEFAULT_DEVICE_TREE="stm32h743i-disco" -CONFIG_ENV_VARS_UBOOT_CONFIG=y +CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=3 +# CONFIG_USE_BOOTCOMMAND is not set CONFIG_DEFAULT_FDT_FILE="stm32h743i-disco" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="U-Boot > " CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Hit SPACE in %d seconds to stop autoboot.\n" CONFIG_AUTOBOOT_STOP_STR=" " -CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y CONFIG_CMD_MMC=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_CACHE=y CONFIG_CMD_TIMER=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y +# CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y -# CONFIG_NET is not set CONFIG_DM_MMC=y CONFIG_STM32_SDMMC2=y # CONFIG_PINCTRL_FULL is not set # CONFIG_SPL_SERIAL_PRESENT is not set -CONFIG_REGEX=y CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER is not set diff --git a/include/configs/stm32h743-disco.h b/include/configs/stm32h743-disco.h index 90fc736c3f28..822ab2de77c7 100644 --- a/include/configs/stm32h743-disco.h +++ b/include/configs/stm32h743-disco.h @@ -31,8 +31,20 @@ #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024)
-#define CONFIG_BOOTARGS \ - "console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel" +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) + +#include <config_distro_bootcmd.h> +#define CONFIG_EXTRA_ENV_SETTINGS \ + "kernel_addr_r=0xD0008000\0" \ + "fdtfile=stm32h743i-disco.dtb\0" \ + "fdt_addr_r=0xD0700000\0" \ + "scriptaddr=0xD0800000\0" \ + "pxefile_addr_r=0xD0800000\0" \ + "fdt_high=0xffffffffffffffff\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "ramdisk_addr_r=0xD0900000\0" \ + BOOTENV
/* * Command line configuration.

On Fri, Aug 03, 2018 at 11:46:19AM +0200, Patrice Chotard wrote:
Add DISTRO_DEFAULT support to be able to boot on mmc by default on boot.
Signed-off-by: Patrice Chotard patrice.chotard@st.com
Applied to u-boot/master, thanks!

Add DISTRO_DEFAULT support to be able to boot on mmc by default on boot.
Signed-off-by: Patrice Chotard patrice.chotard@st.com ---
configs/stm32f469-discovery_defconfig | 11 ++++------- include/configs/stm32f469-discovery.h | 19 ++++++++++++++----- 2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/configs/stm32f469-discovery_defconfig b/configs/stm32f469-discovery_defconfig index 4de03edcc2ca..2db586f683bc 100644 --- a/configs/stm32f469-discovery_defconfig +++ b/configs/stm32f469-discovery_defconfig @@ -5,25 +5,22 @@ CONFIG_SYS_MALLOC_F_LEN=0xF00 CONFIG_STM32F4=y CONFIG_TARGET_STM32F469_DISCOVERY=y CONFIG_DEFAULT_DEVICE_TREE="stm32f469-disco" -CONFIG_ENV_VARS_UBOOT_CONFIG=y +CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=3 +# CONFIG_USE_BOOTCOMMAND is not set # CONFIG_DISPLAY_CPUINFO is not set CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="U-Boot > " -CONFIG_CMD_BOOTZ=y # CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set CONFIG_CMD_IMLS=y CONFIG_CMD_GPT=y # CONFIG_RANDOM_UUID is not set CONFIG_CMD_MMC=y # CONFIG_CMD_SETEXPR is not set +# CONFIG_CMD_MII is not set CONFIG_CMD_CACHE=y CONFIG_CMD_TIMER=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y +# CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y # CONFIG_BLK is not set diff --git a/include/configs/stm32f469-discovery.h b/include/configs/stm32f469-discovery.h index 3e4e89bc4078..c95f3f7de454 100644 --- a/include/configs/stm32f469-discovery.h +++ b/include/configs/stm32f469-discovery.h @@ -40,11 +40,20 @@
#define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024)
-#define CONFIG_BOOTCOMMAND \ - "run boot_sd" - -#define CONFIG_EXTRA_ENV_SETTINGS \ - "boot_sd=mmc dev 0;fatload mmc 0 0x00700000 stm32f469-disco.dtb; fatload mmc 0 0x00008000 zImage; bootz 0x00008000 - 0x00700000" +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) + +#include <config_distro_bootcmd.h> +#define CONFIG_EXTRA_ENV_SETTINGS \ + "kernel_addr_r=0x00008000\0" \ + "fdtfile=stm32f469-disco.dtb\0" \ + "fdt_addr_r=0x00700000\0" \ + "scriptaddr=0x00800000\0" \ + "pxefile_addr_r=0x00800000\0" \ + "fdt_high=0xffffffffffffffff\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "ramdisk_addr_r=0x00900000\0" \ + BOOTENV
/* * Command line configuration.

On Fri, Aug 03, 2018 at 11:46:20AM +0200, Patrice Chotard wrote:
Add DISTRO_DEFAULT support to be able to boot on mmc by default on boot.
Signed-off-by: Patrice Chotard patrice.chotard@st.com
Applied to u-boot/master, thanks!

Add DISTRO_DEFAULT support to be able to boot on mmc by default on boot.
Signed-off-by: Patrice Chotard patrice.chotard@st.com ---
configs/stm32f429-evaluation_defconfig | 11 ++++------- include/configs/stm32f429-evaluation.h | 19 ++++++++++++++----- 2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/configs/stm32f429-evaluation_defconfig b/configs/stm32f429-evaluation_defconfig index 1b14a4964067..74867ebd809b 100644 --- a/configs/stm32f429-evaluation_defconfig +++ b/configs/stm32f429-evaluation_defconfig @@ -5,25 +5,22 @@ CONFIG_SYS_MALLOC_F_LEN=0xF00 CONFIG_STM32F4=y CONFIG_TARGET_STM32F429_EVALUATION=y CONFIG_DEFAULT_DEVICE_TREE="stm32429i-eval" -CONFIG_ENV_VARS_UBOOT_CONFIG=y +CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=3 +# CONFIG_USE_BOOTCOMMAND is not set # CONFIG_DISPLAY_CPUINFO is not set CONFIG_BOARD_EARLY_INIT_F=y -CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="U-Boot > " -CONFIG_CMD_BOOTZ=y # CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set CONFIG_CMD_IMLS=y CONFIG_CMD_GPT=y # CONFIG_RANDOM_UUID is not set CONFIG_CMD_MMC=y # CONFIG_CMD_SETEXPR is not set +# CONFIG_CMD_MII is not set CONFIG_CMD_CACHE=y CONFIG_CMD_TIMER=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y +# CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y # CONFIG_BLK is not set diff --git a/include/configs/stm32f429-evaluation.h b/include/configs/stm32f429-evaluation.h index ab730e1a47dd..b0dcddc6d57f 100644 --- a/include/configs/stm32f429-evaluation.h +++ b/include/configs/stm32f429-evaluation.h @@ -40,11 +40,20 @@
#define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024)
-#define CONFIG_BOOTCOMMAND \ - "run boot_sd" - -#define CONFIG_EXTRA_ENV_SETTINGS \ - "boot_sd=mmc dev 0;fatload mmc 0 0x00700000 stm32429i-eval.dtb; fatload mmc 0 0x00008000 zImage; bootz 0x00008000 - 0x00700000" +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) + +#include <config_distro_bootcmd.h> +#define CONFIG_EXTRA_ENV_SETTINGS \ + "kernel_addr_r=0x00008000\0" \ + "fdtfile=stm32429i-eval.dtb\0" \ + "fdt_addr_r=0x00700000\0" \ + "scriptaddr=0x00800000\0" \ + "pxefile_addr_r=0x00800000\0" \ + "fdt_high=0xffffffffffffffff\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "ramdisk_addr_r=0x00900000\0" \ + BOOTENV
/* * Command line configuration.

On Fri, Aug 03, 2018 at 11:46:21AM +0200, Patrice Chotard wrote:
Add DISTRO_DEFAULT support to be able to boot on mmc by default on boot.
Signed-off-by: Patrice Chotard patrice.chotard@st.com
Applied to u-boot/master, thanks!
participants (2)
-
Patrice Chotard
-
Tom Rini