Skip to contentSkip to conversation

latency tracer support for ARM ep93xx platform

PATCH New Luotao Fu 1 participant 1 message Nov 1, 2006

lore
Share & tools
lore

Luotao Fu

author
#0 lore raw

PATCH 1/1 latency tracer support for ARM ep93xx platform

Hi,
the following patch adds hardware support for the latency tracer in -rt patch on ARM ep93xx platform.

regards
Luotao Fu

Signature · 5 lines
     Dipl.-Ing. Luotao Fu | http://www.pengutronix.de
  Pengutronix - Linux Solutions for Science and Industry
    Handelsregister: Amtsgericht Hildesheim, HRA 2686
      Hannoversche Str. 2, 31134 Hildesheim, Germany
    Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9

Adds latency tracer support for ep93xx platform.

asm-arm/arch-ep93xx/timex.h +7 -0
Index: linux-2.6.18-rt.sec/include/asm-arm/arch-ep93xx/timex.h
===================================================================
@@ -3,3 +3,10 @@
  */
 
 #define CLOCK_TICK_RATE		983040
+
+#include <asm/io.h>
+#include <asm-arm/arch-ep93xx/ep93xx-regs.h>
+
+#define mach_read_cycles() readl(EP93XX_TIMER4_VALUE_LOW)
+#define mach_cycles_to_usecs(d) (((d) * ((1000000LL << 32) / CLOCK_TICK_RATE)) >> 32)
+#define mach_usecs_to_cycles(d) (((d) * (((long long)CLOCK_TICK_RATE << 32) / 1000000)) >> 32)