Convert CONFIG_SYS_BOOTCOUNT_LE et al to Kconfig
authorTom Rini <trini@konsulko.com>
Sat, 25 Jun 2022 15:02:49 +0000 (11:02 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 7 Jul 2022 18:01:09 +0000 (14:01 -0400)
This converts the following to Kconfig:
   CONFIG_SYS_BOOTCOUNT_LE
   CONFIG_SYS_BOOTCOUNT_BE

Signed-off-by: Tom Rini <trini@konsulko.com>
32 files changed:
configs/am335x_boneblack_vboot_defconfig
configs/am335x_evm_defconfig
configs/am335x_evm_spiboot_defconfig
configs/am335x_hs_evm_defconfig
configs/am335x_hs_evm_uart_defconfig
configs/am335x_sl50_defconfig
configs/chiliboard_defconfig
configs/dh_imx6_defconfig
configs/kmcent2_defconfig
configs/kmcoge5ne_defconfig
configs/kmeter1_defconfig
configs/kmsupx5_defconfig
configs/kmtegr1_defconfig
configs/pg_wcom_expu1_defconfig
configs/pg_wcom_expu1_update_defconfig
configs/pg_wcom_seli8_defconfig
configs/pg_wcom_seli8_update_defconfig
configs/socfpga_is1_defconfig
configs/socfpga_sr1500_defconfig
configs/tuge1_defconfig
drivers/bootcount/Kconfig
include/bootcount.h
include/configs/am335x_evm.h
include/configs/am335x_guardian.h
include/configs/am335x_sl50.h
include/configs/chiliboard.h
include/configs/dh_imx6.h
include/configs/highbank.h
include/configs/km/pg-wcom-ls102xa.h
include/configs/socfpga_is1.h
include/configs/socfpga_sr1500.h
include/configs/tqma6_wru4.h

index b5ba2cc..ab74bdb 100644 (file)
@@ -54,6 +54,7 @@ CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 # CONFIG_SPL_BLK is not set
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
index c7dbd3c..de13af6 100644 (file)
@@ -63,6 +63,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_CLK=y
 CONFIG_CLK_CDCE9XX=y
 CONFIG_CLK_TI_CTRL=y
index 00e80a8..bcead2e 100644 (file)
@@ -53,6 +53,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_CLK=y
 CONFIG_CLK_CDCE9XX=y
 CONFIG_DFU_TFTP=y
index ef0a098..4d0ee46 100644 (file)
@@ -51,6 +51,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_CLK=y
 CONFIG_CLK_CDCE9XX=y
 CONFIG_DFU_MMC=y
index d7ea5a3..9a86e86 100644 (file)
@@ -52,6 +52,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_CLK=y
 CONFIG_CLK_CDCE9XX=y
 CONFIG_DFU_MMC=y
index 1338190..8808e1f 100644 (file)
@@ -68,6 +68,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_EEPROM_ADDR=0x50
index 849d751..0556906 100644 (file)
@@ -54,6 +54,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RETRY_COUNT=10
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_MISC=y
index 7cb4f41..051816f 100644 (file)
@@ -69,6 +69,7 @@ CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
 CONFIG_LBA48=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_SYS_DFU_DATA_BUF_SIZE=0x1000000
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MXC=y
index bcecb88..ee900f5 100644 (file)
@@ -57,6 +57,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="fm1-mac5"
 CONFIG_DM=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_CHIP_SELECTS_PER_CTRL=2
index 924f9ac..3b73fbc 100644 (file)
@@ -200,6 +200,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_DM_BOOTCOUNT=y
 CONFIG_BOOTCOUNT_MEM=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xF0001001
 CONFIG_SYS_OR0_PRELIM=0xF0000E55
index dfa2500..310278d 100644 (file)
@@ -169,6 +169,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_DM_BOOTCOUNT=y
 CONFIG_BOOTCOUNT_MEM=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xF0001001
 CONFIG_SYS_OR0_PRELIM=0xF0000E55
index 221335d..027bb73 100644 (file)
@@ -160,6 +160,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_DM_BOOTCOUNT=y
 CONFIG_BOOTCOUNT_MEM=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xF0001001
 CONFIG_SYS_OR0_PRELIM=0xF0000E55
index f1791a0..19cb1e8 100644 (file)
@@ -161,6 +161,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_DM_BOOTCOUNT=y
 CONFIG_BOOTCOUNT_MEM=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xF0001001
 CONFIG_SYS_OR0_PRELIM=0xF0000E55
index 4b205e1..a84e0cd 100644 (file)
@@ -70,6 +70,7 @@ CONFIG_ETHPRIME="ethernet@2d90000"
 CONFIG_VERSION_VARIABLE=y
 CONFIG_DM=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_DDR_CLK_FREQ=50000000
 CONFIG_SYS_FSL_DDR3=y
 CONFIG_SYS_I2C_LEGACY=y
index 98f3dcc..f04c3ac 100644 (file)
@@ -68,6 +68,7 @@ CONFIG_ETHPRIME="ethernet@2d90000"
 CONFIG_VERSION_VARIABLE=y
 CONFIG_DM=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_DDR_CLK_FREQ=50000000
 CONFIG_SYS_FSL_DDR3=y
 CONFIG_SYS_I2C_LEGACY=y
index ce3e7eb..4380d88 100644 (file)
@@ -70,6 +70,7 @@ CONFIG_ETHPRIME="ethernet@2d90000"
 CONFIG_VERSION_VARIABLE=y
 CONFIG_DM=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_DDR_CLK_FREQ=50000000
 CONFIG_SYS_FSL_DDR3=y
 CONFIG_SYS_I2C_LEGACY=y
index 623afa3..ca05e25 100644 (file)
@@ -68,6 +68,7 @@ CONFIG_ETHPRIME="ethernet@2d90000"
 CONFIG_VERSION_VARIABLE=y
 CONFIG_DM=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_DDR_CLK_FREQ=50000000
 CONFIG_SYS_FSL_DDR3=y
 CONFIG_SYS_I2C_LEGACY=y
index c3b6368..958adfe 100644 (file)
@@ -52,6 +52,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_ARP_TIMEOUT=500
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_DWAPB_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DW=y
index 53d6b82..def2ee8 100644 (file)
@@ -56,6 +56,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_DWAPB_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DW=y
index 3c2a7a3..1bd48cb 100644 (file)
@@ -160,6 +160,7 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_DM_BOOTCOUNT=y
 CONFIG_BOOTCOUNT_MEM=y
+CONFIG_SYS_BOOTCOUNT_BE=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xF0001001
 CONFIG_SYS_OR0_PRELIM=0xF0000E55
index 66ce4cc..e918f74 100644 (file)
@@ -237,4 +237,15 @@ config SYS_BOOTCOUNT_MAGIC
        help
          Set the magic value used for the boot counter.
 
+choice
+       prompt "Endianness of bootcount accessors"
+       default SYS_BOOTCOUNT_LE
+
+config SYS_BOOTCOUNT_LE
+       bool "Little endian accessors"
+
+config SYS_BOOTCOUNT_BE
+       bool "Big endian accessors"
+
+endchoice
 endif
index fccee7e..bfa5d46 100644 (file)
@@ -72,14 +72,6 @@ ulong bootcount_load(void);
 
 #if defined(CONFIG_SPL_BOOTCOUNT_LIMIT) || defined(CONFIG_TPL_BOOTCOUNT_LIMIT) || defined(CONFIG_BOOTCOUNT_LIMIT)
 
-#if !defined(CONFIG_SYS_BOOTCOUNT_LE) && !defined(CONFIG_SYS_BOOTCOUNT_BE)
-# if __BYTE_ORDER == __LITTLE_ENDIAN
-#  define CONFIG_SYS_BOOTCOUNT_LE
-# else
-#  define CONFIG_SYS_BOOTCOUNT_BE
-# endif
-#endif
-
 #ifdef CONFIG_SYS_BOOTCOUNT_LE
 static inline void raw_bootcount_store(volatile u32 *addr, u32 data)
 {
index 754bcc3..f0a9794 100644 (file)
 /* PMIC support */
 #define CONFIG_POWER_TPS65910
 
-/* SPL */
-#ifndef CONFIG_NOR_BOOT
-/* Bootcount using the RTC block */
-#define CONFIG_SYS_BOOTCOUNT_BE
-
-/* USB gadget RNDIS */
-#endif
-
 #ifdef CONFIG_MTD_RAW_NAND
 /* NAND: device related configs */
 /* NAND: driver related configs */
index 93fea95..356c21a 100644 (file)
@@ -93,9 +93,6 @@
 #define CONFIG_SYS_NS16550_COM5                0x481a8000      /* UART4 */
 #define CONFIG_SYS_NS16550_COM6                0x481aa000      /* UART5 */
 
-/* Bootcount using the RTC block */
-#define CONFIG_SYS_BOOTCOUNT_LE
-
 #ifdef CONFIG_MTD_RAW_NAND
 #define CONFIG_SYS_NAND_ECCPOS  {   2,   3,   4,   5,   6,   7,   8,   9, \
                         10,  11,  12,  13,  14,  15,  16,  17,  18,  19, \
index 79d9d03..4289836 100644 (file)
@@ -50,9 +50,6 @@
 
 /* SPL */
 
-/* Bootcount using the RTC block */
-#define CONFIG_SYS_BOOTCOUNT_BE
-
 /* Network. */
 
 #endif /* ! __CONFIG_AM335X_SL50_H */
index 97adb83..965eba5 100644 (file)
 #define CONFIG_SYS_NS16550_COM6                0x481aa000      /* UART5 */
 
 /* SPL */
-/* Bootcount using the RTC block */
-#define CONFIG_SYS_BOOTCOUNT_BE
 
 /* NAND: device related configs */
 /* NAND: driver related configs */
index f770b35..7942464 100644 (file)
@@ -26,9 +26,6 @@
 
 /* Miscellaneous configurable options */
 
-/* Bootcounter */
-#define CONFIG_SYS_BOOTCOUNT_BE
-
 /* MMC Configs */
 #define CONFIG_SYS_FSL_ESDHC_ADDR      0
 #define CONFIG_SYS_FSL_USDHC_NUM       3
index 1fc38cf..bb6cc95 100644 (file)
@@ -14,8 +14,6 @@
 
 #define CONFIG_PL011_CLOCK             150000000
 
-#define CONFIG_SYS_BOOTCOUNT_LE                /* Use little-endian accessors */
-
 /*
  * Miscellaneous configurable options
  */
index a129233..dd67473 100644 (file)
 
 #define CONFIG_SYS_MONITOR_LEN         0x100000     /* 1Mbyte */
 
-#define CONFIG_SYS_BOOTCOUNT_BE
-
 /*
  * Environment
  */
index 468a35d..ad27179 100644 (file)
@@ -16,9 +16,4 @@
 /* The rest of the configuration is shared */
 #include <configs/socfpga_common.h>
 
-/*
- * Bootcounter
- */
-#define CONFIG_SYS_BOOTCOUNT_BE
-
 #endif /* __CONFIG_SOCFPGA_IS1_H__ */
index 62c1bc7..432144c 100644 (file)
 /* Enable SPI NOR flash reset, needed for SPI booting */
 #define CONFIG_SPI_N25Q256A_RESET
 
-/*
- * Bootcounter
- */
-#define CONFIG_SYS_BOOTCOUNT_BE
-
 /* Environment setting for SPI flash */
 
 /* The rest of the configuration is shared */
index 90db965..9991306 100644 (file)
@@ -24,9 +24,6 @@
 
 /* LED */
 
-/* Bootcounter */
-#define CONFIG_SYS_BOOTCOUNT_BE
-
 /* I2C */
 
 #endif /* __CONFIG_TQMA6_WRU4_H */