X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fbootcount.h;h=cd304039849ba66e16f62656568aedd1e3772741;hb=d789a8259e3b3b77e3eb2b090373ab2cbc225629;hp=daee84316c7f5f7594f6eceace9d06225c4bbd89;hpb=d94604d558cda9f89722c967d6f8d6269a2db21c;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/bootcount.h b/include/bootcount.h index daee843..cd30403 100644 --- a/include/bootcount.h +++ b/include/bootcount.h @@ -9,6 +9,7 @@ #include #include #include +#include #ifdef CONFIG_DM_BOOTCOUNT @@ -58,6 +59,16 @@ int dm_bootcount_set(struct udevice *dev, u32 bootcount); #endif +/** bootcount_store() - store the current bootcount */ +void bootcount_store(ulong); + +/** + * bootcount_load() - load the current bootcount + * + * @return bootcount, read from the appropriate location + */ +ulong bootcount_load(void); + #if defined(CONFIG_SPL_BOOTCOUNT_LIMIT) || defined(CONFIG_BOOTCOUNT_LIMIT) #if !defined(CONFIG_SYS_BOOTCOUNT_LE) && !defined(CONFIG_SYS_BOOTCOUNT_BE) @@ -126,10 +137,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) {}