clk: zte: pd_bit is not 0 on zx296718
authorShawn Guo <shawn.guo@linaro.org>
Tue, 21 Mar 2017 08:38:22 +0000 (16:38 +0800)
committerMichael Turquette <mturquette@baylibre.com>
Wed, 12 Apr 2017 16:51:31 +0000 (18:51 +0200)
commitee249cbe42f19a7edac0e8cbb95064845e2e5218
treeee5b271043670ee82d5f62876dd77563cbb2f0f3
parent5790d801762c588c63b41fbdbdb8295cfd6036e6
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>
drivers/clk/zte/clk.c
drivers/clk/zte/clk.h