clk: meson: mark clk81 as critical
Jerome Brunet
maintainerv2 cover clk: meson: mark clk81 as critical
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(-)
Signature · 1 line
2.9.4
Jerome Brunet
maintainerPATCH v2 1/2 clk: meson: meson8b: mark clk81 as critical
From: Martin Blumenstingl <[email protected]>
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).
--- drivers/clk/meson/meson8b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/meson/meson8b.c +1 -1
@@ -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), }, };
Signature · 1 line
2.9.4
PATCH v2 1/2 clk: meson: meson8b: mark clk81 as critical
Quoted 19 lines · Jerome Brunet
From: Martin Blumenstingl <[email protected]>
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 <[email protected]>Signed-off-by Jerome Brunet <[email protected]>--- drivers/clk/meson/meson8b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/meson/meson8b.c +0
-0
drivers/clk/meson/meson8b.c struct clk_gate meson8b_clk81 = { · line 405
Quoted 8 lines
drivers/clk/meson/meson8b.c +1
-1@@ -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), }, };
Jerome Brunet
maintainerPATCH v2 2/2 clk: gxbb: remove CLK_IGNORE_UNUSED from clk81
In reply to Jerome Brunetclk81 already has CLK_IS_CRITICAL so CLK_IGNORE_UNUSED is not necessary
--- drivers/clk/meson/gxbb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/meson/gxbb.c +1 -1
@@ -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), }, };
Signature · 1 line
2.9.4
PATCH v2 2/2 clk: gxbb: remove CLK_IGNORE_UNUSED from clk81
Quoted 14 lines · Jerome Brunet
clk81 already has
CLK_IS_CRITICALsoCLK_IGNORE_UNUSEDis not necessarySigned-off-by Jerome Brunet <[email protected]>--- drivers/clk/meson/gxbb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/meson/gxbb.c +0
-0
drivers/clk/meson/gxbb.c static struct clk_gate gxbb_clk81 = { · line 682
Quoted 8 lines
drivers/clk/meson/gxbb.c +1
-1@@ -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), }, };
v2 cover clk: meson: mark clk81 as critical
In reply to Jerome BrunetQuoting Jerome Brunet (2017-05-24 02:39:30)
Quoted 10 lines
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_UNUSEDis no longer useful. Remove this flag from meson8b and gxbb's clk81.
Both patches look good to me.
Regards,
Mike
Quoted 16 lines
[0]: https://lkml.kernel.org/r/20170504183201.13175-1-martin.blumenstingl at googlemail.com
Jerome Brunet (1):
clk: gxbb: removeCLK_IGNORE_UNUSEDfrom clk81Martin Blumenstingl (1):
clk: meson: meson8b: mark clk81 as criticaldrivers/clk/meson/gxbb.c | 2 +- drivers/clk/meson/meson8b.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Signature · 1 line
2.9.4
Neil Armstrong
Appliedv2 cover clk: meson: mark clk81 as critical
In reply to Jerome BrunetQuoted 16 lines · Jerome Brunet
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_UNUSEDis 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: removeCLK_IGNORE_UNUSEDfrom clk81
Quoted 7 lines
Martin Blumenstingl (1):
clk: meson: meson8b: mark clk81 as criticaldrivers/clk/meson/gxbb.c | 2 +- drivers/clk/meson/meson8b.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Applied,
Thanks,
Neil