summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/intel_pch_thermal.c
diff options
context:
space:
mode:
authorEd Swierk <eswierk@skyportsystems.com>2017-07-20 02:44:40 +0200
committerZhang Rui <rui.zhang@intel.com>2017-08-15 08:32:58 +0200
commit595536e0b2475a9eac23709cd461143178c12e0e (patch)
treee7a5b374e55453cfe0cf98b4264052c1f482d609 /drivers/thermal/intel_pch_thermal.c
parentthermal: int3400_thermal: process "thermal table changed" event (diff)
downloadlinux-595536e0b2475a9eac23709cd461143178c12e0e.tar.xz
linux-595536e0b2475a9eac23709cd461143178c12e0e.zip
thermal: intel_pch_thermal: Fix enable check on Broadwell-DE
Using the TSDSS flag to determine whether the thermal sensor is enabled is problematic. Broadwell-DE (Xeon D-1500) does not support dynamic shutdown and the TSDSS flag always reads 0 (contrary to the current datasheet). Even on hardware supporting dynamic shutdown, the driver does nothing to configure it, and the dynamic shutdown state should not prevent the driver from loading. The ETS flag itself indicates whether the thermal sensor is enabled, so use it instead of the TSDSS flag on all hardware platforms. Signed-off-by: Ed Swierk <eswierk@skyportsystems.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal/intel_pch_thermal.c')
-rw-r--r--drivers/thermal/intel_pch_thermal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/intel_pch_thermal.c b/drivers/thermal/intel_pch_thermal.c
index 9e8fb782b521..c60b1cfcc64e 100644
--- a/drivers/thermal/intel_pch_thermal.c
+++ b/drivers/thermal/intel_pch_thermal.c
@@ -125,7 +125,7 @@ static int pch_wpt_init(struct pch_thermal_device *ptd, int *nr_trips)
*nr_trips = 0;
/* Check if BIOS has already enabled thermal sensor */
- if (WPT_TSS_TSDSS & readb(ptd->hw_base + WPT_TSS)) {
+ if (WPT_TSEL_ETS & readb(ptd->hw_base + WPT_TSEL)) {
ptd->bios_enabled = true;
goto read_trips;
}
@@ -141,7 +141,7 @@ static int pch_wpt_init(struct pch_thermal_device *ptd, int *nr_trips)
}
writeb(tsel|WPT_TSEL_ETS, ptd->hw_base + WPT_TSEL);
- if (!(WPT_TSS_TSDSS & readb(ptd->hw_base + WPT_TSS))) {
+ if (!(WPT_TSEL_ETS & readb(ptd->hw_base + WPT_TSEL))) {
dev_err(&ptd->pdev->dev, "Sensor can't be enabled\n");
return -ENODEV;
}