Re: [PATCH] cpufreq: loongson3: Support older SMC firmware

From: Mingcong Bai
Date: Mon Jun 23 2025 - 22:54:07 EST


Greetings,

<snip>
> This patch adds support for the SMC firmware found on these devices,
which I denoted as "SMC-0" in the driver. Boost support is omitted,
since determination of cores able to boost requires the driver to couple
tightly with micro-architecture details.

For coexistence, I prefixed all SMC-call constants with their SMC
versions, and introduced "SMC-0"-specific initialization and
frequency-level-setup rountines.

Signed-off-by: Yao Zi <ziyao@xxxxxxxxxxx>
---
drivers/cpufreq/loongson3_cpufreq.c | 287 ++++++++++++++++++++--------
1 file changed, 211 insertions(+), 76 deletions(-)

Tested good on an IPASON NL38-N11 (Loongson 3A6000) laptop, core frequencies fluctuate between 250MHz and 2000MHz individually as expected. CPU frequency scaling governors works as expected (performance pins all cores to 2000MHz, the max frequency).

Tested-by: Mingcong Bai <jeffbai@xxxxxxx>

Best Regards,
Mingcong Bai