All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] clk: meson: g12a: mark fclk_div2 as critical
@ 2020-08-28 15:52 ` Stefan Agner
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Agner @ 2020-08-28 15:52 UTC (permalink / raw)
  To: narmstrong, jbrunet
  Cc: mturquette, sboyd, khilman, linux-amlogic, linux-clk,
	linux-arm-kernel, linux-kernel, stefan, Marek Szyprowski,
	Anand Moon

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.

Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller")
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Tested-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/clk/meson/g12a.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index fad616cac01e..6d44cadc06af 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -298,6 +298,17 @@ static struct clk_regmap g12a_fclk_div2 = {
 			&g12a_fclk_div2_div.hw
 		},
 		.num_parents = 1,
+		/*
+		 * Similar to fclk_div3, it seems that this clock is used by
+		 * the resident firmware and is required by the platform to
+		 * operate correctly.
+		 * Until the following condition are met, we need this clock to
+		 * be marked as critical:
+		 * a) Mark the clock used by a firmware resource, if possible
+		 * b) CCF has a clock hand-off mechanism to make the sure the
+		 *    clock stays on until the proper driver comes along
+		 */
+		.flags = CLK_IS_CRITICAL,
 	},
 };
 
-- 
2.28.0


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

* [PATCH v2] clk: meson: g12a: mark fclk_div2 as critical
@ 2020-08-28 15:52 ` Stefan Agner
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Agner @ 2020-08-28 15:52 UTC (permalink / raw)
  To: narmstrong, jbrunet
  Cc: sboyd, khilman, mturquette, linux-kernel, stefan, Anand Moon,
	linux-amlogic, linux-clk, linux-arm-kernel, Marek Szyprowski

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.

Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller")
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Tested-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/clk/meson/g12a.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index fad616cac01e..6d44cadc06af 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -298,6 +298,17 @@ static struct clk_regmap g12a_fclk_div2 = {
 			&g12a_fclk_div2_div.hw
 		},
 		.num_parents = 1,
+		/*
+		 * Similar to fclk_div3, it seems that this clock is used by
+		 * the resident firmware and is required by the platform to
+		 * operate correctly.
+		 * Until the following condition are met, we need this clock to
+		 * be marked as critical:
+		 * a) Mark the clock used by a firmware resource, if possible
+		 * b) CCF has a clock hand-off mechanism to make the sure the
+		 *    clock stays on until the proper driver comes along
+		 */
+		.flags = CLK_IS_CRITICAL,
 	},
 };
 
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2] clk: meson: g12a: mark fclk_div2 as critical
@ 2020-08-28 15:52 ` Stefan Agner
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Agner @ 2020-08-28 15:52 UTC (permalink / raw)
  To: narmstrong, jbrunet
  Cc: sboyd, khilman, mturquette, linux-kernel, stefan, Anand Moon,
	linux-amlogic, linux-clk, linux-arm-kernel, Marek Szyprowski

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.

Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller")
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Tested-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/clk/meson/g12a.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index fad616cac01e..6d44cadc06af 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -298,6 +298,17 @@ static struct clk_regmap g12a_fclk_div2 = {
 			&g12a_fclk_div2_div.hw
 		},
 		.num_parents = 1,
+		/*
+		 * Similar to fclk_div3, it seems that this clock is used by
+		 * the resident firmware and is required by the platform to
+		 * operate correctly.
+		 * Until the following condition are met, we need this clock to
+		 * be marked as critical:
+		 * a) Mark the clock used by a firmware resource, if possible
+		 * b) CCF has a clock hand-off mechanism to make the sure the
+		 *    clock stays on until the proper driver comes along
+		 */
+		.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 related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] clk: meson: g12a: mark fclk_div2 as critical
  2020-08-28 15:52 ` Stefan Agner
  (?)
@ 2020-08-29 14:17   ` Jerome Brunet
  -1 siblings, 0 replies; 6+ messages in thread
From: Jerome Brunet @ 2020-08-29 14:17 UTC (permalink / raw)
  To: Stefan Agner, narmstrong
  Cc: mturquette, sboyd, khilman, linux-amlogic, linux-clk,
	linux-arm-kernel, linux-kernel, Marek Szyprowski, Anand Moon


On Fri 28 Aug 2020 at 17:52, 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.
>
> Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller")
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> Tested-by: Anand Moon <linux.amoon@gmail.com>

Applied Thx.

> ---
>  drivers/clk/meson/g12a.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
> index fad616cac01e..6d44cadc06af 100644
> --- a/drivers/clk/meson/g12a.c
> +++ b/drivers/clk/meson/g12a.c
> @@ -298,6 +298,17 @@ static struct clk_regmap g12a_fclk_div2 = {
>  			&g12a_fclk_div2_div.hw
>  		},
>  		.num_parents = 1,
> +		/*
> +		 * Similar to fclk_div3, it seems that this clock is used by
> +		 * the resident firmware and is required by the platform to
> +		 * operate correctly.
> +		 * Until the following condition are met, we need this clock to
> +		 * be marked as critical:
> +		 * a) Mark the clock used by a firmware resource, if possible
> +		 * b) CCF has a clock hand-off mechanism to make the sure the
> +		 *    clock stays on until the proper driver comes along
> +		 */
> +		.flags = CLK_IS_CRITICAL,
>  	},
>  };


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

* Re: [PATCH v2] clk: meson: g12a: mark fclk_div2 as critical
@ 2020-08-29 14:17   ` Jerome Brunet
  0 siblings, 0 replies; 6+ messages in thread
From: Jerome Brunet @ 2020-08-29 14:17 UTC (permalink / raw)
  To: Stefan Agner, narmstrong
  Cc: sboyd, khilman, mturquette, linux-kernel, Anand Moon,
	linux-amlogic, linux-clk, linux-arm-kernel, Marek Szyprowski


On Fri 28 Aug 2020 at 17:52, 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.
>
> Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller")
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> Tested-by: Anand Moon <linux.amoon@gmail.com>

Applied Thx.

> ---
>  drivers/clk/meson/g12a.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
> index fad616cac01e..6d44cadc06af 100644
> --- a/drivers/clk/meson/g12a.c
> +++ b/drivers/clk/meson/g12a.c
> @@ -298,6 +298,17 @@ static struct clk_regmap g12a_fclk_div2 = {
>  			&g12a_fclk_div2_div.hw
>  		},
>  		.num_parents = 1,
> +		/*
> +		 * Similar to fclk_div3, it seems that this clock is used by
> +		 * the resident firmware and is required by the platform to
> +		 * operate correctly.
> +		 * Until the following condition are met, we need this clock to
> +		 * be marked as critical:
> +		 * a) Mark the clock used by a firmware resource, if possible
> +		 * b) CCF has a clock hand-off mechanism to make the sure the
> +		 *    clock stays on until the proper driver comes along
> +		 */
> +		.flags = CLK_IS_CRITICAL,
>  	},
>  };


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] clk: meson: g12a: mark fclk_div2 as critical
@ 2020-08-29 14:17   ` Jerome Brunet
  0 siblings, 0 replies; 6+ messages in thread
From: Jerome Brunet @ 2020-08-29 14:17 UTC (permalink / raw)
  To: Stefan Agner, narmstrong
  Cc: sboyd, khilman, mturquette, linux-kernel, Anand Moon,
	linux-amlogic, linux-clk, linux-arm-kernel, Marek Szyprowski


On Fri 28 Aug 2020 at 17:52, 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.
>
> Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller")
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> Tested-by: Anand Moon <linux.amoon@gmail.com>

Applied Thx.

> ---
>  drivers/clk/meson/g12a.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
> index fad616cac01e..6d44cadc06af 100644
> --- a/drivers/clk/meson/g12a.c
> +++ b/drivers/clk/meson/g12a.c
> @@ -298,6 +298,17 @@ static struct clk_regmap g12a_fclk_div2 = {
>  			&g12a_fclk_div2_div.hw
>  		},
>  		.num_parents = 1,
> +		/*
> +		 * Similar to fclk_div3, it seems that this clock is used by
> +		 * the resident firmware and is required by the platform to
> +		 * operate correctly.
> +		 * Until the following condition are met, we need this clock to
> +		 * be marked as critical:
> +		 * a) Mark the clock used by a firmware resource, if possible
> +		 * b) CCF has a clock hand-off mechanism to make the sure the
> +		 *    clock stays on until the proper driver comes along
> +		 */
> +		.flags = CLK_IS_CRITICAL,
>  	},
>  };


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 15:52 [PATCH v2] clk: meson: g12a: mark fclk_div2 as critical Stefan Agner
2020-08-28 15:52 ` Stefan Agner
2020-08-28 15:52 ` Stefan Agner
2020-08-29 14:17 ` Jerome Brunet
2020-08-29 14:17   ` Jerome Brunet
2020-08-29 14:17   ` Jerome Brunet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.