[U-Boot-Users] [PATCH] Add sa1100 get_ticks

George G. Davis davis_g at comcast.net
Wed Mar 10 03:42:43 CET 2004


Greetings,

This fixes recent build failure for sa1100 targets:

Index: u-boot/cpu/sa1100/interrupts.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/cpu/sa1100/interrupts.c,v
retrieving revision 1.2
diff -u -r1.2 interrupts.c
--- u-boot/cpu/sa1100/interrupts.c	27 Jun 2003 21:32:36 -0000	1.2
+++ u-boot/cpu/sa1100/interrupts.c	10 Mar 2004 02:09:43 -0000
@@ -218,3 +218,24 @@
 	while (tmo >= get_timer_masked ())
 		/*NOP*/;
 }
+
+/*
+ * This function is derived from PowerPC code (read timebase as long long).
+ * On ARM 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 ARM it returns the number of timer ticks per second.
+ */
+ulong get_tbclk (void)
+{
+	ulong tbclk;
+
+	tbclk = CFG_HZ;
+	return tbclk;
+}


I haven't specifically tested get_ticks or get_tbclk. But this fixes the
build and my target (gcplus) works fine for those features that I have
tested (bootp/tftp/bootm) with this patch applied.

--
Regards,
George




More information about the U-Boot mailing list