From: "Pandruvada, Srinivas" <srinivas.pandruvada@intel.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"eswierk@skyportsystems.com" <eswierk@skyportsystems.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] thermal: intel_pch_thermal: Fix enable check on Broadwell-DE
Date: Mon, 14 Aug 2017 23:39:06 +0000 [thread overview]
Message-ID: <1502753944.10633.1.camel@intel.com> (raw)
In-Reply-To: <1500511480-52312-1-git-send-email-eswierk@skyportsystems.com>
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 <eswierk@skyportsystems.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> 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;
> }
prev parent reply other threads:[~2017-08-14 23:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 0:44 [PATCH] thermal: intel_pch_thermal: Fix enable check on Broadwell-DE Ed Swierk
2017-08-14 23:39 ` Pandruvada, Srinivas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1502753944.10633.1.camel@intel.com \
--to=srinivas.pandruvada@intel.com \
--cc=eswierk@skyportsystems.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).