mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Reviewed-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Zhang Rui <[email protected]>
This commit is contained in:
parent
38e44da591
commit
595536e0b2
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue