linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: imx6q: demote warning about pre-boot ldb_di_clk reparenting
@ 2020-11-13 14:53 Ahmad Fatoum
  2020-11-25  2:17 ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2020-11-13 14:53 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team
  Cc: Ahmad Fatoum, Fabio Estevam, Michael Turquette, Stephen Boyd,
	linux-clk, linux-arm-kernel, linux-kernel

Since 5d283b083800 ("clk: imx6: Fix procedure to switch the parent
of LDB_DI_CLK"), the clock driver warns if ldb_di\d_sel is changed
from reset value on system boot. This warning is printed even if
the bootloader (or a previous kernel that did kexec) followed the
correct procedure for glitch-free reparenting.

As such systems are doing everything correctly, a warning is too
harsh. Demote to a notice, so users are still alerted, but without
cluttering a loglevel=5 boot.

Cc: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/clk/imx/clk-imx6q.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
index ba33c79158de..b2e4b6234ac0 100644
--- a/drivers/clk/imx/clk-imx6q.c
+++ b/drivers/clk/imx/clk-imx6q.c
@@ -337,10 +337,10 @@ static void init_ldb_clks(struct device_node *np, void __iomem *ccm_base)
 	of_assigned_ldb_sels(np, &sel[0][3], &sel[1][3]);
 
 	for (i = 0; i < 2; i++) {
-		/* Warn if a glitch might have been introduced already */
+		/* Print a notice if a glitch might have been introduced already */
 		if (sel[i][0] != 3) {
-			pr_warn("ccm: ldb_di%d_sel already changed from reset value: %d\n",
-				i, sel[i][0]);
+			pr_notice("ccm: ldb_di%d_sel already changed from reset value: %d\n",
+				  i, sel[i][0]);
 		}
 
 		if (sel[i][0] == sel[i][3])
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: imx6q: demote warning about pre-boot ldb_di_clk reparenting
  2020-11-13 14:53 [PATCH] clk: imx6q: demote warning about pre-boot ldb_di_clk reparenting Ahmad Fatoum
@ 2020-11-25  2:17 ` Stephen Boyd
  2021-01-18 11:30   ` Ahmad Fatoum
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2020-11-25  2:17 UTC (permalink / raw)
  To: Ahmad Fatoum, Fabio Estevam, NXP Linux Team,
	Pengutronix Kernel Team, Sascha Hauer, Shawn Guo
  Cc: Ahmad Fatoum, Fabio Estevam, Michael Turquette, linux-clk,
	linux-arm-kernel, linux-kernel

Quoting Ahmad Fatoum (2020-11-13 06:53:09)
> diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
> index ba33c79158de..b2e4b6234ac0 100644
> --- a/drivers/clk/imx/clk-imx6q.c
> +++ b/drivers/clk/imx/clk-imx6q.c
> @@ -337,10 +337,10 @@ static void init_ldb_clks(struct device_node *np, void __iomem *ccm_base)
>         of_assigned_ldb_sels(np, &sel[0][3], &sel[1][3]);
>  
>         for (i = 0; i < 2; i++) {
> -               /* Warn if a glitch might have been introduced already */
> +               /* Print a notice if a glitch might have been introduced already */
>                 if (sel[i][0] != 3) {
> -                       pr_warn("ccm: ldb_di%d_sel already changed from reset value: %d\n",
> -                               i, sel[i][0]);
> +                       pr_notice("ccm: ldb_di%d_sel already changed from reset value: %d\n",

Maybe the print should also say "Possible glitch"?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: imx6q: demote warning about pre-boot ldb_di_clk reparenting
  2020-11-25  2:17 ` Stephen Boyd
@ 2021-01-18 11:30   ` Ahmad Fatoum
  0 siblings, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2021-01-18 11:30 UTC (permalink / raw)
  To: Stephen Boyd, Fabio Estevam, NXP Linux Team,
	Pengutronix Kernel Team, Sascha Hauer, Shawn Guo
  Cc: Fabio Estevam, Michael Turquette, linux-clk, linux-arm-kernel,
	linux-kernel

Hello Stephen,

On 25.11.20 03:17, Stephen Boyd wrote:
> Quoting Ahmad Fatoum (2020-11-13 06:53:09)
>> diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
>> index ba33c79158de..b2e4b6234ac0 100644
>> --- a/drivers/clk/imx/clk-imx6q.c
>> +++ b/drivers/clk/imx/clk-imx6q.c
>> @@ -337,10 +337,10 @@ static void init_ldb_clks(struct device_node *np, void __iomem *ccm_base)
>>         of_assigned_ldb_sels(np, &sel[0][3], &sel[1][3]);
>>  
>>         for (i = 0; i < 2; i++) {
>> -               /* Warn if a glitch might have been introduced already */
>> +               /* Print a notice if a glitch might have been introduced already */
>>                 if (sel[i][0] != 3) {
>> -                       pr_warn("ccm: ldb_di%d_sel already changed from reset value: %d\n",
>> -                               i, sel[i][0]);
>> +                       pr_notice("ccm: ldb_di%d_sel already changed from reset value: %d\n",
> 
> Maybe the print should also say "Possible glitch"?

Somehow missed this reply completely.
Yes, adding "possible glitch" improves the usefulness of the message,
I just sent out a v2.

Thanks,
Ahmad
 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-18 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 14:53 [PATCH] clk: imx6q: demote warning about pre-boot ldb_di_clk reparenting Ahmad Fatoum
2020-11-25  2:17 ` Stephen Boyd
2021-01-18 11:30   ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).