mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-30 08:03:32 +08:00
spl: bootcount: Move code out of header file
It is not good practice to write code in a header file. If it is included multiple times then the code can cause duplicate functions. Move the bootcount_store() and bootcount_load() functions into SPL. Note: bootcount is a bit strange in that it uses driver model but does not define proper drivers. This should be fixed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
3db7110857
commit
c660444159
@ -830,3 +830,14 @@ ulong spl_relocate_stack_gd(void)
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BOOTCOUNT_LIMIT) && !defined(CONFIG_SPL_BOOTCOUNT_LIMIT)
|
||||
void bootcount_store(ulong a)
|
||||
{
|
||||
}
|
||||
|
||||
ulong bootcount_load(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -127,10 +127,6 @@ static inline void bootcount_inc(void)
|
||||
#endif /* !CONFIG_SPL_BUILD */
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_BOOTCOUNT_LIMIT)
|
||||
void bootcount_store(ulong a) {};
|
||||
ulong bootcount_load(void) { return 0; }
|
||||
#endif /* CONFIG_SPL_BUILD && !CONFIG_SPL_BOOTCOUNT_LIMIT */
|
||||
#else
|
||||
static inline int bootcount_error(void) { return 0; }
|
||||
static inline void bootcount_inc(void) {}
|
||||
|
Loading…
Reference in New Issue
Block a user