Commit 487748ca authored by Linus Walleij's avatar Linus Walleij

ARM: ks8695: use [readl|writel]_relaxed()

I have no clue why __raw* macros are used here, but I strongly
suspect there is no good reason at all for this, so removing
another bad example.
Tested-by: default avatarGreg Ungerer <gerg@snapgear.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 70adc3f3
...@@ -67,11 +67,11 @@ static unsigned long ks8695_gettimeoffset (void) ...@@ -67,11 +67,11 @@ static unsigned long ks8695_gettimeoffset (void)
* interrupt. We solve this by ensuring that the counter has not * interrupt. We solve this by ensuring that the counter has not
* reloaded between our two reads. * reloaded between our two reads.
*/ */
elapsed = __raw_readl(KS8695_TMR_VA + KS8695_T1TC) + __raw_readl(KS8695_TMR_VA + KS8695_T1PD); elapsed = readl_relaxed(KS8695_TMR_VA + KS8695_T1TC) + readl_relaxed(KS8695_TMR_VA + KS8695_T1PD);
do { do {
tick2 = elapsed; tick2 = elapsed;
intpending = __raw_readl(KS8695_IRQ_VA + KS8695_INTST) & (1 << KS8695_IRQ_TIMER1); intpending = readl_relaxed(KS8695_IRQ_VA + KS8695_INTST) & (1 << KS8695_IRQ_TIMER1);
elapsed = __raw_readl(KS8695_TMR_VA + KS8695_T1TC) + __raw_readl(KS8695_TMR_VA + KS8695_T1PD); elapsed = readl_relaxed(KS8695_TMR_VA + KS8695_T1TC) + readl_relaxed(KS8695_TMR_VA + KS8695_T1PD);
} while (elapsed > tick2); } while (elapsed > tick2);
/* Convert to number of ticks expired (not remaining) */ /* Convert to number of ticks expired (not remaining) */
...@@ -106,14 +106,14 @@ static void ks8695_timer_setup(void) ...@@ -106,14 +106,14 @@ static void ks8695_timer_setup(void)
unsigned long tmcon; unsigned long tmcon;
/* disable timer1 */ /* disable timer1 */
tmcon = __raw_readl(KS8695_TMR_VA + KS8695_TMCON); tmcon = readl_relaxed(KS8695_TMR_VA + KS8695_TMCON);
__raw_writel(tmcon & ~TMCON_T1EN, KS8695_TMR_VA + KS8695_TMCON); writel_relaxed(tmcon & ~TMCON_T1EN, KS8695_TMR_VA + KS8695_TMCON);
__raw_writel(tmout / 2, KS8695_TMR_VA + KS8695_T1TC); writel_relaxed(tmout / 2, KS8695_TMR_VA + KS8695_T1TC);
__raw_writel(tmout / 2, KS8695_TMR_VA + KS8695_T1PD); writel_relaxed(tmout / 2, KS8695_TMR_VA + KS8695_T1PD);
/* re-enable timer1 */ /* re-enable timer1 */
__raw_writel(tmcon | TMCON_T1EN, KS8695_TMR_VA + KS8695_TMCON); writel_relaxed(tmcon | TMCON_T1EN, KS8695_TMR_VA + KS8695_TMCON);
} }
static void __init ks8695_timer_init (void) static void __init ks8695_timer_init (void)
...@@ -138,12 +138,12 @@ void ks8695_restart(char mode, const char *cmd) ...@@ -138,12 +138,12 @@ void ks8695_restart(char mode, const char *cmd)
soft_restart(0); soft_restart(0);
/* disable timer0 */ /* disable timer0 */
reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON); reg = readl_relaxed(KS8695_TMR_VA + KS8695_TMCON);
__raw_writel(reg & ~TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON); writel_relaxed(reg & ~TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);
/* enable watchdog mode */ /* enable watchdog mode */
__raw_writel((10 << 8) | T0TC_WATCHDOG, KS8695_TMR_VA + KS8695_T0TC); writel_relaxed((10 << 8) | T0TC_WATCHDOG, KS8695_TMR_VA + KS8695_T0TC);
/* re-enable timer0 */ /* re-enable timer0 */
__raw_writel(reg | TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON); writel_relaxed(reg | TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment