diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-05 21:39:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-05 21:39:18 -0400 |
commit | 19bc2eec3cbf9a282b592749a93ec9027d352bf2 (patch) | |
tree | bc7cff4dfebf2b256e62280bb006a494e967d4b2 /drivers/clk/zynq/pll.c | |
parent | 9712d3c377a9868355ea9a611aca3c54f88dc576 (diff) | |
parent | e44df332f30bf3040c60c1ed6674d1431fdb48b9 (diff) |
Merge tag 'clk-for-linus-3.15' of git://git.linaro.org/people/mike.turquette/linux
Pull clock framework changes from Mike Turquette:
"The clock framework changes for 3.15 look similar to past pull
requests. Mostly clock driver updates, more Device Tree support in
the form of common functions useful across platforms and a handful of
features and fixes to the framework core"
* tag 'clk-for-linus-3.15' of git://git.linaro.org/people/mike.turquette/linux: (86 commits)
clk: shmobile: fix setting paretn clock rate
clk: shmobile: rcar-gen2: fix lb/sd0/sd1/sdh clock parent to pll1
clk: Fix minor errors in of_clk_init() function comments
clk: reverse default clk provider initialization order in of_clk_init()
clk: sirf: update copyright years to 2014
clk: mmp: try to use closer one when do round rate
clk: mmp: fix the wrong calculation formula
clk: mmp: fix wrong mask when calculate denominator
clk: st: Adds quadfs clock binding
clk: st: Adds clockgen-vcc and clockgen-mux clock binding
clk: st: Adds clockgen clock binding
clk: st: Adds divmux and prediv clock binding
clk: st: Support for A9 MUX clocks
clk: st: Support for ClockGenA9/DDR/GPU
clk: st: Support for QUADFS inside ClockGenB/C/D/E/F
clk: st: Support for VCC-mux and MUX clocks
clk: st: Support for PLLs inside ClockGenA(s)
clk: st: Support for DIVMUX and PreDiv Clocks
clk: support hardware-specific debugfs entries
clk: s2mps11: Use of_get_child_by_name
...
Diffstat (limited to 'drivers/clk/zynq/pll.c')
-rw-r--r-- | drivers/clk/zynq/pll.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/clk/zynq/pll.c b/drivers/clk/zynq/pll.c index 3226f54fa595..cec97596fe65 100644 --- a/drivers/clk/zynq/pll.c +++ b/drivers/clk/zynq/pll.c | |||
@@ -90,7 +90,7 @@ static unsigned long zynq_pll_recalc_rate(struct clk_hw *hw, | |||
90 | * makes probably sense to redundantly save fbdiv in the struct | 90 | * makes probably sense to redundantly save fbdiv in the struct |
91 | * zynq_pll to save the IO access. | 91 | * zynq_pll to save the IO access. |
92 | */ | 92 | */ |
93 | fbdiv = (readl(clk->pll_ctrl) & PLLCTRL_FBDIV_MASK) >> | 93 | fbdiv = (clk_readl(clk->pll_ctrl) & PLLCTRL_FBDIV_MASK) >> |
94 | PLLCTRL_FBDIV_SHIFT; | 94 | PLLCTRL_FBDIV_SHIFT; |
95 | 95 | ||
96 | return parent_rate * fbdiv; | 96 | return parent_rate * fbdiv; |
@@ -112,7 +112,7 @@ static int zynq_pll_is_enabled(struct clk_hw *hw) | |||
112 | 112 | ||
113 | spin_lock_irqsave(clk->lock, flags); | 113 | spin_lock_irqsave(clk->lock, flags); |
114 | 114 | ||
115 | reg = readl(clk->pll_ctrl); | 115 | reg = clk_readl(clk->pll_ctrl); |
116 | 116 | ||
117 | spin_unlock_irqrestore(clk->lock, flags); | 117 | spin_unlock_irqrestore(clk->lock, flags); |
118 | 118 | ||
@@ -138,10 +138,10 @@ static int zynq_pll_enable(struct clk_hw *hw) | |||
138 | /* Power up PLL and wait for lock */ | 138 | /* Power up PLL and wait for lock */ |
139 | spin_lock_irqsave(clk->lock, flags); | 139 | spin_lock_irqsave(clk->lock, flags); |
140 | 140 | ||
141 | reg = readl(clk->pll_ctrl); | 141 | reg = clk_readl(clk->pll_ctrl); |
142 | reg &= ~(PLLCTRL_RESET_MASK | PLLCTRL_PWRDWN_MASK); | 142 | reg &= ~(PLLCTRL_RESET_MASK | PLLCTRL_PWRDWN_MASK); |
143 | writel(reg, clk->pll_ctrl); | 143 | clk_writel(reg, clk->pll_ctrl); |
144 | while (!(readl(clk->pll_status) & (1 << clk->lockbit))) | 144 | while (!(clk_readl(clk->pll_status) & (1 << clk->lockbit))) |
145 | ; | 145 | ; |
146 | 146 | ||
147 | spin_unlock_irqrestore(clk->lock, flags); | 147 | spin_unlock_irqrestore(clk->lock, flags); |
@@ -168,9 +168,9 @@ static void zynq_pll_disable(struct clk_hw *hw) | |||
168 | /* shut down PLL */ | 168 | /* shut down PLL */ |
169 | spin_lock_irqsave(clk->lock, flags); | 169 | spin_lock_irqsave(clk->lock, flags); |
170 | 170 | ||
171 | reg = readl(clk->pll_ctrl); | 171 | reg = clk_readl(clk->pll_ctrl); |
172 | reg |= PLLCTRL_RESET_MASK | PLLCTRL_PWRDWN_MASK; | 172 | reg |= PLLCTRL_RESET_MASK | PLLCTRL_PWRDWN_MASK; |
173 | writel(reg, clk->pll_ctrl); | 173 | clk_writel(reg, clk->pll_ctrl); |
174 | 174 | ||
175 | spin_unlock_irqrestore(clk->lock, flags); | 175 | spin_unlock_irqrestore(clk->lock, flags); |
176 | } | 176 | } |
@@ -225,9 +225,9 @@ struct clk *clk_register_zynq_pll(const char *name, const char *parent, | |||
225 | 225 | ||
226 | spin_lock_irqsave(pll->lock, flags); | 226 | spin_lock_irqsave(pll->lock, flags); |
227 | 227 | ||
228 | reg = readl(pll->pll_ctrl); | 228 | reg = clk_readl(pll->pll_ctrl); |
229 | reg &= ~PLLCTRL_BPQUAL_MASK; | 229 | reg &= ~PLLCTRL_BPQUAL_MASK; |
230 | writel(reg, pll->pll_ctrl); | 230 | clk_writel(reg, pll->pll_ctrl); |
231 | 231 | ||
232 | spin_unlock_irqrestore(pll->lock, flags); | 232 | spin_unlock_irqrestore(pll->lock, flags); |
233 | 233 | ||