summaryrefslogtreecommitdiff
path: root/include/bootcount.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-11-14 12:57:17 -0700
committerTom Rini <trini@konsulko.com>2019-12-02 18:23:08 -0500
commitc66044415989027c33876ff84491e148062dbf5c (patch)
tree6e6be967379258f6439f224f7df1ec8d916e328a /include/bootcount.h
parent3db7110857524cf1b7d0a374c1ebcde8a2680de0 (diff)
downloadu-boot-c66044415989027c33876ff84491e148062dbf5c.tar.gz
u-boot-c66044415989027c33876ff84491e148062dbf5c.tar.bz2
u-boot-c66044415989027c33876ff84491e148062dbf5c.zip
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>
Diffstat (limited to 'include/bootcount.h')
-rw-r--r--include/bootcount.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/bootcount.h b/include/bootcount.h
index 8fa8cf8218..a26a385233 100644
--- a/include/bootcount.h
+++ b/include/bootcount.h
@@ -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) {}