/* Clocksource: just a monotonic counter of MCK/16 cycles. We don't care whether or not PIT irqs are enabled.  */
static cycle_t read_pit_clk(struct clocksource *cs)
/* Clocksource: just a monotonic counter of MCK/16 cycles. We don't care whether or not PIT irqs are enabled.  */
static cycle_t read_pit_clk(struct clocksource *cs)
{
	unsigned long flags;
	u32 elapsed;
	u32 t;
	raw_local_irq_save(flags);
	elapsed = pit_cnt;
	t = at91_sys_read(AT91_PIT_PIIR);
	raw_local_irq_restore(flags);
	elapsed += PIT_PICNT(t) * pit_cycle;
	elapsed += PIT_CPIV(t);
	return elapsed;
}