lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 2 Feb 2016 14:43:02 +0100
From:	christian.ruppert@...tech.com
To:	Alexey Brodkin <Alexey.Brodkin@...opsys.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-snps-arc@...ts.infradead.org" 
	<linux-snps-arc@...ts.infradead.org>,
	"noamc@...hip.com" <noamc@...hip.com>,
	Vineet Gupta <Vineet.Gupta1@...opsys.com>
Subject: Re: [PATCH 7/9] ARC: use fixed frequencies in arc_set_early_base_baud()

Alexey Brodkin <Alexey.Brodkin@...opsys.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@...opsys.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@...opsys.com>
> > Signed-off-by: Vineet Gupta <vgupta@...opsys.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...

> >     else if (of_flat_dt_is_compatible(dt_root, "snps,arc-sdp"))
> >        arc_base_baud = 33333333;   /* Fixed 33MHz clk (AXS10x) */
> >     else
> > -      arc_base_baud = core_clk;
> > +      arc_base_baud = 50000000;   /* Fixed default 50MHz */
> >  }
> >  #else
> >  #define arc_set_early_base_baud(dt_root)
> 
> -Alexey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ