linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: meson: g12a: mark fclk_div2 as CLK_IGNORE_UNUSED
       [not found] <CGME20200828130714eucas1p26b45e68ee12ca6c31b0ebe62bf699ba7@eucas1p2.samsung.com>
@ 2020-08-28 13:07 ` Marek Szyprowski
  2020-08-28 13:41   ` Jerome Brunet
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Szyprowski @ 2020-08-28 13:07 UTC (permalink / raw)
  To: linux-amlogic, linux-kernel, linux-clk
  Cc: Marek Szyprowski, Neil Armstrong, Jerome Brunet, Kevin Hilman,
	Martin Blumenstingl, Stephen Boyd, Bartlomiej Zolnierkiewicz

Add CLK_IGNORE_UNUSED flag to the "fclk_div2" clock to fix boot hang on
the Hardkernel's Odroid N2 board (with bootloader booted from SD card and
kernel loaded via FTFP).

It looks that this clock is disabled by the generic unused clocks
scanning code before it gets enabled by the meson-gx-mmc driver.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
Without this patch the only way to boot OdroidN2 board with mainline
kernel is to append clk_ignore_unused kernel parameter. I've build the
kernel from the default arm64's defconfig. The kernel is loaded via TFTP
using vendor's u-boot.
---
 drivers/clk/clk.c        | 5 +++++
 drivers/clk/meson/g12a.c | 1 +
 2 files changed, 6 insertions(+)

diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index 9803d44bb157..4106b6231be4 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_IGNORE_UNUSED,
 	},
 };
 
-- 
2.17.1


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

* Re: [PATCH] clk: meson: g12a: mark fclk_div2 as CLK_IGNORE_UNUSED
  2020-08-28 13:07 ` [PATCH] clk: meson: g12a: mark fclk_div2 as CLK_IGNORE_UNUSED Marek Szyprowski
@ 2020-08-28 13:41   ` Jerome Brunet
  0 siblings, 0 replies; 2+ messages in thread
From: Jerome Brunet @ 2020-08-28 13:41 UTC (permalink / raw)
  To: Marek Szyprowski, linux-amlogic, linux-kernel, linux-clk
  Cc: Neil Armstrong, Kevin Hilman, Martin Blumenstingl, Stephen Boyd,
	Bartlomiej Zolnierkiewicz


On Fri 28 Aug 2020 at 15:07, Marek Szyprowski <m.szyprowski@samsung.com> wrote:

> Add CLK_IGNORE_UNUSED flag to the "fclk_div2" clock to fix boot hang on
> the Hardkernel's Odroid N2 board (with bootloader booted from SD card and
> kernel loaded via FTFP).
>
> It looks that this clock is disabled by the generic unused clocks
> scanning code before it gets enabled by the meson-gx-mmc driver.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> Without this patch the only way to boot OdroidN2 board with mainline
> kernel is to append clk_ignore_unused kernel parameter. I've build the
> kernel from the default arm64's defconfig. The kernel is loaded via TFTP
> using vendor's u-boot.
> ---
>  drivers/clk/clk.c        | 5 +++++
>  drivers/clk/meson/g12a.c | 1 +
>  2 files changed, 6 insertions(+)
>
> diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
> index 9803d44bb157..4106b6231be4 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_IGNORE_UNUSED,

Hi Marek,

I just received another patch making this clock critical which I'm more
inclined to take. It should solve this problem you reporting as well.

In general CLK_IGNORE_UNUSED is not best way to address these problems as
a particular race condition (with probe defferal for ex) could still
turn the clock off ... which is apparently something we can't tolerate.

Thanks for reporting

>  	},
>  };


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200828130714eucas1p26b45e68ee12ca6c31b0ebe62bf699ba7@eucas1p2.samsung.com>
2020-08-28 13:07 ` [PATCH] clk: meson: g12a: mark fclk_div2 as CLK_IGNORE_UNUSED Marek Szyprowski
2020-08-28 13:41   ` Jerome Brunet

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