h8300: Rename ctlr_out/in[bwl] to raw_read/write[bwl]
For the sake of consistency, let rename all ctrl_out/in calls to the write/read
calls so we have the same API consistent with the other architectures hence
open the door for the increasing of the test compilation coverage.
The unsigned long coercive cast is removed because all variables are set to
the right type "void __iomem *".
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
diff --git a/drivers/clocksource/h8300_timer8.c b/drivers/clocksource/h8300_timer8.c
index 187c416..aa4b2a98 100644
--- a/drivers/clocksource/h8300_timer8.c
+++ b/drivers/clocksource/h8300_timer8.c
@@ -30,7 +30,7 @@
struct timer8_priv {
struct clock_event_device ced;
- unsigned long mapbase;
+ void __iomem *mapbase;
unsigned long flags;
unsigned int rate;
unsigned int tcora;
@@ -41,15 +41,15 @@
unsigned long v1, v2, v3;
int o1, o2;
- o1 = ctrl_inb(p->mapbase + _8TCSR) & 0x20;
+ o1 = readb(p->mapbase + _8TCSR) & 0x20;
/* Make sure the timer value is stable. Stolen from acpi_pm.c */
do {
o2 = o1;
- v1 = ctrl_inw(p->mapbase + _8TCNT);
- v2 = ctrl_inw(p->mapbase + _8TCNT);
- v3 = ctrl_inw(p->mapbase + _8TCNT);
- o1 = ctrl_inb(p->mapbase + _8TCSR) & 0x20;
+ v1 = readw(p->mapbase + _8TCNT);
+ v2 = readw(p->mapbase + _8TCNT);
+ v3 = readw(p->mapbase + _8TCNT);
+ o1 = readb(p->mapbase + _8TCSR) & 0x20;
} while (unlikely((o1 != o2) || (v1 > v2 && v1 < v3)
|| (v2 > v3 && v2 < v1) || (v3 > v1 && v3 < v2)));
@@ -61,13 +61,13 @@
{
struct timer8_priv *p = dev_id;
- ctrl_outb(ctrl_inb(p->mapbase + _8TCSR) & ~0x40,
+ writeb(readb(p->mapbase + _8TCSR) & ~0x40,
p->mapbase + _8TCSR);
- ctrl_outw(p->tcora, p->mapbase + TCORA);
+ writew(p->tcora, p->mapbase + TCORA);
if (clockevent_state_oneshot(&p->ced))
- ctrl_outw(0x0000, p->mapbase + _8TCR);
+ writew(0x0000, p->mapbase + _8TCR);
p->ced.event_handler(&p->ced);
@@ -82,18 +82,18 @@
pr_warn("delta out of range\n");
now = timer8_get_counter(p);
p->tcora = delta;
- ctrl_outb(ctrl_inb(p->mapbase + _8TCR) | 0x40, p->mapbase + _8TCR);
+ writeb(readb(p->mapbase + _8TCR) | 0x40, p->mapbase + _8TCR);
if (delta > now)
- ctrl_outw(delta, p->mapbase + TCORA);
+ writew(delta, p->mapbase + TCORA);
else
- ctrl_outw(now + 1, p->mapbase + TCORA);
+ writew(now + 1, p->mapbase + TCORA);
}
static int timer8_enable(struct timer8_priv *p)
{
- ctrl_outw(0xffff, p->mapbase + TCORA);
- ctrl_outw(0x0000, p->mapbase + _8TCNT);
- ctrl_outw(0x0c02, p->mapbase + _8TCR);
+ writew(0xffff, p->mapbase + TCORA);
+ writew(0x0000, p->mapbase + _8TCNT);
+ writew(0x0c02, p->mapbase + _8TCR);
return 0;
}
@@ -114,7 +114,7 @@
static void timer8_stop(struct timer8_priv *p)
{
- ctrl_outw(0x0000, p->mapbase + _8TCR);
+ writew(0x0000, p->mapbase + _8TCR);
}
static inline struct timer8_priv *ced_to_priv(struct clock_event_device *ced)
@@ -213,7 +213,7 @@
goto unmap_reg;
}
- timer8_priv.mapbase = (unsigned long)base;
+ timer8_priv.mapbase = base;
rate = clk_get_rate(clk) / SCALE;
if (!rate) {