aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2014-12-24 08:31:06 -0500
committerHeiko Stuebner <heiko@sntech.de>2014-12-28 17:30:08 -0500
commit12551f0239b50c88352e3292dd7703382addbf5e (patch)
treed625ebbb9186d54d9d823d104be51c283dd95175 /drivers/clk
parent5039d16abe250102c021557184950c47566170a4 (diff)
clk: rockchip: fix rk3066 pll lock bit location
The bit locations indicating the locking status of the plls on rk3066 are shifted by one to the right when compared to the rk3188, bits [7:4] instead of [8:5] on the rk3188, thus indicating the locking state of the wrong pll or a completely different information in case of the gpll. The recently introduced pll init code exposed that problem on some rk3066 boards when it tried to bring the boot-pll value in line with the value from the rate table. Fix this by defining separate pll definitions for rk3066 with the correct locking indices. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Fixes: 2c14736c75db ("clk: rockchip: add clock driver for rk3188 and rk3066 clocks") Tested-by: FUKAUMI Naoki <naobsd@gmail.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/rockchip/clk-rk3188.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-rk3188.c
index b32fcdaea699..7eb684c50d42 100644
--- a/drivers/clk/rockchip/clk-rk3188.c
+++ b/drivers/clk/rockchip/clk-rk3188.c
@@ -210,6 +210,17 @@ PNAME(mux_sclk_hsadc_p) = { "hsadc_src", "hsadc_frac", "ext_hsadc" };
210PNAME(mux_mac_p) = { "gpll", "dpll" }; 210PNAME(mux_mac_p) = { "gpll", "dpll" };
211PNAME(mux_sclk_macref_p) = { "mac_src", "ext_rmii" }; 211PNAME(mux_sclk_macref_p) = { "mac_src", "ext_rmii" };
212 212
213static struct rockchip_pll_clock rk3066_pll_clks[] __initdata = {
214 [apll] = PLL(pll_rk3066, PLL_APLL, "apll", mux_pll_p, 0, RK2928_PLL_CON(0),
215 RK2928_MODE_CON, 0, 5, 0, rk3188_pll_rates),
216 [dpll] = PLL(pll_rk3066, PLL_DPLL, "dpll", mux_pll_p, 0, RK2928_PLL_CON(4),
217 RK2928_MODE_CON, 4, 4, 0, NULL),
218 [cpll] = PLL(pll_rk3066, PLL_CPLL, "cpll", mux_pll_p, 0, RK2928_PLL_CON(8),
219 RK2928_MODE_CON, 8, 6, ROCKCHIP_PLL_SYNC_RATE, rk3188_pll_rates),
220 [gpll] = PLL(pll_rk3066, PLL_GPLL, "gpll", mux_pll_p, 0, RK2928_PLL_CON(12),
221 RK2928_MODE_CON, 12, 7, ROCKCHIP_PLL_SYNC_RATE, rk3188_pll_rates),
222};
223
213static struct rockchip_pll_clock rk3188_pll_clks[] __initdata = { 224static struct rockchip_pll_clock rk3188_pll_clks[] __initdata = {
214 [apll] = PLL(pll_rk3066, PLL_APLL, "apll", mux_pll_p, 0, RK2928_PLL_CON(0), 225 [apll] = PLL(pll_rk3066, PLL_APLL, "apll", mux_pll_p, 0, RK2928_PLL_CON(0),
215 RK2928_MODE_CON, 0, 6, 0, rk3188_pll_rates), 226 RK2928_MODE_CON, 0, 6, 0, rk3188_pll_rates),
@@ -737,8 +748,8 @@ static void __init rk3188_common_clk_init(struct device_node *np)
737static void __init rk3066a_clk_init(struct device_node *np) 748static void __init rk3066a_clk_init(struct device_node *np)
738{ 749{
739 rk3188_common_clk_init(np); 750 rk3188_common_clk_init(np);
740 rockchip_clk_register_plls(rk3188_pll_clks, 751 rockchip_clk_register_plls(rk3066_pll_clks,
741 ARRAY_SIZE(rk3188_pll_clks), 752 ARRAY_SIZE(rk3066_pll_clks),
742 RK3066_GRF_SOC_STATUS); 753 RK3066_GRF_SOC_STATUS);
743 rockchip_clk_register_branches(rk3066a_clk_branches, 754 rockchip_clk_register_branches(rk3066a_clk_branches,
744 ARRAY_SIZE(rk3066a_clk_branches)); 755 ARRAY_SIZE(rk3066a_clk_branches));