aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/ingenic/jz4740-cgu.c
diff options
context:
space:
mode:
authorMaxime Ripard <mripard@kernel.org>2019-10-03 09:59:29 +0200
committerMaxime Ripard <mripard@kernel.org>2019-10-03 09:59:29 +0200
commit77fdaa091d79c87323a9f3912a25f73e02ea2a01 (patch)
tree0e47e2d3c4a966277dbaec075f4685187fdae482 /drivers/clk/ingenic/jz4740-cgu.c
parentdrm/omap: fix max fclk divider for omap36xx (diff)
parentLinux 5.4-rc1 (diff)
downloadlinux-dev-77fdaa091d79c87323a9f3912a25f73e02ea2a01.tar.xz
linux-dev-77fdaa091d79c87323a9f3912a25f73e02ea2a01.zip
Merge drm/drm-fixes into drm-misc-fixes
We haven't backmerged for a while, let's start the -rc period by pulling rc1. Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'drivers/clk/ingenic/jz4740-cgu.c')
-rw-r--r--drivers/clk/ingenic/jz4740-cgu.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/clk/ingenic/jz4740-cgu.c b/drivers/clk/ingenic/jz4740-cgu.c
index 4c0a20949c2c..4f0e92c877d6 100644
--- a/drivers/clk/ingenic/jz4740-cgu.c
+++ b/drivers/clk/ingenic/jz4740-cgu.c
@@ -53,6 +53,10 @@ static const u8 jz4740_cgu_cpccr_div_table[] = {
1, 2, 3, 4, 6, 8, 12, 16, 24, 32,
};
+static const u8 jz4740_cgu_pll_half_div_table[] = {
+ 2, 1,
+};
+
static const struct ingenic_cgu_clk_info jz4740_cgu_clocks[] = {
/* External clocks */
@@ -86,7 +90,10 @@ static const struct ingenic_cgu_clk_info jz4740_cgu_clocks[] = {
[JZ4740_CLK_PLL_HALF] = {
"pll half", CGU_CLK_DIV,
.parents = { JZ4740_CLK_PLL, -1, -1, -1 },
- .div = { CGU_REG_CPCCR, 21, 1, 1, -1, -1, -1 },
+ .div = {
+ CGU_REG_CPCCR, 21, 1, 1, -1, -1, -1,
+ jz4740_cgu_pll_half_div_table,
+ },
},
[JZ4740_CLK_CCLK] = {
@@ -222,6 +229,12 @@ static const struct ingenic_cgu_clk_info jz4740_cgu_clocks[] = {
.parents = { JZ4740_CLK_EXT, -1, -1, -1 },
.gate = { CGU_REG_CLKGR, 5 },
},
+
+ [JZ4740_CLK_TCU] = {
+ "tcu", CGU_CLK_GATE,
+ .parents = { JZ4740_CLK_EXT, -1, -1, -1 },
+ .gate = { CGU_REG_CLKGR, 1 },
+ },
};
static void __init jz4740_cgu_init(struct device_node *np)
@@ -241,4 +254,4 @@ static void __init jz4740_cgu_init(struct device_node *np)
ingenic_cgu_register_syscore_ops(cgu);
}
-CLK_OF_DECLARE(jz4740_cgu, "ingenic,jz4740-cgu", jz4740_cgu_init);
+CLK_OF_DECLARE_DRIVER(jz4740_cgu, "ingenic,jz4740-cgu", jz4740_cgu_init);