/* FIXME: the timer needs some delay to stablize the counter capture */
static inline uint32_t read_clksrc_tick(void)
{
	u32 val1, val2;

	do {
		val1 = __raw_readl(group1_base + TMR_CR(2));
		val2 = __raw_readl(group1_base + TMR_CR(2));
	} while (val2 != val1);

	return val2;
}
static unsigned long soc_get_value(void *data)
{
	struct soc_timer *st = (struct soc_timer *)data;

	return readl(st->base + TMR_CR(st->timer_num));
}