public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: jonghwa3.lee@samsung.com
To: Kyungmin Park <kmpark@infradead.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"thomas.abraham@linaro.org" <thomas.abraham@linaro.org>,
	"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"MyungJoo Ham" <myungjoo.ham@samsung.com>,
	최찬우 <cw00.choi@samsung.com>
Subject: Re: [PATCH] clocksource: exynos4: Fix wrong bit operation in exynos4_mct_write()
Date: Wed, 05 Feb 2014 09:59:16 +0900	[thread overview]
Message-ID: <52F18CE4.1070700@samsung.com> (raw)
In-Reply-To: <CAH9JG2Ut4J=fQJ26RBafpB1WNe2Sd4Wv04L7xHns1=UxrhYoOQ@mail.gmail.com>

On 2014년 02월 04일 22:01, Kyungmin Park wrote:

> 
> 
> On Tuesday, February 4, 2014, Jonghwa Lee <jonghwa3.lee@samsung.com
> <mailto:jonghwa3.lee@samsung.com>> wrote:
> 
>     There was a faulty bit operation during checking offset in exynos4_mct_write().
>     This patch fixes it correctly.
> 
> What's the issue? What's happened with current code? 


Whether it would be applied or not, current code looks working fine. Because
those things are just needed to confirm writing to certain register. The
technical reference manual recommends users to check write status register for
some specified registers, e.g. control register. However current code always
skip checking write status even we access the registers required. It will just
executed writing operation only and leave write status uncleared.

Thanks,
Jonghwa

> 
> Thank you,
> Kyungmin Park
> 
> 
>     Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com <javascript:;>>
>     Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com <javascript:;>>
>     ---
>      drivers/clocksource/exynos_mct.c |    4 ++--
>      1 file changed, 2 insertions(+), 2 deletions(-)
> 
>     diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
>     index 62b0de6..e60b019 100644
>     --- a/drivers/clocksource/exynos_mct.c
>     +++ b/drivers/clocksource/exynos_mct.c
>     @@ -94,8 +94,8 @@ static void exynos4_mct_write(unsigned int value, unsigned
>     long offset)
>             __raw_writel(value, reg_base + offset);
> 
>             if (likely(offset >= EXYNOS4_MCT_L_BASE(0))) {
>     -               stat_addr = (offset & ~EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
>     -               switch (offset & EXYNOS4_MCT_L_MASK) {
>     +               stat_addr = (offset & EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
>     +               switch (offset & ~EXYNOS4_MCT_L_MASK) {
>                     case MCT_L_TCON_OFFSET:
>                             mask = 1 << 3;          /* L_TCON write status */
>                             break;
>     --
>     1.7.9.5
> 
>     --
>     To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>     the body of a message to majordomo@vger.kernel.org <javascript:;>
>     More majordomo info at  http://vger.kernel.org/majordomo-info.html
>     Please read the FAQ at  http://www.tux.org/lkml/
> 



      parent reply	other threads:[~2014-02-05  0:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04 10:48 [PATCH] clocksource: exynos4: Fix wrong bit operation in exynos4_mct_write() Jonghwa Lee
     [not found] ` <CAH9JG2Ut4J=fQJ26RBafpB1WNe2Sd4Wv04L7xHns1=UxrhYoOQ@mail.gmail.com>
2014-02-05  0:59   ` jonghwa3.lee [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=52F18CE4.1070700@samsung.com \
    --to=jonghwa3.lee@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=kmpark@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.abraham@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