ARM: tegra: ouya: Specify all CPU cores as cooling devices
authorDmitry Osipenko <digetx@gmail.com>
Tue, 2 Mar 2021 12:10:00 +0000 (15:10 +0300)
committerThierry Reding <treding@nvidia.com>
Wed, 24 Mar 2021 15:09:17 +0000 (16:09 +0100)
If CPU0 is unplugged the cooling device can not rebind to CPU1. And if
CPU0 is plugged in again, the cooling device may fail to initialize.

If the CPUs are mapped with the physical CPU0 to Linux numbering
CPU1, the cooling device mapping will fail.

Hence specify all CPU cores as a cooling devices in the device-tree.

Tested-by: Peter Geis <pgwipeout@gmail.com>
Tested-by: Matt Merhar <mattmerhar@protonmail.com>
Suggested-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm/boot/dts/tegra30-ouya.dts

index 0368b3b816ef2941a9d9b76a32012d20d67a6e33..d36511d95d5a62f1009442e9fdac37fc1ceca2bd 100644 (file)
                        cpu-supply = <&vdd_cpu>;
                        #cooling-cells = <2>;
                };
-               cpu@1 {
+
+               cpu1: cpu@1 {
                        operating-points-v2 = <&cpu0_opp_table>;
                        cpu-supply = <&vdd_cpu>;
+                       #cooling-cells = <2>;
                };
 
-               cpu@2 {
+               cpu2: cpu@2 {
                        operating-points-v2 = <&cpu0_opp_table>;
                        cpu-supply = <&vdd_cpu>;
+                       #cooling-cells = <2>;
                };
 
-               cpu@3 {
+               cpu3: cpu@3 {
                        operating-points-v2 = <&cpu0_opp_table>;
                        cpu-supply = <&vdd_cpu>;
+                       #cooling-cells = <2>;
                };
        };
 
                                };
                                map1 {
                                        trip = <&cpu_alert1>;
-                                       cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                                       cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
                        };
                };