[PATCH v2] ramips: mt7620: fix urngd error by disabling CPU frequency scaling feature

Shiji Yang yangshiji66 at outlook.com
Sat Jul 1 19:57:34 PDT 2023


From: Shiji Yang <yangshiji66 at qq.com>

Frequency scaling enables the MT7620 to reduce CPU frequency when receiving
MIPS SI_Sleep signal. However, the current clock driver can't detect the
change of the frequency and always provides a fixed clock frequency. This
may confuse urngd, making it unable to initialize. On the other hand, 580
MHz MIPS processor is already very weak today. Sleep mode may have negative
impact on performance. And energy saving is not significant since most
energy is consumed by peripherals such as WLAN radio. Therefore, disabling
it shoule be a good choice.

The systick driver determines whether to enable this feature based on the
compatible string "ralink,mt7620a-systick", so removing it can safely
disable the sleep mode. In this way, systick will still work in normal mode
just like other ralink SoCs such as MT7628.

This patch fixes the urngd init error:

user.err kernel: [    9.961576] urngd: jent-rng init failed, err: 2

Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
v2:
Apply the fix to another variant mt7620n, too.
---
 target/linux/ramips/dts/mt7620a.dtsi | 2 +-
 target/linux/ramips/dts/mt7620n.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a.dtsi b/target/linux/ramips/dts/mt7620a.dtsi
index 4b6fa60dc8..c0fda35366 100644
--- a/target/linux/ramips/dts/mt7620a.dtsi
+++ b/target/linux/ramips/dts/mt7620a.dtsi
@@ -266,7 +266,7 @@
 		};
 
 		systick: systick at d00 {
-			compatible = "ralink,mt7620a-systick", "ralink,cevt-systick";
+			compatible = "ralink,cevt-systick";
 			reg = <0xd00 0x10>;
 
 			resets = <&rstctrl 28>;
diff --git a/target/linux/ramips/dts/mt7620n.dtsi b/target/linux/ramips/dts/mt7620n.dtsi
index 276bc13733..2579b4879e 100644
--- a/target/linux/ramips/dts/mt7620n.dtsi
+++ b/target/linux/ramips/dts/mt7620n.dtsi
@@ -231,7 +231,7 @@
 		};
 
 		systick: systick at d00 {
-			compatible = "ralink,mt7620a-systick", "ralink,cevt-systick";
+			compatible = "ralink,cevt-systick";
 			reg = <0xd00 0x10>;
 
 			resets = <&rstctrl 28>;
-- 
2.30.2




More information about the openwrt-devel mailing list