common: Move wait_ticks functions out of common.h
authorSimon Glass <sjg@chromium.org>
Thu, 14 Nov 2019 19:57:27 +0000 (12:57 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 2 Dec 2019 23:23:11 +0000 (18:23 -0500)
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>
drivers/timer/mpc83xx_timer.c
include/common.h
include/time.h

index dfbc8672b29329689551813cced609cc8641c0c4..69949d533382d7e01b3f1fd935e29650457dd23d 100644 (file)
@@ -9,6 +9,7 @@
 #include <clk.h>
 #include <dm.h>
 #include <status_led.h>
+#include <time.h>
 #include <timer.h>
 #include <watchdog.h>
 
index 20d143deb81a7ea678fb0beec4f6bb7003e37c2d..091b54787f7ff7726566c8566fad364dcb16ed9a 100644 (file)
@@ -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>
index a1bdefc164bfb1526fc1ce09c051f25864ba922f..31d386729ef5b1f7fa4bf7b2eb857c3237f5546f 100644 (file)
@@ -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 */