summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Beckett <bob.beckett@collabora.com>2020-01-31 15:07:55 +0200
committerStefano Babic <sbabic@denx.de>2020-02-09 21:47:20 +0100
commit41613a7a58fd2e2745ea32c00325d7c0dff7cc8c (patch)
tree31fb2fca7122ad7417dfb7582cab3e68e7cbd75a
parent1dec7fa79716adb478052798ceb0cf5c3a412f61 (diff)
board: ge: bx50v3: add i2c eeprom bootcount storage
Add bootcount node, linking to i2c eeprom "bootcount" partitions for storage. Enable i2c eeprom bootcount backend storage. Enable bootcount command and use it for failbootcmd. Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
-rw-r--r--arch/arm/dts/imx6q-bx50v3-uboot.dtsi7
-rw-r--r--configs/ge_bx50v3_defconfig6
-rw-r--r--include/configs/ge_bx50v3.h4
3 files changed, 10 insertions, 7 deletions
diff --git a/arch/arm/dts/imx6q-bx50v3-uboot.dtsi b/arch/arm/dts/imx6q-bx50v3-uboot.dtsi
index 99d409db35..77115a7a9a 100644
--- a/arch/arm/dts/imx6q-bx50v3-uboot.dtsi
+++ b/arch/arm/dts/imx6q-bx50v3-uboot.dtsi
@@ -5,6 +5,11 @@
*/
/ {
+ bootcount {
+ compatible = "u-boot,bootcount-i2c-eeprom";
+ i2c-eeprom = <&bootcount>;
+ };
+
wdt-reboot {
compatible = "wdt-reboot";
wdt = <&wdog1>;
@@ -20,7 +25,7 @@
size = <1022>;
};
- bootcount {
+ bootcount: bootcount {
offset = <1022>;
size = <2>;
};
diff --git a/configs/ge_bx50v3_defconfig b/configs/ge_bx50v3_defconfig
index 746bc25742..b19861c89c 100644
--- a/configs/ge_bx50v3_defconfig
+++ b/configs/ge_bx50v3_defconfig
@@ -8,7 +8,6 @@ CONFIG_ENV_SECT_SIZE=0x10000
CONFIG_ENV_OFFSET=0xC0000
CONFIG_DM_GPIO=y
CONFIG_BOOTCOUNT_BOOTLIMIT=10
-CONFIG_SYS_BOOTCOUNT_ADDR=0x7000A000
CONFIG_NR_DRAM_BANKS=1
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_FIT=y
@@ -30,6 +29,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_PCI=y
# CONFIG_CMD_NFS is not set
+CONFIG_CMD_BOOTCOUNT=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
@@ -45,8 +45,8 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM=y
CONFIG_BOOTCOUNT_LIMIT=y
-CONFIG_BOOTCOUNT_EXT=y
-CONFIG_SYS_BOOTCOUNT_EXT_DEVPART="1:5"
+CONFIG_DM_BOOTCOUNT=y
+CONFIG_DM_BOOTCOUNT_I2C_EEPROM=y
CONFIG_DM_MMC=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MXC=y
diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h
index b8b1ec704e..b9227fc2fe 100644
--- a/include/configs/ge_bx50v3.h
+++ b/include/configs/ge_bx50v3.h
@@ -109,9 +109,7 @@
"setcurs 5 4; " \
"lcdputs \"Monitor failed to start. " \
"Try again, or contact GE Service for support.\"; " \
- "mw.b 0x7000A000 0xbc; " \
- "mw.b 0x7000A001 0x00; " \
- "ext4write ${dev} ${devnum}:5 0x7000A000 /boot/failures 2\0" \
+ "bootcount reset; \0" \
"altbootcmd=" \
"run doquiet; " \
"setenv partnum 1; run hasfirstboot || setenv partnum 2; " \