[U-Boot] [PATCH v2 19/41] common: Move wait_ticks functions out of common.h

Simon Glass sjg at chromium.org
Fri Nov 8 19:53:26 UTC 2019


This function belongs in time.h so move it over and add a comment.

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

Changes in v2: None

 arch/arm/cpu/pxa/pxa2xx.c     | 1 +
 drivers/timer/mpc83xx_timer.c | 1 +
 include/common.h              | 1 -
 include/time.h                | 9 +++++++++
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
index 0b28f0a3ef..43c206b245 100644
--- a/arch/arm/cpu/pxa/pxa2xx.c
+++ b/arch/arm/cpu/pxa/pxa2xx.c
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <time.h>
 #include <asm/arch/pxa-regs.h>
 #include <asm/io.h>
 #include <asm/system.h>
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..0b3835f053 100644
--- a/include/time.h
+++ b/include/time.h
@@ -86,4 +86,13 @@ ulong usec2ticks(unsigned long usec);
  */
 ulong ticks2usec(unsigned long ticks);
 
+/**
+ * wait_ticks() - waits a given number of ticks
+ *
+ * This is an internal funciton. Normally you should use udelay() or mdelay()
+ *
+ * @ticks: Number of ticks to wait
+ */
+void wait_ticks(unsigned long ticks);
+
 #endif /* _TIME_H */
-- 
2.24.0.rc1.363.gb1bccd3e3d-goog



More information about the U-Boot mailing list