]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
configs: icorem6: Use imx6 cratch register for bootcount
authorJagan Teki <jagan@amarulasolutions.com>
Thu, 21 Mar 2019 08:35:53 +0000 (14:05 +0530)
committerStefano Babic <sbabic@denx.de>
Sun, 31 Mar 2019 18:12:37 +0000 (20:12 +0200)
SRAM address used for bootcount on exiting code is erasing
previous count value when system reset from Linux. So use
the dedicated imx6 scratch register, GPR2 to preserve the
contents even if the system reset from Linux.

Fixes: 4eb9aa39350e ("configs: imx6qdl_icore_mmc: Enable watchdog and bootcounter")
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Shyam Saini <shyam.saini@amarulasolutions.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
configs/imx6qdl_icore_mmc_defconfig

index 68ad1c6d2028c3d0dadfed2f1a1026046c994cc4..24e99718e63c9f4d5629f6d6309bef1eb6577cf2 100644 (file)
@@ -16,7 +16,7 @@ CONFIG_CMD_BOOTCOUNT=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y
-CONFIG_SYS_BOOTCOUNT_ADDR=0x00900000
+CONFIG_SYS_BOOTCOUNT_ADDR=0x020D8024
 CONFIG_SYS_BOOTCOUNT_MAGIC=0x0B01C041
 CONFIG_IMX_WATCHDOG=y
 CONFIG_DEBUG_UART=y