diff mbox series

[U-Boot,v2,10/41] common: Move bootcount functions to their header file

Message ID 20191108125120.v2.10.I69ad264df47aaf31945e844f07afa29230dcbe8b@changeid
State Changes Requested
Delegated to: Tom Rini
Headers show
Series common: Further reduce common.h | expand

Commit Message

Simon Glass Nov. 8, 2019, 7:53 p.m. UTC
These don't need to be in common.h so move them out.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 board/BuR/brppt1/board.c |  1 +
 include/bootcount.h      | 10 ++++++++++
 include/common.h         |  4 ----
 3 files changed, 11 insertions(+), 4 deletions(-)

Comments

Tom Rini Nov. 11, 2019, 2:18 p.m. UTC | #1
On Fri, Nov 08, 2019 at 12:53:17PM -0700, Simon Glass wrote:

> These don't need to be in common.h so move them out.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox series

Patch

diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c
index ef4f5c9501..e0d1707ac1 100644
--- a/board/BuR/brppt1/board.c
+++ b/board/BuR/brppt1/board.c
@@ -10,6 +10,7 @@ 
  */
 
 #include <common.h>
+#include <bootcount.h>
 #include <env.h>
 #include <errno.h>
 #include <spl.h>
diff --git a/include/bootcount.h b/include/bootcount.h
index a26a385233..cd30403984 100644
--- a/include/bootcount.h
+++ b/include/bootcount.h
@@ -59,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)
diff --git a/include/common.h b/include/common.h
index 9c454fb1c8..97b661181b 100644
--- a/include/common.h
+++ b/include/common.h
@@ -266,10 +266,6 @@  unsigned long timer_get_us(void);
 void	enable_interrupts  (void);
 int	disable_interrupts (void);
 
-/* $(CPU)/.../commproc.c */
-void	bootcount_store (ulong);
-ulong	bootcount_load (void);
-
 /* $(CPU)/.../<eth> */
 void mii_init (void);