diff mbox series

[U-Boot,v4,19/42] common: Move wait_ticks functions out of common.h

Message ID 20191114125724.v4.19.Iaa061cc6a0a856a9300b6b03c2f5bb21d81565ff@changeid
State Accepted
Commit 036a017f79f6c485605c555b3a8733debb72d995
Delegated to: Tom Rini
Headers show
Series common: Further reduce common.h | expand

Commit Message

Simon Glass Nov. 14, 2019, 7:57 p.m. UTC
This function belongs in time.h so move it over and add a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
---

Changes in v4: None
Changes in v3:
- Drop include in pxa2xx.c since this is for pxa_wait_ticks()
- Update comment to wait_ticks() to indicate it is an internal function

Changes in v2: None

 drivers/timer/mpc83xx_timer.c |  1 +
 include/common.h              |  1 -
 include/time.h                | 10 ++++++++++
 3 files changed, 11 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c
index dfbc8672b2..69949d5333 100644
--- a/drivers/timer/mpc83xx_timer.c
+++ b/drivers/timer/mpc83xx_timer.c
@@ -9,6 +9,7 @@ 
 #include <clk.h>
 #include <dm.h>
 #include <status_led.h>
+#include <time.h>
 #include <timer.h>
 #include <watchdog.h>
 
diff --git a/include/common.h b/include/common.h
index 20d143deb8..091b54787f 100644
--- a/include/common.h
+++ b/include/common.h
@@ -286,7 +286,6 @@  int cleanup_before_linux_select(int flags);
 
 /* arch/$(ARCH)/lib/ticks.S */
 uint64_t get_ticks(void);
-void	wait_ticks    (unsigned long);
 
 /* lib/uuid.c */
 #include <uuid.h>
diff --git a/include/time.h b/include/time.h
index a1bdefc164..31d386729e 100644
--- a/include/time.h
+++ b/include/time.h
@@ -86,4 +86,14 @@  ulong usec2ticks(unsigned long usec);
  */
 ulong ticks2usec(unsigned long ticks);
 
+/**
+ * wait_ticks() - waits a given number of ticks
+ *
+ * This is an internal function typically used to implement udelay() and
+ * similar. Normally you should use udelay() or mdelay() instead.
+ *
+ * @ticks: Number of ticks to wait
+ */
+void wait_ticks(unsigned long ticks);
+
 #endif /* _TIME_H */