From a4051c12dc8b22cc0ee05c1a1f14c8f7665b68fa Mon Sep 17 00:00:00 2001 From: Srikar Srimath Tirumala Date: Thu, 28 Jun 2018 12:27:52 -0700 Subject: thermal: throttle: fix for floorswept platforms Pass the clock handles for all the CPU clusters instead of just the one cluster from DT. The NAFLLL CLUSTER clock id refers to the physical cluster and is not guaranteed to be present on floorswept configurations. Add logic to look for the appropriate clock handle from a list of clock handles and fail the driver registration if a missing clock is referenced in the cooling device. Bug 2224577 Change-Id: I36a7d308eaa573c6b99390e3fbf36a3828377494 Signed-off-by: Srikar Srimath Tirumala Reviewed-on: https://git-master.nvidia.com/r/1764644 Reviewed-by: Aleksandr Frid Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Bo Yan Reviewed-by: mobile promotions Tested-by: mobile promotions --- .../bindings/platform/tegra/nvidia,tegra_thermal_throttle.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Documentation/devicetree') diff --git a/Documentation/devicetree/bindings/platform/tegra/nvidia,tegra_thermal_throttle.txt b/Documentation/devicetree/bindings/platform/tegra/nvidia,tegra_thermal_throttle.txt index 7444ef0ce..e1f0cbfe5 100644 --- a/Documentation/devicetree/bindings/platform/tegra/nvidia,tegra_thermal_throttle.txt +++ b/Documentation/devicetree/bindings/platform/tegra/nvidia,tegra_thermal_throttle.txt @@ -31,9 +31,9 @@ Required properties: - clocks : This property provides a list of clocks that can be throttled. Must provide at least one valid clock. Must contain one entry for each entry in clock-names. See ../clocks/clock-bindings.txt for details. -- clock-names: Must include one of the following entries: - - cpu: for throttling the clocks of all the CPUs. - - gpu: for thorttling the GPU clock. +- clock-names: Must include either: + - Clock names for all CPUs "cpu0, cpu1, cpu2, cpu3", to throttle all CPUs. Or + - Clock name for GPU "gpu" to throttle the GPU. Required subnodes: The throttle node must provide at least one cooling device node with at least one clock to throttle. @@ -95,8 +95,11 @@ Example: tegra_thermal_throttle { compatible = "nvidia,tegra-thermal-throttle"; clocks = <&bpmp_clks TEGRA194_CLK_NAFLL_CLUSTER0>, + <&bpmp_clks TEGRA194_CLK_NAFLL_CLUSTER1>, + <&bpmp_clks TEGRA194_CLK_NAFLL_CLUSTER2>, + <&bpmp_clks TEGRA194_CLK_NAFLL_CLUSTER3>, <&bpmp_clks TEGRA194_CLK_NAFLL_GPU>; - clock-names = "cpu", "gpu"; + clock-names = "cpu0", "cpu1", "cpu2", "cpu3", "gpu"; cpu_balanced { cdev-type = "cpu-balanced"; #cooling-cells = <2>; -- cgit v1.2.2