diff options
Diffstat (limited to 'board/st')
-rw-r--r-- | board/st/common/stm32mp_dfu.c | 9 | ||||
-rw-r--r-- | board/st/common/stm32mp_mtdparts.c | 16 | ||||
-rw-r--r-- | board/st/stm32f429-discovery/stm32f429-discovery.c | 5 | ||||
-rw-r--r-- | board/st/stm32f429-evaluation/stm32f429-evaluation.c | 5 | ||||
-rw-r--r-- | board/st/stm32f469-discovery/stm32f469-discovery.c | 5 | ||||
-rw-r--r-- | board/st/stm32f746-disco/stm32f746-disco.c | 5 | ||||
-rw-r--r-- | board/st/stm32h743-disco/stm32h743-disco.c | 10 | ||||
-rw-r--r-- | board/st/stm32h743-eval/stm32h743-eval.c | 10 | ||||
-rw-r--r-- | board/st/stm32mp1/stm32mp1.c | 8 |
9 files changed, 17 insertions, 56 deletions
diff --git a/board/st/common/stm32mp_dfu.c b/board/st/common/stm32mp_dfu.c index 5633a6cb95..00d1fb8f59 100644 --- a/board/st/common/stm32mp_dfu.c +++ b/board/st/common/stm32mp_dfu.c @@ -143,7 +143,8 @@ void set_dfu_alt_info(char *interface, char *devstr) board_get_alt_info_mtd(mtd, buf); } - if (IS_ENABLED(CONFIG_DFU_VIRT)) { + if (IS_ENABLED(CONFIG_DFU_VIRT) && + IS_ENABLED(CMD_STM32PROG_USB)) { strncat(buf, "&virt 0=OTP", DFU_ALT_BUF_LEN); if (IS_ENABLED(CONFIG_PMIC_STPMIC1)) @@ -217,7 +218,7 @@ int dfu_read_medium_virt(struct dfu_entity *dfu, u64 offset, return dfu_pmic_read(offset, buf, len); } - if (CONFIG_IS_ENABLED(CMD_STM32PROG) && + if (IS_ENABLED(CONFIG_CMD_STM32PROG_USB) && dfu->data.virt.dev_num >= STM32PROG_VIRT_FIRST_DEV_NUM) return stm32prog_read_medium_virt(dfu, offset, buf, len); @@ -228,7 +229,7 @@ int dfu_read_medium_virt(struct dfu_entity *dfu, u64 offset, int dfu_write_medium_virt(struct dfu_entity *dfu, u64 offset, void *buf, long *len) { - if (CONFIG_IS_ENABLED(CMD_STM32PROG) && + if (IS_ENABLED(CONFIG_CMD_STM32PROG_USB) && dfu->data.virt.dev_num >= STM32PROG_VIRT_FIRST_DEV_NUM) return stm32prog_write_medium_virt(dfu, offset, buf, len); @@ -237,7 +238,7 @@ int dfu_write_medium_virt(struct dfu_entity *dfu, u64 offset, int __weak dfu_get_medium_size_virt(struct dfu_entity *dfu, u64 *size) { - if (CONFIG_IS_ENABLED(CMD_STM32PROG) && + if (IS_ENABLED(CONFIG_CMD_STM32PROG_USB) && dfu->data.virt.dev_num >= STM32PROG_VIRT_FIRST_DEV_NUM) return stm32prog_get_medium_size_virt(dfu, size); diff --git a/board/st/common/stm32mp_mtdparts.c b/board/st/common/stm32mp_mtdparts.c index 69eb10844d..f074fc189d 100644 --- a/board/st/common/stm32mp_mtdparts.c +++ b/board/st/common/stm32mp_mtdparts.c @@ -122,28 +122,24 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts) log_debug("mtd device = %s\n", dev->name); } - if (nor || nand) { + if (nand) { mtd = get_mtd_device_nm("nand0"); if (!IS_ERR_OR_NULL(mtd)) { - const char *mtd_boot = CONFIG_MTDPARTS_NAND0_BOOT; const char *mtd_tee = CONFIG_MTDPARTS_NAND0_TEE; - board_set_mtdparts("nand0", ids, parts, - !nor ? mtd_boot : NULL, + CONFIG_MTDPARTS_NAND0_BOOT, !nor && tee ? mtd_tee : NULL, "-(UBI)"); put_mtd_device(mtd); } } - if (nor || spinand) { + if (spinand) { mtd = get_mtd_device_nm("spi-nand0"); if (!IS_ERR_OR_NULL(mtd)) { - const char *mtd_boot = CONFIG_MTDPARTS_SPINAND0_BOOT; const char *mtd_tee = CONFIG_MTDPARTS_SPINAND0_TEE; - board_set_mtdparts("spi-nand0", ids, parts, - !nor ? mtd_boot : NULL, + CONFIG_MTDPARTS_SPINAND0_BOOT, !nor && tee ? mtd_tee : NULL, "-(UBI)"); put_mtd_device(mtd); @@ -152,11 +148,9 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts) if (nor) { if (!uclass_get_device(UCLASS_SPI_FLASH, 0, &dev)) { - const char *mtd_boot = CONFIG_MTDPARTS_NOR0_BOOT; const char *mtd_tee = CONFIG_MTDPARTS_NOR0_TEE; - board_set_mtdparts("nor0", ids, parts, - mtd_boot, + CONFIG_MTDPARTS_NOR0_BOOT, tee ? mtd_tee : NULL, "-(nor_user)"); } diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c index 9d8fc9f5a2..46fcf907fc 100644 --- a/board/st/stm32f429-discovery/stm32f429-discovery.c +++ b/board/st/stm32f429-discovery/stm32f429-discovery.c @@ -51,11 +51,6 @@ u32 get_board_rev(void) return 0; } -int board_early_init_f(void) -{ - return 0; -} - int board_init(void) { gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100; diff --git a/board/st/stm32f429-evaluation/stm32f429-evaluation.c b/board/st/stm32f429-evaluation/stm32f429-evaluation.c index 96b4c25726..3b6df1f3ab 100644 --- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c +++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c @@ -45,11 +45,6 @@ u32 get_board_rev(void) return 0; } -int board_early_init_f(void) -{ - return 0; -} - int board_init(void) { gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100; diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c index 742fd67b98..c5df9b0d9c 100644 --- a/board/st/stm32f469-discovery/stm32f469-discovery.c +++ b/board/st/stm32f469-discovery/stm32f469-discovery.c @@ -45,11 +45,6 @@ u32 get_board_rev(void) return 0; } -int board_early_init_f(void) -{ - return 0; -} - int board_init(void) { gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100; diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c index 40450ca914..143cc6e1ea 100644 --- a/board/st/stm32f746-disco/stm32f746-disco.c +++ b/board/st/stm32f746-disco/stm32f746-disco.c @@ -48,11 +48,6 @@ int dram_init_banksize(void) return fdtdec_setup_memory_banksize(); } -int board_early_init_f(void) -{ - return 0; -} - #ifdef CONFIG_SPL_BUILD #ifdef CONFIG_SPL_OS_BOOT int spl_start_uboot(void) diff --git a/board/st/stm32h743-disco/stm32h743-disco.c b/board/st/stm32h743-disco/stm32h743-disco.c index 405836aba3..4091d5f9fd 100644 --- a/board/st/stm32h743-disco/stm32h743-disco.c +++ b/board/st/stm32h743-disco/stm32h743-disco.c @@ -36,21 +36,11 @@ int dram_init_banksize(void) return 0; } -int board_early_init_f(void) -{ - return 0; -} - u32 get_board_rev(void) { return 0; } -int board_late_init(void) -{ - return 0; -} - int board_init(void) { gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100; diff --git a/board/st/stm32h743-eval/stm32h743-eval.c b/board/st/stm32h743-eval/stm32h743-eval.c index 405836aba3..4091d5f9fd 100644 --- a/board/st/stm32h743-eval/stm32h743-eval.c +++ b/board/st/stm32h743-eval/stm32h743-eval.c @@ -36,21 +36,11 @@ int dram_init_banksize(void) return 0; } -int board_early_init_f(void) -{ - return 0; -} - u32 get_board_rev(void) { return 0; } -int board_late_init(void) -{ - return 0; -} - int board_init(void) { gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100; diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index ab85d8ba68..759181fb5d 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -862,8 +862,14 @@ const char *env_ext4_get_dev_part(void) int mmc_get_env_dev(void) { - u32 bootmode = get_bootmode(); + u32 bootmode; + + if (CONFIG_SYS_MMC_ENV_DEV >= 0) + return CONFIG_SYS_MMC_ENV_DEV; + + bootmode = get_bootmode(); + /* use boot instance to select the correct mmc device identifier */ return (bootmode & TAMP_BOOT_INSTANCE_MASK) - 1; } |