diff mbox series

[V2,1/2] arm: dts: sun8i-h3: Add missing cooling device properties for CPUs

Message ID d894f425b7c32bce4dc4a982db8f4dface2db31d.1528173943.git.viresh.kumar@linaro.org
State Accepted
Commit 77ad0f2e34f849d4f85c30933c14ab742f617078
Headers show
Series [V2,1/2] arm: dts: sun8i-h3: Add missing cooling device properties for CPUs | expand

Commit Message

Viresh Kumar June 5, 2018, 4:47 a.m. UTC
The cooling device properties, like "#cooling-cells" and
"dynamic-power-coefficient", should either be present for all the CPUs
of a cluster or none. If these are present only for a subset of CPUs of
a cluster then things will start falling apart as soon as the CPUs are
brought online in a different order. For example, this will happen
because the operating system looks for such properties in the CPU node
it is trying to bring up, so that it can register a cooling device.

Add such missing properties.

Fix other missing properties (clocks, clock-names) as well to make it all
work.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

---
V2: Separated patch for h3.

 arch/arm/boot/dts/sun8i-h3.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

-- 
2.15.0.194.g9af6a3dea062

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Maxime Ripard June 5, 2018, 7:11 a.m. UTC | #1
On Tue, Jun 05, 2018 at 10:17:49AM +0530, Viresh Kumar wrote:
> The cooling device properties, like "#cooling-cells" and

> "dynamic-power-coefficient", should either be present for all the CPUs

> of a cluster or none. If these are present only for a subset of CPUs of

> a cluster then things will start falling apart as soon as the CPUs are

> brought online in a different order. For example, this will happen

> because the operating system looks for such properties in the CPU node

> it is trying to bring up, so that it can register a cooling device.

> 

> Add such missing properties.

> 

> Fix other missing properties (clocks, OPP, clock latency) as well to

> make it all work.

> 

> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>


Applied both, thanks!
Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Chen-Yu Tsai June 5, 2018, 4:02 p.m. UTC | #2
On Tue, Jun 5, 2018 at 3:11 PM, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> On Tue, Jun 05, 2018 at 10:17:49AM +0530, Viresh Kumar wrote:

>> The cooling device properties, like "#cooling-cells" and

>> "dynamic-power-coefficient", should either be present for all the CPUs

>> of a cluster or none. If these are present only for a subset of CPUs of

>> a cluster then things will start falling apart as soon as the CPUs are

>> brought online in a different order. For example, this will happen

>> because the operating system looks for such properties in the CPU node

>> it is trying to bring up, so that it can register a cooling device.

>>

>> Add such missing properties.

>>

>> Fix other missing properties (clocks, OPP, clock latency) as well to

>> make it all work.

>>

>> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

>

> Applied both, thanks!


Please fix the "ARM" prefix when applying. :)

ChenYu
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Maxime Ripard June 6, 2018, 6:58 a.m. UTC | #3
On Wed, Jun 06, 2018 at 12:02:20AM +0800, Chen-Yu Tsai wrote:
> On Tue, Jun 5, 2018 at 3:11 PM, Maxime Ripard <maxime.ripard@bootlin.com> wrote:

> > On Tue, Jun 05, 2018 at 10:17:49AM +0530, Viresh Kumar wrote:

> >> The cooling device properties, like "#cooling-cells" and

> >> "dynamic-power-coefficient", should either be present for all the CPUs

> >> of a cluster or none. If these are present only for a subset of CPUs of

> >> a cluster then things will start falling apart as soon as the CPUs are

> >> brought online in a different order. For example, this will happen

> >> because the operating system looks for such properties in the CPU node

> >> it is trying to bring up, so that it can register a cooling device.

> >>

> >> Add such missing properties.

> >>

> >> Fix other missing properties (clocks, OPP, clock latency) as well to

> >> make it all work.

> >>

> >> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

> >

> > Applied both, thanks!

> 

> Please fix the "ARM" prefix when applying. :)


Done, thanks for the reminder :)

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index 41d57c76f290..9dff6887923c 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -84,21 +84,30 @@ 
 			compatible = "arm,cortex-a7";
 			device_type = "cpu";
 			reg = <1>;
+			clocks = <&ccu CLK_CPUX>;
+			clock-names = "cpu";
 			operating-points-v2 = <&cpu0_opp_table>;
+			#cooling-cells = <2>;
 		};
 
 		cpu@2 {
 			compatible = "arm,cortex-a7";
 			device_type = "cpu";
 			reg = <2>;
+			clocks = <&ccu CLK_CPUX>;
+			clock-names = "cpu";
 			operating-points-v2 = <&cpu0_opp_table>;
+			#cooling-cells = <2>;
 		};
 
 		cpu@3 {
 			compatible = "arm,cortex-a7";
 			device_type = "cpu";
 			reg = <3>;
+			clocks = <&ccu CLK_CPUX>;
+			clock-names = "cpu";
 			operating-points-v2 = <&cpu0_opp_table>;
+			#cooling-cells = <2>;
 		};
 	};