All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey.Brodkin@synopsys.com (Alexey Brodkin)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH 7/9] ARC: use fixed frequencies in arc_set_early_base_baud()
Date: Tue, 2 Feb 2016 14:26:24 +0000	[thread overview]
Message-ID: <1454423183.25997.21.camel@synopsys.com> (raw)
In-Reply-To: <OFC064FA19.A440461D-ONC1257F4D.004B05DC-C1257F4D.004B3D60@alitech.com>

Hi Christian,

On Tue, 2016-02-02@14:43 +0100, christian.ruppert@alitech.com wrote:
> Alexey Brodkin <Alexey.Brodkin at synopsys.com> wrote on 02.02.2016 13:53:26:
> > 
> > Adding Christian for Abilis TB10x clocks review.
> > 
> > On Tue, 2016-02-02@16:28 +0530, Vineet Gupta wrote:
> > > From: Alexey Brodkin <abrodkin at synopsys.com>
> > > 
> > > UARTs usually have fixed clock so we're switching to use of
> > > constant values instead of something derived from core clock
> > > frequency.
> > > 
> > > Among other things this will allow us to get rid of
> > > arc_{get|set}_core_freq() and switch to generic clock
> > > framework later on.
> > > 
> > > Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
> > > Signed-off-by: Vineet Gupta <vgupta at synopsys.com>
> > > ---
> > >  arch/arc/kernel/devtree.c | 6 ++----
> > >  1 file changed, 2 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/arch/arc/kernel/devtree.c b/arch/arc/kernel/devtree.c
> > > index 7e844fd8213f..e155126c79b1 100644
> > > --- a/arch/arc/kernel/devtree.c
> > > +++ b/arch/arc/kernel/devtree.c
> > > @@ -28,14 +28,12 @@ unsigned int __init arc_early_base_baud(void)
> > > 
> > >  static void __init arc_set_early_base_baud(unsigned long dt_root)
> > >  {
> > > -   unsigned int core_clk = arc_get_core_freq();
> > > -
> > >     if (of_flat_dt_is_compatible(dt_root, "abilis,arc-tb10x"))
> > > -      arc_base_baud = core_clk/3;
> > > +      arc_base_baud = 166666667;   /* Fixed 166.7MHz clk (TB10x) */
> 
> Actually, (int)core_clk/(int)3 is 166666666 not 166666667.
> I seem to remember that this rounding detail did make a difference at some 
> point. Unluckily, the details are long forgotten in the mist of time...

Interesting :)

I did that rounding intentionally hoping for the best.
But so good we've got your valuable input before it's too late.

-Alexey

WARNING: multiple messages have this Message-ID (diff)
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: "christian.ruppert@alitech.com" <christian.ruppert@alitech.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Vineet.Gupta1@synopsys.com" <Vineet.Gupta1@synopsys.com>,
	"noamc@ezchip.com" <noamc@ezchip.com>,
	"linux-snps-arc@lists.infradead.org" 
	<linux-snps-arc@lists.infradead.org>
Subject: Re: [PATCH 7/9] ARC: use fixed frequencies in arc_set_early_base_baud()
Date: Tue, 2 Feb 2016 14:26:24 +0000	[thread overview]
Message-ID: <1454423183.25997.21.camel@synopsys.com> (raw)
In-Reply-To: <OFC064FA19.A440461D-ONC1257F4D.004B05DC-C1257F4D.004B3D60@alitech.com>

Hi Christian,

On Tue, 2016-02-02 at 14:43 +0100, christian.ruppert@alitech.com wrote:
> Alexey Brodkin <Alexey.Brodkin@synopsys.com> wrote on 02.02.2016 13:53:26:
> > 
> > Adding Christian for Abilis TB10x clocks review.
> > 
> > On Tue, 2016-02-02 at 16:28 +0530, Vineet Gupta wrote:
> > > From: Alexey Brodkin <abrodkin@synopsys.com>
> > > 
> > > UARTs usually have fixed clock so we're switching to use of
> > > constant values instead of something derived from core clock
> > > frequency.
> > > 
> > > Among other things this will allow us to get rid of
> > > arc_{get|set}_core_freq() and switch to generic clock
> > > framework later on.
> > > 
> > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> > > Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> > > ---
> > >  arch/arc/kernel/devtree.c | 6 ++----
> > >  1 file changed, 2 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/arch/arc/kernel/devtree.c b/arch/arc/kernel/devtree.c
> > > index 7e844fd8213f..e155126c79b1 100644
> > > --- a/arch/arc/kernel/devtree.c
> > > +++ b/arch/arc/kernel/devtree.c
> > > @@ -28,14 +28,12 @@ unsigned int __init arc_early_base_baud(void)
> > > 
> > >  static void __init arc_set_early_base_baud(unsigned long dt_root)
> > >  {
> > > -   unsigned int core_clk = arc_get_core_freq();
> > > -
> > >     if (of_flat_dt_is_compatible(dt_root, "abilis,arc-tb10x"))
> > > -      arc_base_baud = core_clk/3;
> > > +      arc_base_baud = 166666667;   /* Fixed 166.7MHz clk (TB10x) */
> 
> Actually, (int)core_clk/(int)3 is 166666666 not 166666667.
> I seem to remember that this rounding detail did make a difference at some 
> point. Unluckily, the details are long forgotten in the mist of time...

Interesting :)

I did that rounding intentionally hoping for the best.
But so good we've got your valuable input before it's too late.

-Alexey

  reply	other threads:[~2016-02-02 14:26 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 10:58 [PATCH 0/9] ARC clockevent/clocksource modernization Vineet Gupta
2016-02-02 10:58 ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 1/9] ARC: [dts] Add clk feeding into timers to DTs Vineet Gupta
2016-02-02 10:58   ` Vineet Gupta
2016-02-02 10:58   ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 2/9] ARC: [dts] Introduce Timer bindings Vineet Gupta
2016-02-02 10:58   ` Vineet Gupta
2016-02-02 10:58   ` Vineet Gupta
2016-02-02 12:48   ` Alexey Brodkin
2016-02-02 12:48     ` Alexey Brodkin
2016-02-02 12:48     ` Alexey Brodkin
2016-02-02 13:15   ` Alexey Brodkin
2016-02-02 13:15     ` Alexey Brodkin
2016-02-02 14:29     ` Vineet Gupta
2016-02-02 14:29       ` Vineet Gupta
2016-02-02 15:36       ` Alexey Brodkin
2016-02-02 15:36         ` Alexey Brodkin
2016-02-02 15:36         ` Alexey Brodkin
2016-02-02 22:57         ` Alexey Brodkin
2016-02-02 22:57           ` Alexey Brodkin
2016-02-02 22:57           ` Alexey Brodkin
2016-02-03 13:44           ` Alexey Brodkin
2016-02-03 13:44             ` Alexey Brodkin
2016-02-03 13:50             ` Alexey Brodkin
2016-02-03 13:50               ` Alexey Brodkin
2016-02-03 13:50               ` Alexey Brodkin
2016-02-02 22:03   ` Rob Herring
2016-02-02 22:03     ` Rob Herring
2016-02-02 22:03     ` Rob Herring
2016-02-03  8:04     ` Vineet Gupta
2016-02-03  8:04       ` Vineet Gupta
2016-02-03 15:39       ` Rob Herring
2016-02-03 15:39         ` Rob Herring
2016-02-03 15:39         ` Rob Herring
2016-02-16  8:44         ` Vineet Gupta
2016-02-16  8:44           ` Vineet Gupta
2016-02-16  8:44           ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 3/9] ARC: clockevent: switch to cpu notifier for clockevent setup Vineet Gupta
2016-02-02 10:58   ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 4/9] ARC: clockevent: Prepare for DT based probe Vineet Gupta
2016-02-02 10:58   ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 5/9] ARC: clockevent: " Vineet Gupta
2016-02-02 10:58   ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 6/9] ARC: clocksource: " Vineet Gupta
2016-02-02 10:58   ` Vineet Gupta
2016-02-08 12:10   ` Daniel Lezcano
2016-02-08 12:10     ` Daniel Lezcano
2016-02-08 12:23     ` Vineet Gupta
2016-02-08 12:23       ` Vineet Gupta
2016-02-10 13:38       ` Daniel Lezcano
2016-02-10 13:38         ` Daniel Lezcano
2016-02-02 10:58 ` [PATCH 7/9] ARC: use fixed frequencies in arc_set_early_base_baud() Vineet Gupta
2016-02-02 10:58   ` Vineet Gupta
2016-02-02 12:53   ` Alexey Brodkin
2016-02-02 12:53     ` Alexey Brodkin
2016-02-02 13:43     ` christian.ruppert
2016-02-02 13:43       ` christian.ruppert
2016-02-02 14:26       ` Alexey Brodkin [this message]
2016-02-02 14:26         ` Alexey Brodkin
2016-02-02 10:58 ` [PATCH 8/9] ARC: [plat-axs] Don't use arc_{get|set}_core_freq() for manipulating core clk Vineet Gupta
2016-02-02 10:58   ` Vineet Gupta
2016-02-02 10:58 ` [PATCH 9/9] ARC: RIP arc_{get|set}_core_freq() clk API Vineet Gupta
2016-02-02 10:58   ` Vineet Gupta

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=1454423183.25997.21.camel@synopsys.com \
    --to=alexey.brodkin@synopsys.com \
    --cc=linux-snps-arc@lists.infradead.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 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.