public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] clk: meson: mark clk81 as critical
@ 2017-05-24  9:39 Jerome Brunet
  2017-05-24  9:39 ` [PATCH v2 1/2] clk: meson: meson8b: " Jerome Brunet
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jerome Brunet @ 2017-05-24  9:39 UTC (permalink / raw)
  To: linux-arm-kernel

The GX (gxbb.c) clock controller driver already marks the clk81 clock
as criticial. However, the Meson8b clock controller driver does not do
this yet.
This can lead to a freeze of the whole system when clk81 is disabled
by the common clock framework (for example after the last child clock
is disabled by a driver which used that child clock).

Changes since v1: [0]
With the clock flagged as CRITICAL, CLK_IGNORE_UNUSED is no longer
useful. Remove this flag from meson8b and gxbb's clk81.

[0]: https://lkml.kernel.org/r/20170504183201.13175-1-martin.blumenstingl at googlemail.com

Jerome Brunet (1):
  clk: gxbb: remove CLK_IGNORE_UNUSED from clk81

Martin Blumenstingl (1):
  clk: meson: meson8b: mark clk81 as critical

 drivers/clk/meson/gxbb.c    | 2 +-
 drivers/clk/meson/meson8b.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.9.4

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

* [PATCH v2 1/2] clk: meson: meson8b: mark clk81 as critical
  2017-05-24  9:39 [PATCH v2 0/2] clk: meson: mark clk81 as critical Jerome Brunet
@ 2017-05-24  9:39 ` Jerome Brunet
  2017-05-24  9:45   ` Neil Armstrong
  2017-05-24  9:39 ` [PATCH v2 2/2] clk: gxbb: remove CLK_IGNORE_UNUSED from clk81 Jerome Brunet
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Jerome Brunet @ 2017-05-24  9:39 UTC (permalink / raw)
  To: linux-arm-kernel

From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

Disabling clk81 results in an immediate freeze of the whole system. This
can happen "accidentally" when the last child-clock of clk81 is disabled
(in this case the common clock framework also disables clk81, even if it
was only enabled indirectly before).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/clk/meson/meson8b.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
index e9985503165c..9d1aaf6e9ac6 100644
--- a/drivers/clk/meson/meson8b.c
+++ b/drivers/clk/meson/meson8b.c
@@ -399,7 +399,7 @@ struct clk_gate meson8b_clk81 = {
 		.ops = &clk_gate_ops,
 		.parent_names = (const char *[]){ "mpeg_clk_div" },
 		.num_parents = 1,
-		.flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED),
+		.flags = (CLK_SET_RATE_PARENT | CLK_IS_CRITICAL),
 	},
 };
 
-- 
2.9.4

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

* [PATCH v2 2/2] clk: gxbb: remove CLK_IGNORE_UNUSED from clk81
  2017-05-24  9:39 [PATCH v2 0/2] clk: meson: mark clk81 as critical Jerome Brunet
  2017-05-24  9:39 ` [PATCH v2 1/2] clk: meson: meson8b: " Jerome Brunet
@ 2017-05-24  9:39 ` Jerome Brunet
  2017-05-24  9:45   ` Neil Armstrong
  2017-05-25 18:24 ` [PATCH v2 0/2] clk: meson: mark clk81 as critical Michael Turquette
  2017-05-29  7:54 ` Neil Armstrong
  3 siblings, 1 reply; 7+ messages in thread
From: Jerome Brunet @ 2017-05-24  9:39 UTC (permalink / raw)
  To: linux-arm-kernel

clk81 already has CLK_IS_CRITICAL so CLK_IGNORE_UNUSED is not
necessary

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/clk/meson/gxbb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index ad5f027af1a2..be6350a03074 100644
--- a/drivers/clk/meson/gxbb.c
+++ b/drivers/clk/meson/gxbb.c
@@ -676,7 +676,7 @@ static struct clk_gate gxbb_clk81 = {
 		.ops = &clk_gate_ops,
 		.parent_names = (const char *[]){ "mpeg_clk_div" },
 		.num_parents = 1,
-		.flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED | CLK_IS_CRITICAL),
+		.flags = (CLK_SET_RATE_PARENT | CLK_IS_CRITICAL),
 	},
 };
 
-- 
2.9.4

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

* [PATCH v2 2/2] clk: gxbb: remove CLK_IGNORE_UNUSED from clk81
  2017-05-24  9:39 ` [PATCH v2 2/2] clk: gxbb: remove CLK_IGNORE_UNUSED from clk81 Jerome Brunet
@ 2017-05-24  9:45   ` Neil Armstrong
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2017-05-24  9:45 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/24/2017 11:39 AM, Jerome Brunet wrote:
> clk81 already has CLK_IS_CRITICAL so CLK_IGNORE_UNUSED is not
> necessary
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  drivers/clk/meson/gxbb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
> index ad5f027af1a2..be6350a03074 100644
> --- a/drivers/clk/meson/gxbb.c
> +++ b/drivers/clk/meson/gxbb.c
> @@ -676,7 +676,7 @@ static struct clk_gate gxbb_clk81 = {
>  		.ops = &clk_gate_ops,
>  		.parent_names = (const char *[]){ "mpeg_clk_div" },
>  		.num_parents = 1,
> -		.flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED | CLK_IS_CRITICAL),
> +		.flags = (CLK_SET_RATE_PARENT | CLK_IS_CRITICAL),
>  	},
>  };
>  
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

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

* [PATCH v2 1/2] clk: meson: meson8b: mark clk81 as critical
  2017-05-24  9:39 ` [PATCH v2 1/2] clk: meson: meson8b: " Jerome Brunet
@ 2017-05-24  9:45   ` Neil Armstrong
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2017-05-24  9:45 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/24/2017 11:39 AM, Jerome Brunet wrote:
> From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> 
> Disabling clk81 results in an immediate freeze of the whole system. This
> can happen "accidentally" when the last child-clock of clk81 is disabled
> (in this case the common clock framework also disables clk81, even if it
> was only enabled indirectly before).
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  drivers/clk/meson/meson8b.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
> index e9985503165c..9d1aaf6e9ac6 100644
> --- a/drivers/clk/meson/meson8b.c
> +++ b/drivers/clk/meson/meson8b.c
> @@ -399,7 +399,7 @@ struct clk_gate meson8b_clk81 = {
>  		.ops = &clk_gate_ops,
>  		.parent_names = (const char *[]){ "mpeg_clk_div" },
>  		.num_parents = 1,
> -		.flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED),
> +		.flags = (CLK_SET_RATE_PARENT | CLK_IS_CRITICAL),
>  	},
>  };
>  
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

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

* [PATCH v2 0/2] clk: meson: mark clk81 as critical
  2017-05-24  9:39 [PATCH v2 0/2] clk: meson: mark clk81 as critical Jerome Brunet
  2017-05-24  9:39 ` [PATCH v2 1/2] clk: meson: meson8b: " Jerome Brunet
  2017-05-24  9:39 ` [PATCH v2 2/2] clk: gxbb: remove CLK_IGNORE_UNUSED from clk81 Jerome Brunet
@ 2017-05-25 18:24 ` Michael Turquette
  2017-05-29  7:54 ` Neil Armstrong
  3 siblings, 0 replies; 7+ messages in thread
From: Michael Turquette @ 2017-05-25 18:24 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Jerome Brunet (2017-05-24 02:39:30)
> The GX (gxbb.c) clock controller driver already marks the clk81 clock
> as criticial. However, the Meson8b clock controller driver does not do
> this yet.
> This can lead to a freeze of the whole system when clk81 is disabled
> by the common clock framework (for example after the last child clock
> is disabled by a driver which used that child clock).
> 
> Changes since v1: [0]
> With the clock flagged as CRITICAL, CLK_IGNORE_UNUSED is no longer
> useful. Remove this flag from meson8b and gxbb's clk81.

Both patches look good to me.

Regards,
Mike

> 
> [0]: https://lkml.kernel.org/r/20170504183201.13175-1-martin.blumenstingl at googlemail.com
> 
> Jerome Brunet (1):
>   clk: gxbb: remove CLK_IGNORE_UNUSED from clk81
> 
> Martin Blumenstingl (1):
>   clk: meson: meson8b: mark clk81 as critical
> 
>  drivers/clk/meson/gxbb.c    | 2 +-
>  drivers/clk/meson/meson8b.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> -- 
> 2.9.4
> 

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

* [PATCH v2 0/2] clk: meson: mark clk81 as critical
  2017-05-24  9:39 [PATCH v2 0/2] clk: meson: mark clk81 as critical Jerome Brunet
                   ` (2 preceding siblings ...)
  2017-05-25 18:24 ` [PATCH v2 0/2] clk: meson: mark clk81 as critical Michael Turquette
@ 2017-05-29  7:54 ` Neil Armstrong
  3 siblings, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2017-05-29  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/24/2017 11:39 AM, Jerome Brunet wrote:
> The GX (gxbb.c) clock controller driver already marks the clk81 clock
> as criticial. However, the Meson8b clock controller driver does not do
> this yet.
> This can lead to a freeze of the whole system when clk81 is disabled
> by the common clock framework (for example after the last child clock
> is disabled by a driver which used that child clock).
> 
> Changes since v1: [0]
> With the clock flagged as CRITICAL, CLK_IGNORE_UNUSED is no longer
> useful. Remove this flag from meson8b and gxbb's clk81.
> 
> [0]: https://lkml.kernel.org/r/20170504183201.13175-1-martin.blumenstingl at googlemail.com
> 
> Jerome Brunet (1):
>   clk: gxbb: remove CLK_IGNORE_UNUSED from clk81
> 
> Martin Blumenstingl (1):
>   clk: meson: meson8b: mark clk81 as critical
> 
>  drivers/clk/meson/gxbb.c    | 2 +-
>  drivers/clk/meson/meson8b.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 

Applied,

Thanks,
Neil

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

end of thread, other threads:[~2017-05-29  7:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24  9:39 [PATCH v2 0/2] clk: meson: mark clk81 as critical Jerome Brunet
2017-05-24  9:39 ` [PATCH v2 1/2] clk: meson: meson8b: " Jerome Brunet
2017-05-24  9:45   ` Neil Armstrong
2017-05-24  9:39 ` [PATCH v2 2/2] clk: gxbb: remove CLK_IGNORE_UNUSED from clk81 Jerome Brunet
2017-05-24  9:45   ` Neil Armstrong
2017-05-25 18:24 ` [PATCH v2 0/2] clk: meson: mark clk81 as critical Michael Turquette
2017-05-29  7:54 ` Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox