From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752787AbdHNXjW (ORCPT ); Mon, 14 Aug 2017 19:39:22 -0400 Received: from mga07.intel.com ([134.134.136.100]:16351 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752651AbdHNXjU (ORCPT ); Mon, 14 Aug 2017 19:39:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,375,1498546800"; d="scan'208";a="889937906" From: "Pandruvada, Srinivas" To: "linux-kernel@vger.kernel.org" , "eswierk@skyportsystems.com" , "linux-pm@vger.kernel.org" Subject: Re: [PATCH] thermal: intel_pch_thermal: Fix enable check on Broadwell-DE Thread-Topic: [PATCH] thermal: intel_pch_thermal: Fix enable check on Broadwell-DE Thread-Index: AQHTFVaEKNiwo2ODhUSs3ESLjy1tXQ== Date: Mon, 14 Aug 2017 23:39:06 +0000 Message-ID: <1502753944.10633.1.camel@intel.com> References: <1500511480-52312-1-git-send-email-eswierk@skyportsystems.com> In-Reply-To: <1500511480-52312-1-git-send-email-eswierk@skyportsystems.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.255.74.143] Content-Type: text/plain; charset="utf-8" Content-ID: <79365E1993FCCD4EB3BA10245B8EE9B7@intel.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v7ENdRP2010643 On Wed, 2017-07-19 at 17:44 -0700, Ed Swierk wrote: > 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 Reviewed-by: Srinivas Pandruvada > --- >  drivers/thermal/intel_pch_thermal.c | 4 ++-- >  1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/thermal/intel_pch_thermal.c > b/drivers/thermal/intel_pch_thermal.c > index 2b49e8d..9889c90 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; >   }