linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: meson: g12a: mark fclk_div2 as critical
@ 2020-08-27 21:43 Stefan Agner
  2020-08-28 13:52 ` Jerome Brunet
  2020-08-28 14:30 ` Anand Moon
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Agner @ 2020-08-27 21:43 UTC (permalink / raw)
  To: narmstrong, jbrunet
  Cc: mturquette, sboyd, khilman, linux-amlogic, linux-clk,
	linux-arm-kernel, linux-kernel, stefan

On Amlogic Meson G12b platform, similar to fclk_div3, the fclk_div2
seems to be necessary for the system to operate correctly as well.

Typically, the clock also gets chosen by the eMMC peripheral. This
probably masked the problem so far. However, when booting from a SD
card the clock seems to get disabled which leads to a system freeze.

Let's mark this clock as critical, fixing boot from SD card on G12b
platforms.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 drivers/clk/meson/g12a.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index fad616cac01e..2214b974f748 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -298,6 +298,7 @@ static struct clk_regmap g12a_fclk_div2 = {
 			&g12a_fclk_div2_div.hw
 		},
 		.num_parents = 1,
+		.flags = CLK_IS_CRITICAL,
 	},
 };
 
-- 
2.28.0


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

* Re: [PATCH] clk: meson: g12a: mark fclk_div2 as critical
  2020-08-27 21:43 [PATCH] clk: meson: g12a: mark fclk_div2 as critical Stefan Agner
@ 2020-08-28 13:52 ` Jerome Brunet
  2020-08-28 14:30 ` Anand Moon
  1 sibling, 0 replies; 3+ messages in thread
From: Jerome Brunet @ 2020-08-28 13:52 UTC (permalink / raw)
  To: Stefan Agner, narmstrong
  Cc: mturquette, sboyd, khilman, linux-amlogic, linux-clk,
	linux-arm-kernel, linux-kernel, Marek Szyprowski


On Thu 27 Aug 2020 at 23:43, Stefan Agner <stefan@agner.ch> wrote:

> On Amlogic Meson G12b platform, similar to fclk_div3, the fclk_div2
> seems to be necessary for the system to operate correctly as well.
>
> Typically, the clock also gets chosen by the eMMC peripheral. This
> probably masked the problem so far. However, when booting from a SD
> card the clock seems to get disabled which leads to a system freeze.
>
> Let's mark this clock as critical, fixing boot from SD card on G12b
> platforms.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
>  drivers/clk/meson/g12a.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
> index fad616cac01e..2214b974f748 100644
> --- a/drivers/clk/meson/g12a.c
> +++ b/drivers/clk/meson/g12a.c
> @@ -298,6 +298,7 @@ static struct clk_regmap g12a_fclk_div2 = {
>  			&g12a_fclk_div2_div.hw
>  		},
>  		.num_parents = 1,
> +		.flags = CLK_IS_CRITICAL,
>  	},
>  };

Hi Stephan,

Thanks for reporting and fixing this. That's unfortunately the things we
have to find the "hard way"

Could you please:
1) add a Fixes tag to commit description so stable can pick it up

Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller")

2) Add a comment similar to the comment block of fdiv3 so we are pretty
clear why this clock needs to be critical and don't have to dig in
history find out.

Also please Cc Marek Szyprowski <m.szyprowski@samsung.com> ... you guys
apparently found this at them time :)

Thanks

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

* Re: [PATCH] clk: meson: g12a: mark fclk_div2 as critical
  2020-08-27 21:43 [PATCH] clk: meson: g12a: mark fclk_div2 as critical Stefan Agner
  2020-08-28 13:52 ` Jerome Brunet
@ 2020-08-28 14:30 ` Anand Moon
  1 sibling, 0 replies; 3+ messages in thread
From: Anand Moon @ 2020-08-28 14:30 UTC (permalink / raw)
  To: Stefan Agner
  Cc: Neil Armstrong, Jerome Brunet, Stephen Boyd, Kevin Hilman,
	Michael Turquette, Linux Kernel, linux-amlogic,
	open list:COMMON CLK FRAMEWORK, linux-arm-kernel

Hi Stefan,

On Fri, 28 Aug 2020 at 03:14, Stefan Agner <stefan@agner.ch> wrote:
>
> On Amlogic Meson G12b platform, similar to fclk_div3, the fclk_div2
> seems to be necessary for the system to operate correctly as well.
>
> Typically, the clock also gets chosen by the eMMC peripheral. This
> probably masked the problem so far. However, when booting from a SD
> card the clock seems to get disabled which leads to a system freeze.
>
> Let's mark this clock as critical, fixing boot from SD card on G12b
> platforms.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---

Thank you for this patch. I reported this a long time ago but could
not solve it.
Please add my
Tested-by: Anand Moon <linux.amoon@gmail.com>



>  drivers/clk/meson/g12a.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
> index fad616cac01e..2214b974f748 100644
> --- a/drivers/clk/meson/g12a.c
> +++ b/drivers/clk/meson/g12a.c
> @@ -298,6 +298,7 @@ static struct clk_regmap g12a_fclk_div2 = {
>                         &g12a_fclk_div2_div.hw
>                 },
>                 .num_parents = 1,
> +               .flags = CLK_IS_CRITICAL,
>         },
>  };
>
> --
> 2.28.0
>
>
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, other threads:[~2020-08-28 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 21:43 [PATCH] clk: meson: g12a: mark fclk_div2 as critical Stefan Agner
2020-08-28 13:52 ` Jerome Brunet
2020-08-28 14:30 ` Anand Moon

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).