mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Li.Xiubo@freescale.com" <Li.Xiubo@freescale.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 5/5] Clocksource: Flextimer: Use Macro for clock source selection.
Date: Thu, 4 Sep 2014 02:06:46 +0000	[thread overview]
Message-ID: <0d12608f04674dcc8138bb23431c8ca4@BY2PR0301MB0613.namprd03.prod.outlook.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1409031346220.3333@nanos>


> Subject: Re: [PATCH 5/5] Clocksource: Flextimer: Use Macro for clock source
> selection.
> 
> On Tue, 26 Aug 2014, Xiubo Li wrote:
> > FTM source clock is selectable:
> > Source clock can be the system clock, the fixed frequency clock,
> > or an external clock.
> > Fixed frequency clock is an additional clock input to allow the
> > selection of an on chip clock source other than the system clock.
> > Selecting external clock connects FTM clock to a chip level input
> > pin therefore allowing to synchronize the FTM counter with an off
> > chip clock source
> >
> > Clock Source Selection:
> > Selects one of the three FTM counter clock sources.
> >
> > 00 No clock selected. This in effect disables the FTM counter.
> > 01 System clock
> > ---
> > 10 Fixed frequency clock
> > 11 External clock
> >
> > These two will be useful for the alarm on LS1 platform in late future,
> > the system clock's frequency is too high to get a long delay timer when
> > go to sleep, so the fixed or external clock could be used instead.
> 
> And how is that relevant to changing the mask from a hardcoded value
> to a constant? It's still hardcoded at compile time and I don't see
> how that helps chosing the clock at runtime for a particular use case.
> 
> >  #define FTM_SC		0x00
> > +#define FTM_SC_CLKS_NON		0
> > +#define FTM_SC_CLKS_SYS		1
> >  #define FTM_SC_CLK_SHIFT	3
> >  #define FTM_SC_CLK_MASK	(0x3 << FTM_SC_CLK_SHIFT)
> >  #define FTM_SC_CLK(c)	((c) << FTM_SC_CLK_SHIFT)
> > @@ -67,7 +69,7 @@ static inline void ftm_counter_enable(void __iomem *base)
> >  	/* select and enable counter clock source */
> >  	val = ftm_readl(base + FTM_SC);
> >  	val &= ~(FTM_SC_PS_MASK | FTM_SC_CLK_MASK);
> > -	val |= priv->ps | FTM_SC_CLK(1);
> > +	val |= priv->ps | FTM_SC_CLK(FTM_SC_CLKS_SYS);
> >  	ftm_writel(val, base + FTM_SC);
> >  }
> >
> > @@ -77,7 +79,8 @@ static inline void ftm_counter_disable(void __iomem *base)
> >
> >  	/* disable counter clock source */
> >  	val = ftm_readl(base + FTM_SC);
> > -	val &= ~(FTM_SC_PS_MASK | FTM_SC_CLK_MASK);
> > +	val &= ~(FTM_SC_CLK_MASK);
> 
> So you remove the FTM_SC_PS_MASK without mentioning it in the
> changelog. Either this is by mistake or it wants to be documented WHY
> it is not needed in the first place.
> 

This is just prepare for the other new features in the future.

And delay this changes maybe better.

Thanks,

BRs
Xiubo


  reply	other threads:[~2014-09-04  2:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26  5:45 [PATCH 0/5] Clocksource: Flextimer: Merged to LS1 Xiubo Li
2014-08-26  5:45 ` [PATCH 1/5] Clocksource: Flextimer: Set cpumask to cpu_possible_mask Xiubo Li
2014-08-26  5:45 ` [PATCH 2/5] Clocksource: Flextimer: Use internal clocksource read API Xiubo Li
2014-09-03 10:38   ` Thomas Gleixner
2014-09-04  1:49     ` Li.Xiubo
2014-09-04  8:35       ` Thomas Gleixner
2014-09-04  8:43         ` Li.Xiubo
2014-09-04  8:45           ` Thomas Gleixner
2014-09-04  8:53             ` Li.Xiubo
2014-09-05  5:59             ` Li.Xiubo
2014-08-26  5:45 ` [PATCH 3/5] Clocksource: Flextimer: Remove the useless code Xiubo Li
2014-08-26  5:45 ` [PATCH 4/5] Clocksource: Flextimer: Fix counter clock prescaler calculation Xiubo Li
2014-09-03 10:57   ` Thomas Gleixner
2014-09-04  2:18     ` Li.Xiubo
2014-09-03 10:59   ` Thomas Gleixner
2014-09-04  2:03     ` Li.Xiubo
2014-08-26  5:45 ` [PATCH 5/5] Clocksource: Flextimer: Use Macro for clock source selection Xiubo Li
2014-09-03 12:01   ` Thomas Gleixner
2014-09-04  2:06     ` Li.Xiubo [this message]
2014-09-04  8:36       ` Thomas Gleixner
2014-09-03  3:50 ` [PATCH 0/5] Clocksource: Flextimer: Merged to LS1 Li.Xiubo

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=0d12608f04674dcc8138bb23431c8ca4@BY2PR0301MB0613.namprd03.prod.outlook.com \
    --to=li.xiubo@freescale.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®