aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clkt_clksel.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2013-10-22 04:49:58 -0400
committerMike Turquette <mturquette@linaro.org>2014-01-17 15:37:00 -0500
commit519ab8b202f37fb76cc6f32ef34da79716680d03 (patch)
tree2ac756c18fdde46c718b53a0b4fae7fc933d3147 /arch/arm/mach-omap2/clkt_clksel.c
parent3ada6b10aaf2ff5c7dc6e8add6fdf1b7333d1b34 (diff)
ARM: OMAP2+: clock: use driver API instead of direct memory read/write
Clock nodes shall use the services provided by underlying drivers to access the hardware registers instead of direct memory read/write. Thus, change all the code to use the new omap2_clk_readl / omap2_clk_writel APIs for this. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'arch/arm/mach-omap2/clkt_clksel.c')
-rw-r--r--arch/arm/mach-omap2/clkt_clksel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/clkt_clksel.c b/arch/arm/mach-omap2/clkt_clksel.c
index 0ec9f6fdf046..7ee26108ac0d 100644
--- a/arch/arm/mach-omap2/clkt_clksel.c
+++ b/arch/arm/mach-omap2/clkt_clksel.c
@@ -97,12 +97,12 @@ static void _write_clksel_reg(struct clk_hw_omap *clk, u32 field_val)
97{ 97{
98 u32 v; 98 u32 v;
99 99
100 v = __raw_readl(clk->clksel_reg); 100 v = omap2_clk_readl(clk, clk->clksel_reg);
101 v &= ~clk->clksel_mask; 101 v &= ~clk->clksel_mask;
102 v |= field_val << __ffs(clk->clksel_mask); 102 v |= field_val << __ffs(clk->clksel_mask);
103 __raw_writel(v, clk->clksel_reg); 103 omap2_clk_writel(v, clk, clk->clksel_reg);
104 104
105 v = __raw_readl(clk->clksel_reg); /* OCP barrier */ 105 v = omap2_clk_readl(clk, clk->clksel_reg); /* OCP barrier */
106} 106}
107 107
108/** 108/**
@@ -204,7 +204,7 @@ static u32 _read_divisor(struct clk_hw_omap *clk)
204 if (!clk->clksel || !clk->clksel_mask) 204 if (!clk->clksel || !clk->clksel_mask)
205 return 0; 205 return 0;
206 206
207 v = __raw_readl(clk->clksel_reg); 207 v = omap2_clk_readl(clk, clk->clksel_reg);
208 v &= clk->clksel_mask; 208 v &= clk->clksel_mask;
209 v >>= __ffs(clk->clksel_mask); 209 v >>= __ffs(clk->clksel_mask);
210 210
@@ -320,7 +320,7 @@ u8 omap2_clksel_find_parent_index(struct clk_hw *hw)
320 WARN((!clk->clksel || !clk->clksel_mask), 320 WARN((!clk->clksel || !clk->clksel_mask),
321 "clock: %s: attempt to call on a non-clksel clock", clk_name); 321 "clock: %s: attempt to call on a non-clksel clock", clk_name);
322 322
323 r = __raw_readl(clk->clksel_reg) & clk->clksel_mask; 323 r = omap2_clk_readl(clk, clk->clksel_reg) & clk->clksel_mask;
324 r >>= __ffs(clk->clksel_mask); 324 r >>= __ffs(clk->clksel_mask);
325 325
326 for (clks = clk->clksel; clks->parent && !found; clks++) { 326 for (clks = clk->clksel; clks->parent && !found; clks++) {