/* Writes timer registers in posted and non-posted mode. The posted mode bit is encoded in reg. Note that in posted mode the write pending bit must be checked. Otherwise a write on a register which has a pending write will be lost.  */
static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg, u32 value)
/* Writes timer registers in posted and non-posted mode. The posted mode bit is encoded in reg. Note that in posted mode the write pending bit must be checked. Otherwise a write on a register which has a pending write will be lost.  */
static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg, u32 value)
{
	if (timer->posted)
		while (readl(timer->io_base + (OMAP_TIMER_WRITE_PEND_REG & 0xff))
				& (reg >> WPSHIFT))
			cpu_relax();
	writel(value, timer->io_base + (reg & 0xff));
}