This converts the following to Kconfig: CONFIG_BOOTCOUNT_RAM Signed-off-by: Alex Kiernan <alex.kier...@gmail.com> Reviewed-by: Lukasz Majewski <lu...@denx.de> ---
Changes in v2: None README | 2 -- configs/km_kirkwood_128m16_defconfig | 1 + configs/km_kirkwood_defconfig | 1 + configs/km_kirkwood_pci_defconfig | 1 + configs/kmcoge5un_defconfig | 1 + configs/kmnusa_defconfig | 1 + configs/kmsugp1_defconfig | 1 + configs/kmsuv31_defconfig | 1 + configs/mgcoge3un_defconfig | 1 + configs/portl2_defconfig | 1 + configs/theadorable_debug_defconfig | 1 + drivers/bootcount/Kconfig | 6 ++++++ include/configs/km/km_arm.h | 2 -- include/configs/theadorable.h | 1 - scripts/config_whitelist.txt | 1 - 15 files changed, 16 insertions(+), 6 deletions(-) diff --git a/README b/README index da77484..d28a576 100644 --- a/README +++ b/README @@ -2309,8 +2309,6 @@ The following options need to be configured: - bootcount support: CONFIG_AT91SAM9XE enable special bootcounter support on at91sam9xe based boards. - CONFIG_BOOTCOUNT_RAM - enable support for the bootcounter in RAM CONFIG_BOOTCOUNT_I2C enable support for the bootcounter on an i2c (like RTC) device. CONFIG_SYS_I2C_RTC_ADDR = i2c chip address diff --git a/configs/km_kirkwood_128m16_defconfig b/configs/km_kirkwood_128m16_defconfig index 54c22a7..5f378f7 100644 --- a/configs/km_kirkwood_128m16_defconfig +++ b/configs/km_kirkwood_128m16_defconfig @@ -27,6 +27,7 @@ CONFIG_CMD_UBI=y # CONFIG_CMD_UBIFS is not set CONFIG_ENV_IS_IN_EEPROM=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_RAM=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/km_kirkwood_defconfig b/configs/km_kirkwood_defconfig index 20ea24b..ae20d24 100644 --- a/configs/km_kirkwood_defconfig +++ b/configs/km_kirkwood_defconfig @@ -27,6 +27,7 @@ CONFIG_CMD_UBI=y # CONFIG_CMD_UBIFS is not set CONFIG_ENV_IS_IN_EEPROM=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_RAM=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/km_kirkwood_pci_defconfig b/configs/km_kirkwood_pci_defconfig index 402610c..22bc6cd 100644 --- a/configs/km_kirkwood_pci_defconfig +++ b/configs/km_kirkwood_pci_defconfig @@ -27,6 +27,7 @@ CONFIG_CMD_UBI=y # CONFIG_CMD_UBIFS is not set CONFIG_ENV_IS_IN_EEPROM=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_RAM=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig index 72aee04..5c123a4 100644 --- a/configs/kmcoge5un_defconfig +++ b/configs/kmcoge5un_defconfig @@ -27,6 +27,7 @@ CONFIG_CMD_UBI=y # CONFIG_CMD_UBIFS is not set CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_RAM=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig index ac82780..4749ead 100644 --- a/configs/kmnusa_defconfig +++ b/configs/kmnusa_defconfig @@ -27,6 +27,7 @@ CONFIG_CMD_UBI=y # CONFIG_CMD_UBIFS is not set CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_RAM=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/kmsugp1_defconfig b/configs/kmsugp1_defconfig index af2c93e3..de68d41 100644 --- a/configs/kmsugp1_defconfig +++ b/configs/kmsugp1_defconfig @@ -27,6 +27,7 @@ CONFIG_CMD_UBI=y # CONFIG_CMD_UBIFS is not set CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_RAM=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/kmsuv31_defconfig b/configs/kmsuv31_defconfig index 09d75ab..892f212 100644 --- a/configs/kmsuv31_defconfig +++ b/configs/kmsuv31_defconfig @@ -27,6 +27,7 @@ CONFIG_CMD_UBI=y # CONFIG_CMD_UBIFS is not set CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_RAM=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/mgcoge3un_defconfig b/configs/mgcoge3un_defconfig index 3e90e70..89a83fd 100644 --- a/configs/mgcoge3un_defconfig +++ b/configs/mgcoge3un_defconfig @@ -27,6 +27,7 @@ CONFIG_CMD_UBI=y # CONFIG_CMD_UBIFS is not set CONFIG_ENV_IS_IN_EEPROM=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_RAM=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/portl2_defconfig b/configs/portl2_defconfig index 1c6dad9..8a6d996 100644 --- a/configs/portl2_defconfig +++ b/configs/portl2_defconfig @@ -27,6 +27,7 @@ CONFIG_CMD_UBI=y # CONFIG_CMD_UBIFS is not set CONFIG_ENV_IS_IN_EEPROM=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_RAM=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y diff --git a/configs/theadorable_debug_defconfig b/configs/theadorable_debug_defconfig index aa6e5e1..918447a 100644 --- a/configs/theadorable_debug_defconfig +++ b/configs/theadorable_debug_defconfig @@ -45,6 +45,7 @@ CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_OF_TRANSLATE=y CONFIG_SATA_MV=y CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_RAM=y CONFIG_FPGA_ALTERA=y CONFIG_DM_GPIO=y # CONFIG_MMC is not set diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig index 40a0755..eabfd13 100644 --- a/drivers/bootcount/Kconfig +++ b/drivers/bootcount/Kconfig @@ -40,6 +40,12 @@ config BOOTCOUNT_ENV So the Userspace Application must set the "upgrade_available" and "bootcount" variable to 0, if a boot was successfully. +config BOOTCOUNT_RAM + bool "Boot counter in RAM" + help + Store the bootcount in DRAM protected against against bit errors + due to short power loss or holding a system in RESET. + endchoice config SYS_BOOTCOUNT_SINGLEWORD diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index faa3d94..cc36a68 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -276,8 +276,6 @@ int get_scl(void); #define CONFIG_KM_RESERVED_PRAM 0x801000 /* address for the bootcount (taken from end of RAM) */ #define BOOTCOUNT_ADDR (CONFIG_KM_RESERVED_PRAM) -/* Use generic bootcount RAM driver */ -#define CONFIG_BOOTCOUNT_RAM /* enable POST tests */ #define CONFIG_POST (CONFIG_SYS_POST_MEM_REGIONS) diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h index 1504fd6..93ff65d 100644 --- a/include/configs/theadorable.h +++ b/include/configs/theadorable.h @@ -82,7 +82,6 @@ /* * Bootcounter */ -#define CONFIG_BOOTCOUNT_RAM /* Max size of RAM minus BOOTCOUNT_ADDR is the bootcounter address */ #define BOOTCOUNT_ADDR 0x1000 diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 1559a29..312d4bb 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -149,7 +149,6 @@ CONFIG_BOOM CONFIG_BOOTBLOCK CONFIG_BOOTCOUNT_ALEN CONFIG_BOOTCOUNT_I2C -CONFIG_BOOTCOUNT_RAM CONFIG_BOOTFILE CONFIG_BOOTMAPSZ CONFIG_BOOTMODE -- 2.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot