ARM: OMAP: dmtimer: raw read and write endian fix
All OMAP IP blocks expect LE data, but CPU may operate in BE mode. Need to use endian neutral functions to read/write h/w registers. I.e instead of __raw_read[lw] and __raw_write[lw] functions code need to use read[lw]_relaxed and write[lw]_relaxed functions. If the first simply reads/writes register, the second will byteswap it if host operates in BE mode. Changes are trivial sed like replacement of __raw_xxx functions with xxx_relaxed variant. Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:

committed by
Tony Lindgren

parent
edfaf05c2f
commit
834cacfbef
@@ -103,7 +103,7 @@ static void omap_timer_restore_context(struct omap_dm_timer *timer)
|
||||
timer->context.tmar);
|
||||
omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG,
|
||||
timer->context.tsicr);
|
||||
__raw_writel(timer->context.tier, timer->irq_ena);
|
||||
writel_relaxed(timer->context.tier, timer->irq_ena);
|
||||
omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG,
|
||||
timer->context.tclr);
|
||||
}
|
||||
@@ -699,9 +699,9 @@ int omap_dm_timer_set_int_disable(struct omap_dm_timer *timer, u32 mask)
|
||||
omap_dm_timer_enable(timer);
|
||||
|
||||
if (timer->revision == 1)
|
||||
l = __raw_readl(timer->irq_ena) & ~mask;
|
||||
l = readl_relaxed(timer->irq_ena) & ~mask;
|
||||
|
||||
__raw_writel(l, timer->irq_dis);
|
||||
writel_relaxed(l, timer->irq_dis);
|
||||
l = omap_dm_timer_read_reg(timer, OMAP_TIMER_WAKEUP_EN_REG) & ~mask;
|
||||
omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, l);
|
||||
|
||||
@@ -722,7 +722,7 @@ unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
|
||||
return 0;
|
||||
}
|
||||
|
||||
l = __raw_readl(timer->irq_stat);
|
||||
l = readl_relaxed(timer->irq_stat);
|
||||
|
||||
return l;
|
||||
}
|
||||
|
Reference in New Issue
Block a user