Skip to content

Commit 64a2a7b

Browse files
committed
Convert CONFIG_SYS_BOOTCOUNT_LE et al to Kconfig
This converts the following to Kconfig: CONFIG_SYS_BOOTCOUNT_LE CONFIG_SYS_BOOTCOUNT_BE Signed-off-by: Tom Rini <[email protected]>
1 parent d9c4d66 commit 64a2a7b

32 files changed

+31
-44
lines changed

configs/am335x_boneblack_vboot_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ CONFIG_NET_RETRY_COUNT=10
5454
CONFIG_BOOTP_SEND_HOSTNAME=y
5555
# CONFIG_SPL_BLK is not set
5656
CONFIG_BOOTCOUNT_LIMIT=y
57+
CONFIG_SYS_BOOTCOUNT_BE=y
5758
CONFIG_DFU_MMC=y
5859
CONFIG_DFU_RAM=y
5960
CONFIG_USB_FUNCTION_FASTBOOT=y

configs/am335x_evm_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ CONFIG_VERSION_VARIABLE=y
6363
CONFIG_NET_RETRY_COUNT=10
6464
CONFIG_BOOTP_SEND_HOSTNAME=y
6565
CONFIG_BOOTCOUNT_LIMIT=y
66+
CONFIG_SYS_BOOTCOUNT_BE=y
6667
CONFIG_CLK=y
6768
CONFIG_CLK_CDCE9XX=y
6869
CONFIG_CLK_TI_CTRL=y

configs/am335x_evm_spiboot_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ CONFIG_VERSION_VARIABLE=y
5353
CONFIG_NET_RETRY_COUNT=10
5454
CONFIG_BOOTP_SEND_HOSTNAME=y
5555
CONFIG_BOOTCOUNT_LIMIT=y
56+
CONFIG_SYS_BOOTCOUNT_BE=y
5657
CONFIG_CLK=y
5758
CONFIG_CLK_CDCE9XX=y
5859
CONFIG_DFU_TFTP=y

configs/am335x_hs_evm_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ CONFIG_VERSION_VARIABLE=y
5151
CONFIG_NET_RETRY_COUNT=10
5252
CONFIG_BOOTP_SEND_HOSTNAME=y
5353
CONFIG_BOOTCOUNT_LIMIT=y
54+
CONFIG_SYS_BOOTCOUNT_BE=y
5455
CONFIG_CLK=y
5556
CONFIG_CLK_CDCE9XX=y
5657
CONFIG_DFU_MMC=y

configs/am335x_hs_evm_uart_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ CONFIG_VERSION_VARIABLE=y
5252
CONFIG_NET_RETRY_COUNT=10
5353
CONFIG_BOOTP_SEND_HOSTNAME=y
5454
CONFIG_BOOTCOUNT_LIMIT=y
55+
CONFIG_SYS_BOOTCOUNT_BE=y
5556
CONFIG_CLK=y
5657
CONFIG_CLK_CDCE9XX=y
5758
CONFIG_DFU_MMC=y

configs/am335x_sl50_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ CONFIG_VERSION_VARIABLE=y
6868
CONFIG_NET_RETRY_COUNT=10
6969
CONFIG_BOOTP_SEND_HOSTNAME=y
7070
CONFIG_BOOTCOUNT_LIMIT=y
71+
CONFIG_SYS_BOOTCOUNT_BE=y
7172
CONFIG_SYS_I2C_LEGACY=y
7273
CONFIG_SPL_SYS_I2C_LEGACY=y
7374
CONFIG_SYS_I2C_EEPROM_ADDR=0x50

configs/chiliboard_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
5454
CONFIG_NET_RETRY_COUNT=10
5555
CONFIG_BOOTP_SEND_HOSTNAME=y
5656
CONFIG_BOOTCOUNT_LIMIT=y
57+
CONFIG_SYS_BOOTCOUNT_BE=y
5758
CONFIG_SYS_I2C_LEGACY=y
5859
CONFIG_SPL_SYS_I2C_LEGACY=y
5960
CONFIG_MISC=y

configs/dh_imx6_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ CONFIG_BOUNCE_BUFFER=y
6969
CONFIG_DWC_AHSATA=y
7070
CONFIG_LBA48=y
7171
CONFIG_BOOTCOUNT_LIMIT=y
72+
CONFIG_SYS_BOOTCOUNT_BE=y
7273
CONFIG_SYS_DFU_DATA_BUF_SIZE=0x1000000
7374
CONFIG_DM_I2C=y
7475
CONFIG_SYS_I2C_MXC=y

configs/kmcent2_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ CONFIG_USE_ETHPRIME=y
5757
CONFIG_ETHPRIME="fm1-mac5"
5858
CONFIG_DM=y
5959
CONFIG_BOOTCOUNT_LIMIT=y
60+
CONFIG_SYS_BOOTCOUNT_BE=y
6061
CONFIG_FSL_CAAM=y
6162
CONFIG_DDR_CLK_FREQ=66666666
6263
CONFIG_CHIP_SELECTS_PER_CTRL=2

configs/kmcoge5ne_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ CONFIG_VERSION_VARIABLE=y
200200
CONFIG_BOOTCOUNT_LIMIT=y
201201
CONFIG_DM_BOOTCOUNT=y
202202
CONFIG_BOOTCOUNT_MEM=y
203+
CONFIG_SYS_BOOTCOUNT_BE=y
203204
CONFIG_SYS_BR0_PRELIM_BOOL=y
204205
CONFIG_SYS_BR0_PRELIM=0xF0001001
205206
CONFIG_SYS_OR0_PRELIM=0xF0000E55

configs/kmeter1_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ CONFIG_VERSION_VARIABLE=y
169169
CONFIG_BOOTCOUNT_LIMIT=y
170170
CONFIG_DM_BOOTCOUNT=y
171171
CONFIG_BOOTCOUNT_MEM=y
172+
CONFIG_SYS_BOOTCOUNT_BE=y
172173
CONFIG_SYS_BR0_PRELIM_BOOL=y
173174
CONFIG_SYS_BR0_PRELIM=0xF0001001
174175
CONFIG_SYS_OR0_PRELIM=0xF0000E55

configs/kmsupx5_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ CONFIG_VERSION_VARIABLE=y
160160
CONFIG_BOOTCOUNT_LIMIT=y
161161
CONFIG_DM_BOOTCOUNT=y
162162
CONFIG_BOOTCOUNT_MEM=y
163+
CONFIG_SYS_BOOTCOUNT_BE=y
163164
CONFIG_SYS_BR0_PRELIM_BOOL=y
164165
CONFIG_SYS_BR0_PRELIM=0xF0001001
165166
CONFIG_SYS_OR0_PRELIM=0xF0000E55

configs/kmtegr1_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ CONFIG_VERSION_VARIABLE=y
161161
CONFIG_BOOTCOUNT_LIMIT=y
162162
CONFIG_DM_BOOTCOUNT=y
163163
CONFIG_BOOTCOUNT_MEM=y
164+
CONFIG_SYS_BOOTCOUNT_BE=y
164165
CONFIG_SYS_BR0_PRELIM_BOOL=y
165166
CONFIG_SYS_BR0_PRELIM=0xF0001001
166167
CONFIG_SYS_OR0_PRELIM=0xF0000E55

configs/pg_wcom_expu1_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ CONFIG_ETHPRIME="ethernet@2d90000"
7070
CONFIG_VERSION_VARIABLE=y
7171
CONFIG_DM=y
7272
CONFIG_BOOTCOUNT_LIMIT=y
73+
CONFIG_SYS_BOOTCOUNT_BE=y
7374
CONFIG_DDR_CLK_FREQ=50000000
7475
CONFIG_SYS_FSL_DDR3=y
7576
CONFIG_SYS_I2C_LEGACY=y

configs/pg_wcom_expu1_update_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ CONFIG_ETHPRIME="ethernet@2d90000"
6868
CONFIG_VERSION_VARIABLE=y
6969
CONFIG_DM=y
7070
CONFIG_BOOTCOUNT_LIMIT=y
71+
CONFIG_SYS_BOOTCOUNT_BE=y
7172
CONFIG_DDR_CLK_FREQ=50000000
7273
CONFIG_SYS_FSL_DDR3=y
7374
CONFIG_SYS_I2C_LEGACY=y

configs/pg_wcom_seli8_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ CONFIG_ETHPRIME="ethernet@2d90000"
7070
CONFIG_VERSION_VARIABLE=y
7171
CONFIG_DM=y
7272
CONFIG_BOOTCOUNT_LIMIT=y
73+
CONFIG_SYS_BOOTCOUNT_BE=y
7374
CONFIG_DDR_CLK_FREQ=50000000
7475
CONFIG_SYS_FSL_DDR3=y
7576
CONFIG_SYS_I2C_LEGACY=y

configs/pg_wcom_seli8_update_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ CONFIG_ETHPRIME="ethernet@2d90000"
6868
CONFIG_VERSION_VARIABLE=y
6969
CONFIG_DM=y
7070
CONFIG_BOOTCOUNT_LIMIT=y
71+
CONFIG_SYS_BOOTCOUNT_BE=y
7172
CONFIG_DDR_CLK_FREQ=50000000
7273
CONFIG_SYS_FSL_DDR3=y
7374
CONFIG_SYS_I2C_LEGACY=y

configs/socfpga_is1_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ CONFIG_VERSION_VARIABLE=y
5252
CONFIG_ARP_TIMEOUT=500
5353
CONFIG_SPL_DM_SEQ_ALIAS=y
5454
CONFIG_BOOTCOUNT_LIMIT=y
55+
CONFIG_SYS_BOOTCOUNT_BE=y
5556
CONFIG_DWAPB_GPIO=y
5657
CONFIG_DM_I2C=y
5758
CONFIG_SYS_I2C_DW=y

configs/socfpga_sr1500_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
5656
CONFIG_VERSION_VARIABLE=y
5757
CONFIG_SPL_DM_SEQ_ALIAS=y
5858
CONFIG_BOOTCOUNT_LIMIT=y
59+
CONFIG_SYS_BOOTCOUNT_BE=y
5960
CONFIG_DWAPB_GPIO=y
6061
CONFIG_DM_I2C=y
6162
CONFIG_SYS_I2C_DW=y

configs/tuge1_defconfig

+1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ CONFIG_VERSION_VARIABLE=y
160160
CONFIG_BOOTCOUNT_LIMIT=y
161161
CONFIG_DM_BOOTCOUNT=y
162162
CONFIG_BOOTCOUNT_MEM=y
163+
CONFIG_SYS_BOOTCOUNT_BE=y
163164
CONFIG_SYS_BR0_PRELIM_BOOL=y
164165
CONFIG_SYS_BR0_PRELIM=0xF0001001
165166
CONFIG_SYS_OR0_PRELIM=0xF0000E55

drivers/bootcount/Kconfig

+11
Original file line numberDiff line numberDiff line change
@@ -237,4 +237,15 @@ config SYS_BOOTCOUNT_MAGIC
237237
help
238238
Set the magic value used for the boot counter.
239239

240+
choice
241+
prompt "Endianness of bootcount accessors"
242+
default SYS_BOOTCOUNT_LE
243+
244+
config SYS_BOOTCOUNT_LE
245+
bool "Little endian accessors"
246+
247+
config SYS_BOOTCOUNT_BE
248+
bool "Big endian accessors"
249+
250+
endchoice
240251
endif

include/bootcount.h

-8
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ ulong bootcount_load(void);
7272

7373
#if defined(CONFIG_SPL_BOOTCOUNT_LIMIT) || defined(CONFIG_TPL_BOOTCOUNT_LIMIT) || defined(CONFIG_BOOTCOUNT_LIMIT)
7474

75-
#if !defined(CONFIG_SYS_BOOTCOUNT_LE) && !defined(CONFIG_SYS_BOOTCOUNT_BE)
76-
# if __BYTE_ORDER == __LITTLE_ENDIAN
77-
# define CONFIG_SYS_BOOTCOUNT_LE
78-
# else
79-
# define CONFIG_SYS_BOOTCOUNT_BE
80-
# endif
81-
#endif
82-
8375
#ifdef CONFIG_SYS_BOOTCOUNT_LE
8476
static inline void raw_bootcount_store(volatile u32 *addr, u32 data)
8577
{

include/configs/am335x_evm.h

-8
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,6 @@
170170
/* PMIC support */
171171
#define CONFIG_POWER_TPS65910
172172

173-
/* SPL */
174-
#ifndef CONFIG_NOR_BOOT
175-
/* Bootcount using the RTC block */
176-
#define CONFIG_SYS_BOOTCOUNT_BE
177-
178-
/* USB gadget RNDIS */
179-
#endif
180-
181173
#ifdef CONFIG_MTD_RAW_NAND
182174
/* NAND: device related configs */
183175
/* NAND: driver related configs */

include/configs/am335x_guardian.h

-3
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@
9393
#define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
9494
#define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
9595

96-
/* Bootcount using the RTC block */
97-
#define CONFIG_SYS_BOOTCOUNT_LE
98-
9996
#ifdef CONFIG_MTD_RAW_NAND
10097
#define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
10198
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \

include/configs/am335x_sl50.h

-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@
5050

5151
/* SPL */
5252

53-
/* Bootcount using the RTC block */
54-
#define CONFIG_SYS_BOOTCOUNT_BE
55-
5653
/* Network. */
5754

5855
#endif /* ! __CONFIG_AM335X_SL50_H */

include/configs/chiliboard.h

-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@
105105
#define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
106106

107107
/* SPL */
108-
/* Bootcount using the RTC block */
109-
#define CONFIG_SYS_BOOTCOUNT_BE
110108

111109
/* NAND: device related configs */
112110
/* NAND: driver related configs */

include/configs/dh_imx6.h

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626

2727
/* Miscellaneous configurable options */
2828

29-
/* Bootcounter */
30-
#define CONFIG_SYS_BOOTCOUNT_BE
31-
3229
/* MMC Configs */
3330
#define CONFIG_SYS_FSL_ESDHC_ADDR 0
3431
#define CONFIG_SYS_FSL_USDHC_NUM 3

include/configs/highbank.h

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
#define CONFIG_PL011_CLOCK 150000000
1616

17-
#define CONFIG_SYS_BOOTCOUNT_LE /* Use little-endian accessors */
18-
1917
/*
2018
* Miscellaneous configurable options
2119
*/

include/configs/km/pg-wcom-ls102xa.h

-2
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,6 @@
187187

188188
#define CONFIG_SYS_MONITOR_LEN 0x100000 /* 1Mbyte */
189189

190-
#define CONFIG_SYS_BOOTCOUNT_BE
191-
192190
/*
193191
* Environment
194192
*/

include/configs/socfpga_is1.h

-5
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,4 @@
1616
/* The rest of the configuration is shared */
1717
#include <configs/socfpga_common.h>
1818

19-
/*
20-
* Bootcounter
21-
*/
22-
#define CONFIG_SYS_BOOTCOUNT_BE
23-
2419
#endif /* __CONFIG_SOCFPGA_IS1_H__ */

include/configs/socfpga_sr1500.h

-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818
/* Enable SPI NOR flash reset, needed for SPI booting */
1919
#define CONFIG_SPI_N25Q256A_RESET
2020

21-
/*
22-
* Bootcounter
23-
*/
24-
#define CONFIG_SYS_BOOTCOUNT_BE
25-
2621
/* Environment setting for SPI flash */
2722

2823
/* The rest of the configuration is shared */

include/configs/tqma6_wru4.h

-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424

2525
/* LED */
2626

27-
/* Bootcounter */
28-
#define CONFIG_SYS_BOOTCOUNT_BE
29-
3027
/* I2C */
3128

3229
#endif /* __CONFIG_TQMA6_WRU4_H */

0 commit comments

Comments
 (0)