mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
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>
This commit is contained in:
@@ -8,22 +8,7 @@
|
||||
#include <bootcount.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
/*
|
||||
* Only override CONFIG_SYS_BOOTCOUNT_ADDR if not already defined. This
|
||||
* way, some boards can define it directly in their config header.
|
||||
*/
|
||||
#if !defined(CONFIG_SYS_BOOTCOUNT_ADDR)
|
||||
|
||||
#if defined(CONFIG_QE)
|
||||
#include <linux/immap_qe.h>
|
||||
#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + 0x110000 + \
|
||||
QE_MURAM_SIZE - 2 * sizeof(u32))
|
||||
#endif /* defined(CONFIG_QE) */
|
||||
|
||||
#endif /* !defined(CONFIG_SYS_BOOTCOUNT_ADDR) */
|
||||
|
||||
/* Now implement the generic default functions */
|
||||
#if defined(CONFIG_SYS_BOOTCOUNT_ADDR)
|
||||
__weak void bootcount_store(ulong a)
|
||||
{
|
||||
void *reg = (void *)CONFIG_SYS_BOOTCOUNT_ADDR;
|
||||
@@ -54,4 +39,3 @@ __weak ulong bootcount_load(void)
|
||||
return raw_bootcount_load(reg);
|
||||
#endif /* defined(CONFIG_SYS_BOOTCOUNT_SINGLEWORD) */
|
||||
}
|
||||
#endif /* defined(CONFIG_SYS_BOOTCOUNT_ADDR) */
|
||||
|
Reference in New Issue
Block a user