All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: bcm2835: Make peripheral PLLC critical
@ 2022-09-26  8:45 Maxime Ripard
  2022-09-26 10:55 ` Stefan Wahren
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Maxime Ripard @ 2022-09-26  8:45 UTC (permalink / raw)
  To: Mike Turquette, Stephen Boyd, Florian Fainelli, Ray Jui, Scott Branden
  Cc: linux-clk, bcm-kernel-feedback-list, Stefan Wahren,
	linux-rpi-kernel, Maxime Ripard, Noralf Trønnes

When testing for a series affecting the VEC, it was discovered that
turning off and on the VEC clock is crashing the system.

It turns out that, when disabling the VEC clock, it's the only child of
the PLLC-per clock which will also get disabled. The source of the crash
is PLLC-per being disabled.

It's likely that some other device might not take a clock reference that
it actually needs, but it's unclear which at this point. Let's make
PLLC-per critical so that we don't have that crash.

Reported-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 drivers/clk/bcm/clk-bcm2835.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index 48a1eb9f2d55..19de0e83b65d 100644
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -1784,7 +1784,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = {
 		.load_mask = CM_PLLC_LOADPER,
 		.hold_mask = CM_PLLC_HOLDPER,
 		.fixed_divider = 1,
-		.flags = CLK_SET_RATE_PARENT),
+		.flags = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT),
 
 	/*
 	 * PLLD is the display PLL, used to drive DSI display panels.
-- 
2.37.3


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

* Re: [PATCH] clk: bcm2835: Make peripheral PLLC critical
  2022-09-26  8:45 [PATCH] clk: bcm2835: Make peripheral PLLC critical Maxime Ripard
@ 2022-09-26 10:55 ` Stefan Wahren
  2022-09-26 14:51 ` Noralf Trønnes
  2022-09-30 21:28 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Wahren @ 2022-09-26 10:55 UTC (permalink / raw)
  To: Maxime Ripard, Mike Turquette, Stephen Boyd, Florian Fainelli,
	Ray Jui, Scott Branden
  Cc: linux-clk, bcm-kernel-feedback-list, linux-rpi-kernel,
	Noralf Trønnes

Am 26.09.22 um 10:45 schrieb Maxime Ripard:
> When testing for a series affecting the VEC, it was discovered that
> turning off and on the VEC clock is crashing the system.
>
> It turns out that, when disabling the VEC clock, it's the only child of
> the PLLC-per clock which will also get disabled. The source of the crash
> is PLLC-per being disabled.
>
> It's likely that some other device might not take a clock reference that
> it actually needs, but it's unclear which at this point. Let's make
> PLLC-per critical so that we don't have that crash.
>
> Reported-by: Noralf Trønnes <noralf@tronnes.org>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com>

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

* Re: [PATCH] clk: bcm2835: Make peripheral PLLC critical
  2022-09-26  8:45 [PATCH] clk: bcm2835: Make peripheral PLLC critical Maxime Ripard
  2022-09-26 10:55 ` Stefan Wahren
@ 2022-09-26 14:51 ` Noralf Trønnes
  2022-09-30 21:28 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Noralf Trønnes @ 2022-09-26 14:51 UTC (permalink / raw)
  To: Maxime Ripard, Mike Turquette, Stephen Boyd, Florian Fainelli,
	Ray Jui, Scott Branden
  Cc: linux-clk, bcm-kernel-feedback-list, Stefan Wahren, linux-rpi-kernel



Den 26.09.2022 10.45, skrev Maxime Ripard:
> When testing for a series affecting the VEC, it was discovered that
> turning off and on the VEC clock is crashing the system.
> 
> It turns out that, when disabling the VEC clock, it's the only child of
> the PLLC-per clock which will also get disabled. The source of the crash
> is PLLC-per being disabled.
> 
> It's likely that some other device might not take a clock reference that
> it actually needs, but it's unclear which at this point. Let's make
> PLLC-per critical so that we don't have that crash.
> 
> Reported-by: Noralf Trønnes <noralf@tronnes.org>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---

Acked-by: Noralf Trønnes <noralf@tronnes.org>

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

* Re: [PATCH] clk: bcm2835: Make peripheral PLLC critical
  2022-09-26  8:45 [PATCH] clk: bcm2835: Make peripheral PLLC critical Maxime Ripard
  2022-09-26 10:55 ` Stefan Wahren
  2022-09-26 14:51 ` Noralf Trønnes
@ 2022-09-30 21:28 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2022-09-30 21:28 UTC (permalink / raw)
  To: Florian Fainelli, Maxime Ripard, Mike Turquette, Ray Jui, Scott Branden
  Cc: linux-clk, bcm-kernel-feedback-list, Stefan Wahren,
	linux-rpi-kernel, Maxime Ripard, Noralf Trønnes

Quoting Maxime Ripard (2022-09-26 01:45:09)
> When testing for a series affecting the VEC, it was discovered that
> turning off and on the VEC clock is crashing the system.
> 
> It turns out that, when disabling the VEC clock, it's the only child of
> the PLLC-per clock which will also get disabled. The source of the crash
> is PLLC-per being disabled.
> 
> It's likely that some other device might not take a clock reference that
> it actually needs, but it's unclear which at this point. Let's make
> PLLC-per critical so that we don't have that crash.
> 
> Reported-by: Noralf Trønnes <noralf@tronnes.org>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---

Applied to clk-next

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

end of thread, other threads:[~2022-09-30 21:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26  8:45 [PATCH] clk: bcm2835: Make peripheral PLLC critical Maxime Ripard
2022-09-26 10:55 ` Stefan Wahren
2022-09-26 14:51 ` Noralf Trønnes
2022-09-30 21:28 ` Stephen Boyd

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.