clk: vt8500: updates for 3.11
Subsystems (2)
cover clk: vt8500: updates for 3.11
Hi Mike,
Two updates for the arch-vt8500 clock code:
#1: Add support for the WM8850 PLL.
#2: Remove a second divisor check in vt8500_dclk_set_rate() which causes the divisor to be round-down too low.
Regards
Tony Prisk
Tony Prisk (2):
clk: vt8500: Add support for clocks on the WM8850 SoCs
clk: vt8500: Remove unnecessary divisor adjustment in
vtwm_dclk_set_rate()
Documentation/devicetree/bindings/clock/vt8500.txt | 2 + drivers/clk/clk-vt8500.c | 75 ++++++++++++++++++-- 2 files changed, 73 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/2 clk: vt8500: Add support for clocks on the WM8850 SoCs
The WM8850 has a different PLL clock to the previous versions. This patch adds support for the WM8850-style PLL clocks.
--- Documentation/devicetree/bindings/clock/vt8500.txt | 2 + drivers/clk/clk-vt8500.c | 71 ++++++++++++++++++++ 2 files changed, 73 insertions(+)
Documentation/devicetree/bindings/clock/vt8500.txt +2 -0
@@ -8,6 +8,8 @@ Required properties: - compatible : shall be one of the following: "via,vt8500-pll-clock" - for a VT8500/WM8505 PLL clock "wm,wm8650-pll-clock" - for a WM8650 PLL clock + "wm,wm8750-pll-clock" - for a WM8750 PLL clock + "wm,wm8850-pll-clock" - for a WM8850 PLL clock "via,vt8500-device-clock" - for a VT/WM device clock Required properties for PLL clocks:
drivers/clk/clk-vt8500.c +71 -0
113 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 2/2 clk: vt8500: Remove unnecessary divisor adjustment in vtwm_dclk_set_rate()
In reply to Tony PriskThe divisor adjustment code to ensure that a divisor is not rounded down, thereby giving a rate higher than requested, is unnecessary and in some instances results in the actual rate being much lower than requested due to rounding errors.
The test is already performed in vtwm_dclk_round_rate(), which is always called when clk_set_rate is called. Due to rounding errors in the line:
divisor = parent_rate / rate (clk-vt8500.c:160) we will sometimes end up adjusting the divisor twice - first in round_rate and then again in set_rate.
This patch removes the test/adjustment in vtwm_dclk_set_rate.
--- drivers/clk/clk-vt8500.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/clk/clk-vt8500.c +0 -4
@@ -157,10 +157,6 @@ static int vt8500_dclk_set_rate(struct clk_hw *hw, unsigned long rate, divisor = parent_rate / rate; -/* If prate / rate would be decimal, incr the divisor */ -if (rate * divisor < parent_rate) - divisor++; -if (divisor == cdev->div_mask +1 ) divisor =0 ;
Signature · 1 line
1.7.9.5
cover clk: vt8500: updates for 3.11
In reply to Tony PriskQuoting Tony Prisk (2013-05-13 01:20:58)
Quoted 8 lines
Hi Mike,
Two updates for the arch-vt8500 clock code:
#1: Add support for the WM8850 PLL.
#2: Remove a second divisor check invt8500_dclk_set_rate()which causes the divisor to be round-down too low.
Taken both into clk-next.
Thanks,
Mike
Quoted 14 lines
Regards
Tony PriskTony Prisk (2):
clk: vt8500: Add support for clocks on the WM8850 SoCs
clk: vt8500: Remove unnecessary divisor adjustment in
vtwm_dclk_set_rate()Documentation/devicetree/bindings/clock/vt8500.txt | 2 + drivers/clk/clk-vt8500.c | 75 ++++++++++++++++++-- 2 files changed, 73 insertions(+), 4 deletions(-)Signature · 1 line
1.7.9.5