[U-Boot] [PATCH v2 06/13] Convert CONFIG_BOOTCOUNT_I2C to Kconfig

Alex Kiernan alex.kiernan at gmail.com
Thu Feb 15 13:55:19 UTC 2018


This converts the following to Kconfig:
  CONFIG_BOOTCOUNT_I2C

Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
Reviewed-by: Lukasz Majewski <lukma at denx.de>
---

Changes in v2: None

 README                       | 6 ------
 configs/ids8313_defconfig    | 1 +
 drivers/bootcount/Kconfig    | 9 +++++++++
 include/configs/ids8313.h    | 1 -
 scripts/config_whitelist.txt | 1 -
 5 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/README b/README
index d28a576..0157f0b 100644
--- a/README
+++ b/README
@@ -2309,12 +2309,6 @@ The following options need to be configured:
 - bootcount support:
 		CONFIG_AT91SAM9XE
 		enable special bootcounter support on at91sam9xe based boards.
-		CONFIG_BOOTCOUNT_I2C
-		enable support for the bootcounter on an i2c (like RTC) device.
-			CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
-			CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for
-						    the bootcounter.
-			CONFIG_BOOTCOUNT_ALEN = address len
 		CONFIG_BOOTCOUNT_EXT
 		enable support for the bootcounter in EXT filesystem
 			CONFIG_SYS_BOOTCOUNT_ADDR = RAM address used for read
diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig
index b754758..ca14815 100644
--- a/configs/ids8313_defconfig
+++ b/configs/ids8313_defconfig
@@ -30,6 +30,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff800000.flash,nand0=e1000000.flash"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:7m(dum),768k(BOOT-BIN),128k(BOOT-ENV),128k(BOOT-REDENV);e1000000.flash:-(ubi)"
 CONFIG_CMD_UBI=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_I2C=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHYLIB=y
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index eabfd13..8c19ae6 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -46,6 +46,15 @@ config BOOTCOUNT_RAM
 	  Store the bootcount in DRAM protected against against bit errors
 	  due to short power loss or holding a system in RESET.
 
+config BOOTCOUNT_I2C
+	bool "Boot counter on I2C device"
+	help
+	  Enable support for the bootcounter on an i2c (like RTC) device.
+	  CONFIG_SYS_I2C_RTC_ADDR = i2c chip address
+	  CONFIG_SYS_BOOTCOUNT_ADDR = i2c addr which is used for
+	                              the bootcounter.
+	  CONFIG_BOOTCOUNT_ALEN = address len
+
 endchoice
 
 config SYS_BOOTCOUNT_SINGLEWORD
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 628e0a2..099d7bd 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -515,7 +515,6 @@
 #define CONFIG_MTD_PARTITIONS
 
 /* bootcount support */
-#define CONFIG_BOOTCOUNT_I2C
 #define CONFIG_BOOTCOUNT_ALEN	1
 #define CONFIG_SYS_BOOTCOUNT_ADDR	0x9
 
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 312d4bb..a8380c6 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -148,7 +148,6 @@ CONFIG_BOOGER
 CONFIG_BOOM
 CONFIG_BOOTBLOCK
 CONFIG_BOOTCOUNT_ALEN
-CONFIG_BOOTCOUNT_I2C
 CONFIG_BOOTFILE
 CONFIG_BOOTMAPSZ
 CONFIG_BOOTMODE
-- 
2.7.4



More information about the U-Boot mailing list