Commit 39bcbb7740b099b487b20ff6e345eb790a85712c
1 parent
e9a98ba312
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
bootcount: Migrate CONFIG_SYS_BOOTCOUNT_ADDR
Migrate the users of CONFIG_SYS_BOOTCOUNT_ADDR to Kconfig. We can provide a default for BOOTCOUNT_AM33XX as that's a specific part of the RTC in use. We can also provide a default for ARCH_LS1043A and ARCH_LS1021A as they had been previously calculated and their symbols are in Kconfig. In the case of other QE-enabled platforms, they are not so we must update the relevant defconfig files. The previous default only applied in some cases, even on a specific SoC family. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
Showing 38 changed files with 28 additions and 48 deletions Side-by-side Diff
- configs/calimain_defconfig
- configs/dh_imx6_defconfig
- configs/ge_b450v3_defconfig
- configs/ge_b650v3_defconfig
- configs/ge_b850v3_defconfig
- configs/highbank_defconfig
- configs/ids8313_defconfig
- configs/kmcoge4_defconfig
- configs/kmcoge5ne_defconfig
- configs/kmeter1_defconfig
- configs/kmlion1_defconfig
- configs/kmopti2_defconfig
- configs/kmsupx5_defconfig
- configs/kmtegr1_defconfig
- configs/kmtepr2_defconfig
- configs/kmvect1_defconfig
- configs/mx53ppd_defconfig
- configs/socfpga_is1_defconfig
- configs/socfpga_sr1500_defconfig
- configs/suvd3_defconfig
- configs/tqma6s_wru4_mmc_defconfig
- configs/tuge1_defconfig
- configs/tuxx1_defconfig
- configs/x600_defconfig
- drivers/bootcount/Kconfig
- drivers/bootcount/bootcount.c
- include/configs/brppt1.h
- include/configs/calimain.h
- include/configs/dh_imx6.h
- include/configs/ge_bx50v3.h
- include/configs/highbank.h
- include/configs/ids8313.h
- include/configs/km/kmp204x-common.h
- include/configs/socfpga_is1.h
- include/configs/socfpga_sr1500.h
- include/configs/ti_am335x_common.h
- include/configs/tqma6_wru4.h
- include/configs/x600.h
configs/calimain_defconfig
configs/dh_imx6_defconfig
configs/ge_b450v3_defconfig
configs/ge_b650v3_defconfig
configs/ge_b850v3_defconfig
configs/highbank_defconfig
configs/ids8313_defconfig
configs/kmcoge4_defconfig
configs/kmcoge5ne_defconfig
configs/kmeter1_defconfig
configs/kmlion1_defconfig
configs/kmopti2_defconfig
configs/kmsupx5_defconfig
configs/kmtegr1_defconfig
configs/kmtepr2_defconfig
configs/kmvect1_defconfig
configs/mx53ppd_defconfig
configs/socfpga_is1_defconfig
configs/socfpga_sr1500_defconfig
configs/suvd3_defconfig
configs/tqma6s_wru4_mmc_defconfig
configs/tuge1_defconfig
configs/tuxx1_defconfig
configs/x600_defconfig
drivers/bootcount/Kconfig
... | ... | @@ -111,8 +111,10 @@ |
111 | 111 | |
112 | 112 | config SYS_BOOTCOUNT_ADDR |
113 | 113 | hex "RAM address used for reading and writing the boot counter" |
114 | - default 0x7000A000 | |
115 | - depends on BOOTCOUNT_EXT | |
114 | + default 0x44E3E000 if BOOTCOUNT_AM33XX | |
115 | + default 0xE0115FF8 if ARCH_LS1043A || ARCH_LS1021A | |
116 | + depends on BOOTCOUNT_AM33XX || BOOTCOUNT_GENERIC || BOOTCOUNT_EXT || \ | |
117 | + BOOTCOUNT_I2C | |
116 | 118 | help |
117 | 119 | Set the address used for reading and writing the boot counter. |
118 | 120 |
drivers/bootcount/bootcount.c
... | ... | @@ -8,22 +8,7 @@ |
8 | 8 | #include <bootcount.h> |
9 | 9 | #include <linux/compiler.h> |
10 | 10 | |
11 | -/* | |
12 | - * Only override CONFIG_SYS_BOOTCOUNT_ADDR if not already defined. This | |
13 | - * way, some boards can define it directly in their config header. | |
14 | - */ | |
15 | -#if !defined(CONFIG_SYS_BOOTCOUNT_ADDR) | |
16 | - | |
17 | -#if defined(CONFIG_QE) | |
18 | -#include <linux/immap_qe.h> | |
19 | -#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + 0x110000 + \ | |
20 | - QE_MURAM_SIZE - 2 * sizeof(u32)) | |
21 | -#endif /* defined(CONFIG_QE) */ | |
22 | - | |
23 | -#endif /* !defined(CONFIG_SYS_BOOTCOUNT_ADDR) */ | |
24 | - | |
25 | 11 | /* Now implement the generic default functions */ |
26 | -#if defined(CONFIG_SYS_BOOTCOUNT_ADDR) | |
27 | 12 | __weak void bootcount_store(ulong a) |
28 | 13 | { |
29 | 14 | void *reg = (void *)CONFIG_SYS_BOOTCOUNT_ADDR; |
... | ... | @@ -54,5 +39,4 @@ |
54 | 39 | return raw_bootcount_load(reg); |
55 | 40 | #endif /* defined(CONFIG_SYS_BOOTCOUNT_SINGLEWORD) */ |
56 | 41 | } |
57 | -#endif /* defined(CONFIG_SYS_BOOTCOUNT_ADDR) */ |
include/configs/brppt1.h
include/configs/calimain.h
include/configs/dh_imx6.h
include/configs/ge_bx50v3.h
include/configs/highbank.h
include/configs/ids8313.h
include/configs/km/kmp204x-common.h
... | ... | @@ -188,9 +188,6 @@ |
188 | 188 | #define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_QRIO_BR_PRELIM /* QRIO Base Address */ |
189 | 189 | #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_QRIO_OR_PRELIM /* QRIO Options */ |
190 | 190 | |
191 | -/* bootcounter in QRIO */ | |
192 | -#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_QRIO_BASE + 0x20) | |
193 | - | |
194 | 191 | #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */ |
195 | 192 | #define CONFIG_MISC_INIT_F |
196 | 193 | #define CONFIG_MISC_INIT_R |
include/configs/socfpga_is1.h
include/configs/socfpga_sr1500.h
include/configs/ti_am335x_common.h
... | ... | @@ -38,13 +38,6 @@ |
38 | 38 | |
39 | 39 | #define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ |
40 | 40 | /* |
41 | - * RTC related defines. To use bootcount you must set bootlimit in the | |
42 | - * environment to a non-zero value and enable CONFIG_BOOTCOUNT_LIMIT | |
43 | - * in the board config. | |
44 | - */ | |
45 | -#define CONFIG_SYS_BOOTCOUNT_ADDR 0x44E3E000 | |
46 | - | |
47 | -/* | |
48 | 41 | * SPL related defines. The Public RAM memory map the ROM defines the |
49 | 42 | * area between 0x402F0400 and 0x4030B800 as a download area and |
50 | 43 | * 0x4030B800 to 0x4030CE00 as a public stack area. The ROM also |
include/configs/tqma6_wru4.h
include/configs/x600.h
... | ... | @@ -116,10 +116,6 @@ |
116 | 116 | #define CONFIG_SYS_MALLOC_LEN (8 << 20) |
117 | 117 | #define CONFIG_SYS_LOAD_ADDR 0x00800000 |
118 | 118 | |
119 | -/* Use last 2 lwords in internal SRAM for bootcounter */ | |
120 | -#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SRAM_BASE + \ | |
121 | - CONFIG_SRAM_SIZE) | |
122 | - | |
123 | 119 | #define CONFIG_HOSTNAME x600 |
124 | 120 | #define CONFIG_UBI_PART ubi0 |
125 | 121 | #define CONFIG_UBIFS_VOLUME rootfs |