summaryrefslogtreecommitdiff
path: root/lib_m68k
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-06-09 15:24:18 +0000
committerwdenk <wdenk>2004-06-09 15:24:18 +0000
commit70f05ac34ee02fe37d8bdcb45301104a4fa35e19 (patch)
treec3a684686efeeda07f2f43e3c8c2819135eaecdf /lib_m68k
parent13a5695b7c454d5a2a5a885002cfe0e18536dad9 (diff)
downloadu-boot-imx-70f05ac34ee02fe37d8bdcb45301104a4fa35e19.zip
u-boot-imx-70f05ac34ee02fe37d8bdcb45301104a4fa35e19.tar.gz
u-boot-imx-70f05ac34ee02fe37d8bdcb45301104a4fa35e19.tar.bz2
* Patch by Josef Baumgartner, 25 May 2004:
Add missing functions get_ticks() and get_tbclk() in lib_m68k/time.c * Patch by Paul Ruhland, 24 May 2004: fix SDRAM initialization for LPD7A400 board.
Diffstat (limited to 'lib_m68k')
-rw-r--r--lib_m68k/time.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib_m68k/time.c b/lib_m68k/time.c
index 0b85411..6f73ba9 100644
--- a/lib_m68k/time.c
+++ b/lib_m68k/time.c
@@ -171,3 +171,24 @@ void wait_ticks (unsigned long ticks)
while (get_timer (0) < ticks);
}
#endif
+
+
+/*
+ * This function is derived from PowerPC code (read timebase as long long).
+ * On M68K it just returns the timer value.
+ */
+unsigned long long get_ticks(void)
+{
+ return get_timer(0);
+}
+
+/*
+ * This function is derived from PowerPC code (timebase clock frequency).
+ * On M68K it returns the number of timer ticks per second.
+ */
+ulong get_tbclk (void)
+{
+ ulong tbclk;
+ tbclk = CFG_HZ;
+ return tbclk;
+}