Skip to contentSkip to conversation

Add sa1100 get_ticks

PATCH New George G. Davis 2 participants 2 messages Mar 10, 2004 – Mar 14, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add sa1100 get_ticks

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

cpu/sa1100/interrupts.c +21 -0
diff -u -r1.2 interrupts.c
@@ -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

#1 lore raw

PATCH 1/1 Add sa1100 get_ticks

Quoted 2 lines · In message <[email protected]> you wrote:

This fixes recent build failure for sa1100 targets:

Thanks, added.

Best regards,

Wolfgang Denk

Signature · 6 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
      Bugs are by far the largest and  most successful class of
      entity, with nearly a million known species. In this res-
      pect they outnumber all the other  known  creatures about
      four to one.  -- Professor Snope's Encyclopedia of Animal