summaryrefslogtreecommitdiffstats
path: root/drivers/clk/zte/clk.h
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2017-03-21 16:38:22 +0800
committerMichael Turquette <mturquette@baylibre.com>2017-04-12 18:51:31 +0200
commitee249cbe42f19a7edac0e8cbb95064845e2e5218 (patch)
treeee5b271043670ee82d5f62876dd77563cbb2f0f3 /drivers/clk/zte/clk.h
parent5790d801762c588c63b41fbdbdb8295cfd6036e6 (diff)
downloadlinux-ee249cbe42f19a7edac0e8cbb95064845e2e5218.tar.bz2
clk: zte: pd_bit is not 0 on zx296718
The bit 0 of PLL_CFG0 register is not powerdown on zx296718, but part of of postdiv2 field. The consequence is that functions like hw_to_idx() and zx_pll_enable() will end up tampering the postdiv2 of the PLL. Let's fix it by defining pd_bit 0xff which is obviously invalid for a bit position and having PLL driver check the validity before operating on the bit. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Diffstat (limited to 'drivers/clk/zte/clk.h')
-rw-r--r--drivers/clk/zte/clk.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/clk/zte/clk.h b/drivers/clk/zte/clk.h
index 84a55a3e2bd4..4df0f121b56d 100644
--- a/drivers/clk/zte/clk.h
+++ b/drivers/clk/zte/clk.h
@@ -66,8 +66,12 @@ struct clk_zx_pll {
CLK_GET_RATE_NOCACHE), \
}
+/*
+ * The pd_bit is not available on ZX296718, so let's pass something
+ * bigger than 31, e.g. 0xff, to indicate that.
+ */
#define ZX296718_PLL(_name, _parent, _reg, _table) \
-ZX_PLL(_name, _parent, _reg, _table, 0, 30)
+ZX_PLL(_name, _parent, _reg, _table, 0xff, 30)
struct zx_clk_gate {
struct clk_gate gate;