diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2017-07-09 15:28:09 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2017-07-17 20:50:59 +0200 |
commit | 325b7b90f9a87a4bdee7059d10bd98a11154ceae (patch) | |
tree | bf5c6e46c00c3c2283a1d6ead1a6332ab7cf397c /drivers/clk/clk-versaclock5.c | |
parent | clk: vc5: Fix trivial typo (diff) | |
download | linux-325b7b90f9a87a4bdee7059d10bd98a11154ceae.tar.xz linux-325b7b90f9a87a4bdee7059d10bd98a11154ceae.zip |
clk: vc5: Do not warn about disabled output buffer input muxes
The output buffer input mux can be configured in either of three
states -- disabled, input from FOD, input from previous output.
If the output buffer input mux is set to disabled, the code in
vc5_clk_out_get_parent() would consider this an invalid setting
and warn about it, which is not necessarily the case.
In case the output buffer input mux is disabled, default to input
from FOD to have some parent and don't print the warning.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Alexey Firago <alexey_firago@mentor.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-renesas-soc@vger.kernel.org
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # Salvator-XS with the display LVDS output.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clk-versaclock5.c')
-rw-r--r-- | drivers/clk/clk-versaclock5.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c index b70c2e684de6..185d7a5d36e0 100644 --- a/drivers/clk/clk-versaclock5.c +++ b/drivers/clk/clk-versaclock5.c @@ -541,6 +541,9 @@ static unsigned char vc5_clk_out_get_parent(struct clk_hw *hw) regmap_read(vc5->regmap, VC5_OUT_DIV_CONTROL(hwdata->num), &src); src &= mask; + if (src == 0) /* Input mux set to DISABLED */ + return 0; + if ((src & fodclkmask) == VC5_OUT_DIV_CONTROL_EN_FOD) return 0; |