aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/ingenic/jz4725b-cgu.c
diff options
context:
space:
mode:
author周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>2020-05-28 11:15:44 +0800
committerStephen Boyd <sboyd@kernel.org>2020-05-28 16:13:15 -0700
commit9d9cc58aff468c1589df09ac12e4e79b1eaba6db (patch)
tree80a1b469fa7564e180458cb9c6d732f9753441ae /drivers/clk/ingenic/jz4725b-cgu.c
parentclk: Ingenic: Remove unnecessary spinlock when reading registers. (diff)
downloadlinux-dev-9d9cc58aff468c1589df09ac12e4e79b1eaba6db.tar.xz
linux-dev-9d9cc58aff468c1589df09ac12e4e79b1eaba6db.zip
clk: Ingenic: Adjust cgu code to make it compatible with X1830.
The PLL of X1830 Soc from Ingenic has been greatly changed, the bypass control is placed in another register, so now two registers may needed to control the PLL. To this end, a new "bypass_reg" was introduced. In addition, when calculating rate, the PLL of X1830 introduced an extra 2x multiplier, so a new "rate_multiplier" was introduced. And adjust the code in jz47xx-cgu.c and x1000-cgu.c, make it to be compatible with the new cgu code. Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Link: https://lkml.kernel.org/r/20200528031549.13846-3-zhouyanjie@wanyeetech.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/ingenic/jz4725b-cgu.c')
-rw-r--r--drivers/clk/ingenic/jz4725b-cgu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/clk/ingenic/jz4725b-cgu.c b/drivers/clk/ingenic/jz4725b-cgu.c
index a3b4635f6278..8c38e72d14a7 100644
--- a/drivers/clk/ingenic/jz4725b-cgu.c
+++ b/drivers/clk/ingenic/jz4725b-cgu.c
@@ -9,7 +9,9 @@
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/of.h>
+
#include <dt-bindings/clock/jz4725b-cgu.h>
+
#include "cgu.h"
#include "pm.h"
@@ -54,6 +56,7 @@ static const struct ingenic_cgu_clk_info jz4725b_cgu_clocks[] = {
.parents = { JZ4725B_CLK_EXT, -1, -1, -1 },
.pll = {
.reg = CGU_REG_CPPCR,
+ .rate_multiplier = 1,
.m_shift = 23,
.m_bits = 9,
.m_offset = 2,
@@ -65,6 +68,7 @@ static const struct ingenic_cgu_clk_info jz4725b_cgu_clocks[] = {
.od_max = 4,
.od_encoding = pll_od_encoding,
.stable_bit = 10,
+ .bypass_reg = CGU_REG_CPPCR,
.bypass_bit = 9,
.enable_bit = 8,
},