diff mbox series

[U-Boot,v3,06/11] Convert CONFIG_BOOTCOUNT_I2C to Kconfig

Message ID 1518796248-28270-7-git-send-email-alex.kiernan@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show
Series Convert bootcount drivers to Kconfig | expand

Commit Message

Alex Kiernan Feb. 16, 2018, 3:50 p.m. UTC
This converts the following to Kconfig:
  CONFIG_BOOTCOUNT_I2C

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

Changes in v3: None
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(-)

Comments

Tom Rini Feb. 25, 2018, 8:37 p.m. UTC | #1
On Fri, Feb 16, 2018 at 03:50:43PM +0000, Alex Kiernan wrote:

> This converts the following to Kconfig:
>   CONFIG_BOOTCOUNT_I2C
> 
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> Reviewed-by: Lukasz Majewski <lukma@denx.de>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/README b/README
index 474632c..2008483 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 07951f2..c47156b 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