diff mbox

[3/8] clk: vc5: Do not warn about disabled output buffer input muxes

Message ID 20170629101851.23972-3-marek.vasut@gmail.com (mailing list archive)
State Superseded
Headers show

Commit Message

Marek Vasut June 29, 2017, 10:18 a.m. UTC
From: Marek Vasut <marek.vasut+renesas@gmail.com>

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
---
 drivers/clk/clk-versaclock5.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stephen Boyd June 30, 2017, 7:26 p.m. UTC | #1
On 06/29, Marek Vasut wrote:
> @@ -549,6 +552,7 @@ static unsigned char vc5_clk_out_get_parent(struct clk_hw *hw)
>  
>  	dev_warn(&vc5->client->dev,
>  		 "Invalid clock output configuration (%02x)\n", src);
> +
>  	return 0;
>  }
>  

Please drop this hunk as it isn't relevant to the patch.
Marek Vasut July 1, 2017, 8 p.m. UTC | #2
On 06/30/2017 09:26 PM, Stephen Boyd wrote:
> On 06/29, Marek Vasut wrote:
>> @@ -549,6 +552,7 @@ static unsigned char vc5_clk_out_get_parent(struct clk_hw *hw)
>>  
>>  	dev_warn(&vc5->client->dev,
>>  		 "Invalid clock output configuration (%02x)\n", src);
>> +
>>  	return 0;
>>  }
>>  
> 
> Please drop this hunk as it isn't relevant to the patch.
> 
Done in V2, thanks.
diff mbox

Patch

diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c
index d835d48cf14d..766fcc5cc0b3 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;
 
@@ -549,6 +552,7 @@  static unsigned char vc5_clk_out_get_parent(struct clk_hw *hw)
 
 	dev_warn(&vc5->client->dev,
 		 "Invalid clock output configuration (%02x)\n", src);
+
 	return 0;
 }