aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-03-15 08:43:19 -0400
committerTom Rini <trini@konsulko.com>2021-03-15 08:43:19 -0400
commite8a10a02bd9ce6988942c393373d89dee5704c59 (patch)
tree34ea975ab67f9b7d337fc0fc931f0ae069e5d6aa /board
parentad7e1c7c6e2bde2b369f10984d41d6b1833453fb (diff)
parentb076cbe8aa2b3c29a3acc89fbea9fb7676f15fa7 (diff)
downloadu-boot-e8a10a02bd9ce6988942c393373d89dee5704c59.zip
u-boot-e8a10a02bd9ce6988942c393373d89dee5704c59.tar.gz
u-boot-e8a10a02bd9ce6988942c393373d89dee5704c59.tar.bz2
Merge tag 'u-boot-stm32-20210312' of https://source.denx.de/u-boot/custodians/u-boot-stm
- Add WATCHDOG_RESET() in MTD framework and STM32 QSPI driver - stm32mp1_trusted_defconfig rely on SCMI support - Remove the nand MTD configuration for NOR boot in stm32mp1 board - STM32programmer update - Bsec: manage clock when present in device tree - stm32mp15: move bootdelay configuration in defconfig - Update for stm32 dsi and dw_mipi_dsi - STM32 MCU's cleanup - Fix compilation issue depending on SYS_DCACHE_OFF and SYS_ICACHE_OFF flags - Update stm32mp1 doc
Diffstat (limited to 'board')
-rw-r--r--board/st/common/stm32mp_dfu.c9
-rw-r--r--board/st/common/stm32mp_mtdparts.c16
-rw-r--r--board/st/stm32f429-discovery/stm32f429-discovery.c5
-rw-r--r--board/st/stm32f429-evaluation/stm32f429-evaluation.c5
-rw-r--r--board/st/stm32f469-discovery/stm32f469-discovery.c5
-rw-r--r--board/st/stm32f746-disco/stm32f746-disco.c5
-rw-r--r--board/st/stm32h743-disco/stm32h743-disco.c10
-rw-r--r--board/st/stm32h743-eval/stm32h743-eval.c10
-rw-r--r--board/st/stm32mp1/stm32mp1.c8
9 files changed, 17 insertions, 56 deletions
diff --git a/board/st/common/stm32mp_dfu.c b/board/st/common/stm32mp_dfu.c
index 5633a6c..00d1fb8 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 69eb108..f074fc1 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 9d8fc9f..46fcf90 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 96b4c25..3b6df1f 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 742fd67..c5df9b0 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 40450ca..143cc6e 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 405836a..4091d5f 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 405836a..4091d5f 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 ab85d8b..759181f 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;
}