From: Zhang Rui <rui.zhang@intel.com>
To: Amit Kachhap <amit.kachhap@gmail.com>
Cc: Tushar Behera <tushar.behera@linaro.org>,
linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-pm@vger.kernel.org, eduardo.valentin@ti.com
Subject: Re: [PATCH] thermal: samsung: Only update available threshold limits
Date: Thu, 15 May 2014 16:45:28 +0800 [thread overview]
Message-ID: <1400143528.2273.30.camel@rzhang1-toshiba> (raw)
In-Reply-To: <CADGdYn719UzdPd3fVWrPi=mTnKvKy3O5bPHZcn8xCFjrAWp7yA@mail.gmail.com>
On 四, 2014-04-24 at 11:48 +0530, Amit Kachhap wrote:
> On 4/14/14, Tushar Behera <tushar.behera@linaro.org> wrote:
> > Currently the threshold limits are updated in 2 stages, once for all
> > software trigger levels and again for hardware trip point.
> I guess the first stage is bootloader as could not find this in this file.
> Anyways the changes looks fine to me.
>
> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
applied.
thanks,
rui
>
> >
> > While updating the software trigger levels, it overwrites the threshold
> > limit for hardware trip point thereby forcing the Exynos core to issue
> > an emergency shutdown.
> >
> > Updating only the required fields in threshold register fixes this issue.
> >
> > Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> > ---
> > Based on v3.15-rc1.
> >
> > drivers/thermal/samsung/exynos_tmu.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/thermal/samsung/exynos_tmu.c
> > b/drivers/thermal/samsung/exynos_tmu.c
> > index 0d96a51..ffccc89 100644
> > --- a/drivers/thermal/samsung/exynos_tmu.c
> > +++ b/drivers/thermal/samsung/exynos_tmu.c
> > @@ -225,6 +225,8 @@ skip_calib_data:
> > trigger_levs++;
> > }
> >
> > + rising_threshold = readl(data->base + reg->threshold_th0);
> > +
> > if (data->soc == SOC_ARCH_EXYNOS4210) {
> > /* Write temperature code for threshold */
> > threshold_code = temp_to_code(data, pdata->threshold);
> > @@ -249,6 +251,7 @@ skip_calib_data:
> > ret = threshold_code;
> > goto out;
> > }
> > + rising_threshold &= ~(0xff << 8 * i);
> > rising_threshold |= threshold_code << 8 * i;
> > if (pdata->threshold_falling) {
> > threshold_code = temp_to_code(data,
> > @@ -281,6 +284,7 @@ skip_calib_data:
> > }
> > if (i == EXYNOS_MAX_TRIGGER_PER_REG - 1) {
> > /* 1-4 level to be assigned in th0 reg */
> > + rising_threshold &= ~(0xff << 8 * i);
> > rising_threshold |= threshold_code << 8 * i;
> > writel(rising_threshold,
> > data->base + reg->threshold_th0);
> > --
> > 1.7.9.5
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc"
> > in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
next prev parent reply other threads:[~2014-05-15 8:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 5:38 [PATCH] thermal: samsung: Only update available threshold limits Tushar Behera
2014-04-24 3:17 ` Tushar Behera
2014-04-24 6:18 ` Amit Kachhap
2014-05-09 11:47 ` Tushar Behera
2014-05-15 8:45 ` Zhang Rui [this message]
2014-04-24 10:48 ` Bartlomiej Zolnierkiewicz
2014-04-24 11:30 ` Tushar Behera
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=1400143528.2273.30.camel@rzhang1-toshiba \
--to=rui.zhang@intel.com \
--cc=amit.kachhap@gmail.com \
--cc=eduardo.valentin@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=tushar.behera@linaro.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).