From: Kukjin Kim <kgene.kim@samsung.com>
To: 'Chirantan Ekbote' <chirantan@chromium.org>
Cc: 'Sonny Rao' <sonnyrao@chromium.org>,
'Doug Anderson' <dianders@chromium.org>,
'Tomasz Figa' <tomasz.figa@gmail.com>,
'David Riley' <davidriley@google.com>,
'Russell King' <linux@arm.linux.org.uk>,
'Olof Johansson' <olof@lixom.net>,
linux-arm-kernel@lists.infradead.org,
'linux-samsung-soc' <linux-samsung-soc@vger.kernel.org>
Subject: RE: [PATCH] arm: dts: exynos5: Remove multi core timer
Date: Wed, 04 Jun 2014 10:45:14 +0900 [thread overview]
Message-ID: <025401cf7f96$a1193740$e34ba5c0$@samsung.com> (raw)
In-Reply-To: <CAJFHJrq79aH1QaDZqT74edwhcmYhriqG9FR4dfO1d24VfH1_uw@mail.gmail.com>
Chirantan Ekbote wrote:
>
> Hi Kukjin,
>
Hi,
> On Wed, May 21, 2014 at 5:47 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> > Yeah, actually we don't need to reset the count value after suspend/resume.
> > So, how about following? I think, it should be fine to you.
> >
> > diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
> > index 8d64200..d24db6f 100644
> > --- a/drivers/clocksource/exynos_mct.c
> > +++ b/drivers/clocksource/exynos_mct.c
> > @@ -157,12 +157,15 @@ static void exynos4_mct_frc_start(u32 hi, u32 lo)
> > {
> > u32 reg;
> >
> > - exynos4_mct_write(lo, EXYNOS4_MCT_G_CNT_L);
> > - exynos4_mct_write(hi, EXYNOS4_MCT_G_CNT_U);
> > -
> > reg = __raw_readl(reg_base + EXYNOS4_MCT_G_TCON);
> > - reg |= MCT_G_TCON_START;
> > - exynos4_mct_write(reg, EXYNOS4_MCT_G_TCON);
> > +
> > + if (!(reg & MCT_G_TCON_START)) {
> > + exynos4_mct_write(lo, EXYNOS4_MCT_G_CNT_L);
> > + exynos4_mct_write(hi, EXYNOS4_MCT_G_CNT_U);
> > +
> > + reg |= MCT_G_TCON_START;
> > + exynos4_mct_write(reg, EXYNOS4_MCT_G_TCON);
> > + }
> > }
> >
> >
>
> As Doug mentioned, this seems more complicated than necessary since
> the kernel doesn't care about the initial value of the mct counter at
> all. Is there some reason from a hardware standpoint that the counter
> needs to be cleared? If not, I would rather just delete the two
> offending lines. I am sending a patch that does this instead.
>
So decision point is that the initialization of MCT counter is required or not
when kernel begins. Yes it doesn't matter, basically MCT start has no problem
with any initial value and additionally its hardware reset value is 0x0.
OK, your suggestion is fair enough.
Thanks,
Kukjin
WARNING: multiple messages have this Message-ID (diff)
From: kgene.kim@samsung.com (Kukjin Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: dts: exynos5: Remove multi core timer
Date: Wed, 04 Jun 2014 10:45:14 +0900 [thread overview]
Message-ID: <025401cf7f96$a1193740$e34ba5c0$@samsung.com> (raw)
In-Reply-To: <CAJFHJrq79aH1QaDZqT74edwhcmYhriqG9FR4dfO1d24VfH1_uw@mail.gmail.com>
Chirantan Ekbote wrote:
>
> Hi Kukjin,
>
Hi,
> On Wed, May 21, 2014 at 5:47 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> > Yeah, actually we don't need to reset the count value after suspend/resume.
> > So, how about following? I think, it should be fine to you.
> >
> > diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
> > index 8d64200..d24db6f 100644
> > --- a/drivers/clocksource/exynos_mct.c
> > +++ b/drivers/clocksource/exynos_mct.c
> > @@ -157,12 +157,15 @@ static void exynos4_mct_frc_start(u32 hi, u32 lo)
> > {
> > u32 reg;
> >
> > - exynos4_mct_write(lo, EXYNOS4_MCT_G_CNT_L);
> > - exynos4_mct_write(hi, EXYNOS4_MCT_G_CNT_U);
> > -
> > reg = __raw_readl(reg_base + EXYNOS4_MCT_G_TCON);
> > - reg |= MCT_G_TCON_START;
> > - exynos4_mct_write(reg, EXYNOS4_MCT_G_TCON);
> > +
> > + if (!(reg & MCT_G_TCON_START)) {
> > + exynos4_mct_write(lo, EXYNOS4_MCT_G_CNT_L);
> > + exynos4_mct_write(hi, EXYNOS4_MCT_G_CNT_U);
> > +
> > + reg |= MCT_G_TCON_START;
> > + exynos4_mct_write(reg, EXYNOS4_MCT_G_TCON);
> > + }
> > }
> >
> >
>
> As Doug mentioned, this seems more complicated than necessary since
> the kernel doesn't care about the initial value of the mct counter at
> all. Is there some reason from a hardware standpoint that the counter
> needs to be cleared? If not, I would rather just delete the two
> offending lines. I am sending a patch that does this instead.
>
So decision point is that the initialization of MCT counter is required or not
when kernel begins. Yes it doesn't matter, basically MCT start has no problem
with any initial value and additionally its hardware reset value is 0x0.
OK, your suggestion is fair enough.
Thanks,
Kukjin
next prev parent reply other threads:[~2014-06-04 1:45 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-15 21:07 [PATCH] arm: dts: exynos5: Remove multi core timer Chirantan Ekbote
2014-05-15 21:07 ` Chirantan Ekbote
2014-05-15 21:14 ` Tomasz Figa
2014-05-15 21:14 ` Tomasz Figa
2014-05-15 21:33 ` Doug Anderson
2014-05-15 21:33 ` Doug Anderson
2014-05-15 21:40 ` Tomasz Figa
2014-05-15 21:40 ` Tomasz Figa
2014-05-15 21:54 ` Doug Anderson
2014-05-15 21:54 ` Doug Anderson
2014-05-15 22:13 ` Tomasz Figa
2014-05-15 22:13 ` Tomasz Figa
2014-05-15 22:44 ` Doug Anderson
2014-05-15 22:44 ` Doug Anderson
2014-05-15 23:03 ` Chirantan Ekbote
2014-05-15 23:03 ` Chirantan Ekbote
2014-05-15 23:18 ` David Riley
2014-05-15 23:18 ` David Riley
2014-05-15 23:25 ` Tomasz Figa
2014-05-15 23:25 ` Tomasz Figa
2014-05-15 23:39 ` Olof Johansson
2014-05-15 23:39 ` Olof Johansson
2014-05-15 23:45 ` Doug Anderson
2014-05-15 23:45 ` Doug Anderson
2014-05-15 23:46 ` Tomasz Figa
2014-05-15 23:46 ` Tomasz Figa
2014-05-15 23:43 ` Doug Anderson
2014-05-15 23:43 ` Doug Anderson
2014-05-16 0:31 ` Sonny Rao
2014-05-16 0:31 ` Sonny Rao
2014-05-16 22:56 ` Chirantan Ekbote
2014-05-16 22:56 ` Chirantan Ekbote
2014-05-17 0:02 ` Kukjin Kim
2014-05-17 0:02 ` Kukjin Kim
2014-05-19 15:12 ` Doug Anderson
2014-05-19 15:12 ` Doug Anderson
2014-05-21 13:24 ` Kukjin Kim
2014-05-21 13:24 ` Kukjin Kim
2014-05-21 15:30 ` Olof Johansson
2014-05-21 15:30 ` Olof Johansson
2014-05-21 16:20 ` Tomasz Figa
2014-05-21 16:20 ` Tomasz Figa
2014-05-21 18:34 ` Chirantan Ekbote
2014-05-21 18:34 ` Chirantan Ekbote
2014-05-28 17:38 ` Doug Anderson
2014-05-28 17:38 ` Doug Anderson
2014-06-02 23:22 ` Doug Anderson
2014-06-02 23:22 ` Doug Anderson
2014-05-21 12:47 ` Kukjin Kim
2014-05-21 12:47 ` Kukjin Kim
2014-05-21 18:34 ` Chirantan Ekbote
2014-05-21 18:34 ` Chirantan Ekbote
2014-05-28 17:23 ` Doug Anderson
2014-05-28 17:23 ` Doug Anderson
2014-06-03 18:41 ` Chirantan Ekbote
2014-06-03 18:41 ` Chirantan Ekbote
2014-06-04 1:45 ` Kukjin Kim [this message]
2014-06-04 1:45 ` Kukjin Kim
2014-05-28 17:37 ` Doug Anderson
2014-05-28 17:37 ` Doug Anderson
2014-05-29 20:42 ` Vincent Guittot
2014-05-29 20:42 ` Vincent Guittot
2014-05-29 21:41 ` Doug Anderson
2014-05-29 21:41 ` Doug Anderson
2014-05-15 21:44 ` Kukjin Kim
2014-05-15 21:44 ` Kukjin Kim
2014-05-15 21:44 ` Tomasz Figa
2014-05-15 21:44 ` Tomasz Figa
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='025401cf7f96$a1193740$e34ba5c0$@samsung.com' \
--to=kgene.kim@samsung.com \
--cc=chirantan@chromium.org \
--cc=davidriley@google.com \
--cc=dianders@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=olof@lixom.net \
--cc=sonnyrao@chromium.org \
--cc=tomasz.figa@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.