Commit 21437c53 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Simon Horman

ARM: shmobile: R-Car: Use BIT() macro instead of open coding

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 624deb39
...@@ -58,7 +58,7 @@ static int rcar_sysc_pwr_on_off(const struct rcar_sysc_ch *sysc_ch, ...@@ -58,7 +58,7 @@ static int rcar_sysc_pwr_on_off(const struct rcar_sysc_ch *sysc_ch,
/* Wait until SYSC is ready to accept a power request */ /* Wait until SYSC is ready to accept a power request */
for (k = 0; k < SYSCSR_RETRIES; k++) { for (k = 0; k < SYSCSR_RETRIES; k++) {
if (ioread32(rcar_sysc_base + SYSCSR) & (1 << sr_bit)) if (ioread32(rcar_sysc_base + SYSCSR) & BIT(sr_bit))
break; break;
udelay(SYSCSR_DELAY_US); udelay(SYSCSR_DELAY_US);
} }
...@@ -67,7 +67,7 @@ static int rcar_sysc_pwr_on_off(const struct rcar_sysc_ch *sysc_ch, ...@@ -67,7 +67,7 @@ static int rcar_sysc_pwr_on_off(const struct rcar_sysc_ch *sysc_ch,
return -EAGAIN; return -EAGAIN;
/* Submit power shutoff or power resume request */ /* Submit power shutoff or power resume request */
iowrite32(1 << sysc_ch->chan_bit, iowrite32(BIT(sysc_ch->chan_bit),
rcar_sysc_base + sysc_ch->chan_offs + reg_offs); rcar_sysc_base + sysc_ch->chan_offs + reg_offs);
return 0; return 0;
...@@ -86,8 +86,8 @@ static int rcar_sysc_pwr_on(const struct rcar_sysc_ch *sysc_ch) ...@@ -86,8 +86,8 @@ static int rcar_sysc_pwr_on(const struct rcar_sysc_ch *sysc_ch)
static int rcar_sysc_update(const struct rcar_sysc_ch *sysc_ch, static int rcar_sysc_update(const struct rcar_sysc_ch *sysc_ch,
int (*on_off_fn)(const struct rcar_sysc_ch *)) int (*on_off_fn)(const struct rcar_sysc_ch *))
{ {
unsigned int isr_mask = 1 << sysc_ch->isr_bit; unsigned int isr_mask = BIT(sysc_ch->isr_bit);
unsigned int chan_mask = 1 << sysc_ch->chan_bit; unsigned int chan_mask = BIT(sysc_ch->chan_bit);
unsigned int status; unsigned int status;
unsigned long flags; unsigned long flags;
int ret = 0; int ret = 0;
...@@ -151,7 +151,7 @@ bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch) ...@@ -151,7 +151,7 @@ bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch)
unsigned int st; unsigned int st;
st = ioread32(rcar_sysc_base + sysc_ch->chan_offs + PWRSR_OFFS); st = ioread32(rcar_sysc_base + sysc_ch->chan_offs + PWRSR_OFFS);
if (st & (1 << sysc_ch->chan_bit)) if (st & BIT(sysc_ch->chan_bit))
return true; return true;
return false; return false;
......
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