Skip to contentSkip to conversation

clk: sunxi-ng: Mark A523 bus-r-cpucfg clock as critical

PATCH Superseded Jernej Skrabec 3 participants 3 messages Oct 19, 2025 – Oct 20, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jernej Skrabec

author maintainer
#0 lore raw

PATCH 1/1 clk: sunxi-ng: Mark A523 bus-r-cpucfg clock as critical

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")
---
 drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c +1 -1
index 70ce0ca0cb7d..c5b0d4a2e397 100644
@@ -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,
Signature · 1 line
2.51.1.dirty
#1 lore raw
Quoted 4 lines · On Sun, 19 Oct 2025 19:26:47 +0200 Jernej Skrabec <[email protected]>…

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.

Reviewed-by Tested-by on v1 1/1
#2 lore raw
In reply to Jernej Skrabec
Quoted 4 lines · On Sun, 19 Oct 2025 19:26:47 +0200 Jernej Skrabec <[email protected]>…

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:

Quoted 2 lines
Fixes 8cea339cfb81 ("clk: sunxi-ng: add support for the A523/T527 PRCM CCU")

Cheers,
Andre

Quoted 17 lines
---
 drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c +1 -1
index 70ce0ca0cb7d..c5b0d4a2e397 100644
@@ -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,