realtek: use fixed-clock as CPU clock
authorSander Vanheule <sander@svanheule.net>
Fri, 26 Nov 2021 21:54:04 +0000 (22:54 +0100)
committerSander Vanheule <sander@svanheule.net>
Sat, 11 Dec 2021 19:05:00 +0000 (20:05 +0100)
CPU clock definition in devicetree should be specified per CPU, not in
the cpus node. This modification causes plat_init_time() to not find the
CPU frequency in the devicetree any more, but it can fall back to the
(identical) default.

Co-developed-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Bjørn Mork <bjorn@mork.no>
target/linux/realtek/dts-5.10/rtl838x.dtsi
target/linux/realtek/dts-5.10/rtl930x.dtsi

index 899c1731fb51de4accab75279eac80ba2b23fd5b..835fc4a8f8c37f0b45285f2b12b92ebb4efa955f 100644 (file)
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
-               frequency = <500000000>;
 
                cpu@0 {
                        compatible = "mips,mips4KEc";
                        reg = <0>;
+                       clocks = <&cpu_clk>;
+                       clock-names = "cpu";
                };
        };
 
                bootargs = "console=ttyS0,115200";
        };
 
+       cpu_clk: cpu_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <500000000>;
+       };
+
        lx_clk: lx_clk {
                compatible = "fixed-clock";
                #clock-cells = <0>;
index 991e9e2f9a284fd1302ebe97f81381f6b7791474..3a9b0e23c470c6914675cedad14ccb295cd0c52e 100644 (file)
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
-               frequency = <800000000>;
 
                cpu@0 {
                        compatible = "mips,mips34Kc";
                        reg = <0>;
+                       clocks = <&cpu_clk>;
+                       clock-names = "cpu";
                };
        };
 
                interrupt-controller;
        };
 
+       cpu_clk: cpu_clk {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency  = <800000000>;
+       };
+
        lx_clk: lx_clk {
                compatible = "fixed-clock";
                #clock-cells = <0>;