aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-05-28 14:11:06 -0400
committerTom Rini <trini@konsulko.com>2021-05-28 14:11:06 -0400
commitffd810487ec2ff6095edf3f3d058d7ed6eb85ff3 (patch)
treedc6cdd1f626e682840b22699ddc9b3ce0d0f319c
parentd862ddb8d783202dcab3601cdbc3775509a70597 (diff)
parent7bda7cee2dfc824eccc6a76ea531fc90b4f7923f (diff)
downloadu-boot-WIP/28May2021.zip
u-boot-WIP/28May2021.tar.gz
u-boot-WIP/28May2021.tar.bz2
Merge tag 'u-boot-stm32-20210528' of https://source.denx.de/u-boot/custodians/u-boot-stmWIP/28May2021
- DFU: MTD: fix for lock support - reset: stm32: fix bank bank and offset computation - enable UNZIP config in several stm32mp defconfig
-rw-r--r--arch/arm/dts/stm32mp157c-odyssey-som.dtsi4
-rw-r--r--board/dhelectronics/dh_stm32mp1/MAINTAINERS1
-rw-r--r--board/dhelectronics/dh_stm32mp1/board.c11
-rw-r--r--configs/stm32mp15_basic_defconfig1
-rw-r--r--configs/stm32mp15_dhcom_basic_defconfig1
-rw-r--r--configs/stm32mp15_dhcor_basic_defconfig1
-rw-r--r--configs/stm32mp15_trusted_defconfig1
-rw-r--r--drivers/dfu/dfu_mtd.c4
-rw-r--r--drivers/reset/stm32-reset.c8
9 files changed, 26 insertions, 6 deletions
diff --git a/arch/arm/dts/stm32mp157c-odyssey-som.dtsi b/arch/arm/dts/stm32mp157c-odyssey-som.dtsi
index 83ff2e7..e367a31 100644
--- a/arch/arm/dts/stm32mp157c-odyssey-som.dtsi
+++ b/arch/arm/dts/stm32mp157c-odyssey-som.dtsi
@@ -258,6 +258,10 @@
status = "okay";
};
+&rng1 {
+ status = "okay";
+};
+
&sdmmc2 {
pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdmmc2_b4_pins_a>;
diff --git a/board/dhelectronics/dh_stm32mp1/MAINTAINERS b/board/dhelectronics/dh_stm32mp1/MAINTAINERS
index fd70131..9ce21c3 100644
--- a/board/dhelectronics/dh_stm32mp1/MAINTAINERS
+++ b/board/dhelectronics/dh_stm32mp1/MAINTAINERS
@@ -1,5 +1,6 @@
DH_STM32MP1_PDK2 BOARD
M: Marek Vasut <marex@denx.de>
+L: u-boot@dh-electronics.com
S: Maintained
F: arch/arm/dts/stm32mp15xx-dhcom*
F: board/dhelectronics/dh_stm32mp1/
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index 49b12c4..ac1af71 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -86,6 +86,8 @@ DECLARE_GLOBAL_DATA_PTR;
#define KS_CCR_EEPROM BIT(9)
#define KS_BE0 BIT(12)
#define KS_BE1 BIT(13)
+#define KS_CIDER 0xC0
+#define CIDER_ID 0x8870
int setup_mac_address(void)
{
@@ -123,11 +125,18 @@ int setup_mac_address(void)
* is present. If EEPROM is present, it must contain valid
* MAC address.
*/
- u32 reg, ccr;
+ u32 reg, cider, ccr;
reg = fdt_get_base_address(gd->fdt_blob, off);
if (!reg)
goto out_set_ethaddr;
+ writew(KS_BE0 | KS_BE1 | KS_CIDER, reg + 2);
+ cider = readw(reg);
+ if ((cider & 0xfff0) != CIDER_ID) {
+ skip_eth1 = true;
+ goto out_set_ethaddr;
+ }
+
writew(KS_BE0 | KS_BE1 | KS_CCR, reg + 2);
ccr = readw(reg);
if (ccr & KS_CCR_EEPROM) {
diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig
index 0d4c231..3ff46f7 100644
--- a/configs/stm32mp15_basic_defconfig
+++ b/configs/stm32mp15_basic_defconfig
@@ -38,6 +38,7 @@ CONFIG_CMD_ERASEENV=y
CONFIG_CMD_NVEDIT_EFI=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
CONFIG_CMD_ADC=y
CONFIG_CMD_CLK=y
CONFIG_CMD_DFU=y
diff --git a/configs/stm32mp15_dhcom_basic_defconfig b/configs/stm32mp15_dhcom_basic_defconfig
index 3e62a58..a127506 100644
--- a/configs/stm32mp15_dhcom_basic_defconfig
+++ b/configs/stm32mp15_dhcom_basic_defconfig
@@ -36,6 +36,7 @@ CONFIG_SYS_PROMPT="STM32MP> "
CONFIG_CMD_EEPROM=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
CONFIG_CMD_ADC=y
CONFIG_CMD_CLK=y
CONFIG_CMD_DFU=y
diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig
index c1d3331..40d06f4 100644
--- a/configs/stm32mp15_dhcor_basic_defconfig
+++ b/configs/stm32mp15_dhcor_basic_defconfig
@@ -34,6 +34,7 @@ CONFIG_SYS_PROMPT="STM32MP> "
CONFIG_CMD_EEPROM=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
CONFIG_CMD_ADC=y
CONFIG_CMD_CLK=y
CONFIG_CMD_DFU=y
diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
index d5fc4d0..afbf721 100644
--- a/configs/stm32mp15_trusted_defconfig
+++ b/configs/stm32mp15_trusted_defconfig
@@ -21,6 +21,7 @@ CONFIG_CMD_ERASEENV=y
CONFIG_CMD_NVEDIT_EFI=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_UNZIP=y
CONFIG_CMD_ADC=y
CONFIG_CMD_CLK=y
CONFIG_CMD_DFU=y
diff --git a/drivers/dfu/dfu_mtd.c b/drivers/dfu/dfu_mtd.c
index ca67585..ec40b8f 100644
--- a/drivers/dfu/dfu_mtd.c
+++ b/drivers/dfu/dfu_mtd.c
@@ -150,7 +150,9 @@ static int mtd_block_op(enum dfu_op op, struct dfu_entity *dfu,
/* Write done, lock again */
debug("Locking the mtd device\n");
ret = mtd_lock(mtd, lock_ofs, lock_len);
- if (ret && ret != -EOPNOTSUPP)
+ if (ret == -EOPNOTSUPP)
+ ret = 0;
+ else if (ret)
printf("MTD device lock failed\n");
}
return ret;
diff --git a/drivers/reset/stm32-reset.c b/drivers/reset/stm32-reset.c
index daa2e47..bbc6b13 100644
--- a/drivers/reset/stm32-reset.c
+++ b/drivers/reset/stm32-reset.c
@@ -40,8 +40,8 @@ static int stm32_reset_free(struct reset_ctl *reset_ctl)
static int stm32_reset_assert(struct reset_ctl *reset_ctl)
{
struct stm32_reset_priv *priv = dev_get_priv(reset_ctl->dev);
- int bank = (reset_ctl->id / BITS_PER_LONG) * 4;
- int offset = reset_ctl->id % BITS_PER_LONG;
+ int bank = (reset_ctl->id / (sizeof(u32) * BITS_PER_BYTE)) * 4;
+ int offset = reset_ctl->id % (sizeof(u32) * BITS_PER_BYTE);
dev_dbg(reset_ctl->dev, "reset id = %ld bank = %d offset = %d)\n",
reset_ctl->id, bank, offset);
@@ -61,8 +61,8 @@ static int stm32_reset_assert(struct reset_ctl *reset_ctl)
static int stm32_reset_deassert(struct reset_ctl *reset_ctl)
{
struct stm32_reset_priv *priv = dev_get_priv(reset_ctl->dev);
- int bank = (reset_ctl->id / BITS_PER_LONG) * 4;
- int offset = reset_ctl->id % BITS_PER_LONG;
+ int bank = (reset_ctl->id / (sizeof(u32) * BITS_PER_BYTE)) * 4;
+ int offset = reset_ctl->id % (sizeof(u32) * BITS_PER_BYTE);
dev_dbg(reset_ctl->dev, "reset id = %ld bank = %d offset = %d)\n",
reset_ctl->id, bank, offset);