Skip to content

Commit

Permalink
sh: use ioread32/iowrite32 and mapped_reg for mstp32
Browse files Browse the repository at this point in the history
Convert the CPG MSTP32 helper code to use the new mapped_reg
together with ioread32() and iowrite32().

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Dec 9, 2011
1 parent eda2030 commit b3ab82b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/sh/clk/cpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@

static int sh_clk_mstp32_enable(struct clk *clk)
{
__raw_writel(__raw_readl(clk->enable_reg) & ~(1 << clk->enable_bit),
clk->enable_reg);
iowrite32(ioread32(clk->mapped_reg) & ~(1 << clk->enable_bit),
clk->mapped_reg);
return 0;
}

static void sh_clk_mstp32_disable(struct clk *clk)
{
__raw_writel(__raw_readl(clk->enable_reg) | (1 << clk->enable_bit),
clk->enable_reg);
iowrite32(ioread32(clk->mapped_reg) | (1 << clk->enable_bit),
clk->mapped_reg);
}

static struct clk_ops sh_clk_mstp32_clk_ops = {
Expand Down

0 comments on commit b3ab82b

Please sign in to comment.