linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: sunxi-ng: Mark A523 bus-r-cpucfg clock as critical
@ 2025-10-19 17:26 Jernej Skrabec
  2025-10-19 18:44 ` Per Larsson
  2025-10-20 13:24 ` Andre Przywara
  0 siblings, 2 replies; 3+ messages in thread
From: Jernej Skrabec @ 2025-10-19 17:26 UTC (permalink / raw)
  To: wens, samuel
  Cc: mturquette, sboyd, linux-clk, linux-arm-kernel, linux-sunxi,
	linux-kernel, Jernej Skrabec

bus-r-cpucfg clock is important for peripheral which takes care for
powering CPU cores on and off. Since this operation is done by firmware
(TF-A), mark is as critical. That way Linux won't interfere with that
clock.

Fixes: 8cea339cfb81 ("clk: sunxi-ng: add support for the A523/T527 PRCM CCU")
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
 drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
index 70ce0ca0cb7d..c5b0d4a2e397 100644
--- a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
+++ b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
@@ -125,7 +125,7 @@ static SUNXI_CCU_GATE_HW(bus_r_dma_clk, "bus-r-dma",
 static SUNXI_CCU_GATE_HW(bus_r_rtc_clk, "bus-r-rtc",
 			 &r_apb0_clk.common.hw, 0x20c, BIT(0), 0);
 static SUNXI_CCU_GATE_HW(bus_r_cpucfg_clk, "bus-r-cpucfg",
-			 &r_apb0_clk.common.hw, 0x22c, BIT(0), 0);
+			 &r_apb0_clk.common.hw, 0x22c, BIT(0), CLK_IS_CRITICAL);
 
 static struct ccu_common *sun55i_a523_r_ccu_clks[] = {
 	&r_ahb_clk.common,
-- 
2.51.1.dirty



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

* Re: [PATCH] clk: sunxi-ng: Mark A523 bus-r-cpucfg clock as critical
  2025-10-19 17:26 [PATCH] clk: sunxi-ng: Mark A523 bus-r-cpucfg clock as critical Jernej Skrabec
@ 2025-10-19 18:44 ` Per Larsson
  2025-10-20 13:24 ` Andre Przywara
  1 sibling, 0 replies; 3+ messages in thread
From: Per Larsson @ 2025-10-19 18:44 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: wens, samuel, mturquette, sboyd, linux-clk, linux-arm-kernel,
	linux-sunxi, linux-kernel

On Sun, 19 Oct 2025 19:26:47 +0200
Jernej Skrabec <jernej.skrabec@gmail.com> wrote:

> bus-r-cpucfg clock is important for peripheral which takes care for
> powering CPU cores on and off. Since this operation is done by
> firmware (TF-A), mark is as critical. That way Linux won't interfere
> with that clock.
 
"mark it"
Also, I think it's "takes care of"

The change itself looks good as far as I can tell.



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

* Re: [PATCH] clk: sunxi-ng: Mark A523 bus-r-cpucfg clock as critical
  2025-10-19 17:26 [PATCH] clk: sunxi-ng: Mark A523 bus-r-cpucfg clock as critical Jernej Skrabec
  2025-10-19 18:44 ` Per Larsson
@ 2025-10-20 13:24 ` Andre Przywara
  1 sibling, 0 replies; 3+ messages in thread
From: Andre Przywara @ 2025-10-20 13:24 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: wens, samuel, mturquette, sboyd, linux-clk, linux-arm-kernel,
	linux-sunxi, linux-kernel

On Sun, 19 Oct 2025 19:26:47 +0200
Jernej Skrabec <jernej.skrabec@gmail.com> wrote:

> bus-r-cpucfg clock is important for peripheral which takes care for
> powering CPU cores on and off. Since this operation is done by firmware
> (TF-A), mark is as critical. That way Linux won't interfere with that
> clock.

Many thanks, makes sense. I hammered /sys/devices/system/cpu/cpu<x>/online
like a 1000 times in a random loop now, and it survived - after I excluded
CPU0 from this. Offlining CPU0 works, but it doesn't come back online
again. But that's probably something in TF-A, so nothing that affects this
patch:

> Fixes: 8cea339cfb81 ("clk: sunxi-ng: add support for the A523/T527 PRCM CCU")
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
>  drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
> index 70ce0ca0cb7d..c5b0d4a2e397 100644
> --- a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
> +++ b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
> @@ -125,7 +125,7 @@ static SUNXI_CCU_GATE_HW(bus_r_dma_clk, "bus-r-dma",
>  static SUNXI_CCU_GATE_HW(bus_r_rtc_clk, "bus-r-rtc",
>  			 &r_apb0_clk.common.hw, 0x20c, BIT(0), 0);
>  static SUNXI_CCU_GATE_HW(bus_r_cpucfg_clk, "bus-r-cpucfg",
> -			 &r_apb0_clk.common.hw, 0x22c, BIT(0), 0);
> +			 &r_apb0_clk.common.hw, 0x22c, BIT(0), CLK_IS_CRITICAL);
>  
>  static struct ccu_common *sun55i_a523_r_ccu_clks[] = {
>  	&r_ahb_clk.common,



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

end of thread, other threads:[~2025-10-20 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-19 17:26 [PATCH] clk: sunxi-ng: Mark A523 bus-r-cpucfg clock as critical Jernej Skrabec
2025-10-19 18:44 ` Per Larsson
2025-10-20 13:24 ` Andre Przywara

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