/* 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy. 'tick' is usecs per jiffy.  */
static unsigned long clps711x_gettimeoffset(void)
/* 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy. 'tick' is usecs per jiffy.  */
static unsigned long clps711x_gettimeoffset(void)
{
	unsigned long hwticks;
	hwticks = LATCH - (clps_readl(TC2D) & 0xffff);
	return (hwticks * (tick_nsec / 1000)) / LATCH;
}