[U-Boot] [PATCH 6/8] Convert CONFIG_BOOTCOUNT_I2C to Kconfig

Lukasz Majewski lukma at denx.de
Sun Feb 11 19:05:25 UTC 2018


On Sun, 11 Feb 2018 12:06:51 +0000
Alex Kiernan <alex.kiernan at gmail.com> wrote:

> This converts the following to Kconfig:
>   CONFIG_BOOTCOUNT_I2C
> 
> Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
> ---
> 
>  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 20637e0..a7b0890 100644
> --- a/README
> +++ b/README
> @@ -2321,12 +2321,6 @@ The following options need to be configured:
>  		enable special bootcounter support on at91sam9xe
> based boards. CONFIG_SOC_DA8XX
>  		enable special bootcounter support on da850 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 3e67c55..eb931ce 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 529cbf1..fe39221 100644
> --- a/include/configs/ids8313.h
> +++ b/include/configs/ids8313.h
> @@ -516,7 +516,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 487c790..aa1d51f 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_BOOTCOUNT_LIMIT
>  CONFIG_BOOTFILE
>  CONFIG_BOOTMAPSZ

Reviewed-by: Lukasz Majewski <lukma at denx.de>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180211/1a01812c/attachment.sig>


More information about the U-Boot mailing list