From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755190AbcBBO0i (ORCPT ); Tue, 2 Feb 2016 09:26:38 -0500 Received: from smtprelay.synopsys.com ([198.182.47.9]:60314 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754494AbcBBO0g (ORCPT ); Tue, 2 Feb 2016 09:26:36 -0500 From: Alexey Brodkin To: "christian.ruppert@alitech.com" CC: "linux-kernel@vger.kernel.org" , "Vineet.Gupta1@synopsys.com" , "noamc@ezchip.com" , "linux-snps-arc@lists.infradead.org" Subject: Re: [PATCH 7/9] ARC: use fixed frequencies in arc_set_early_base_baud() Thread-Topic: [PATCH 7/9] ARC: use fixed frequencies in arc_set_early_base_baud() Thread-Index: AQHRXajiVEeA45SflUyaIuf2aSf8AJ8YpVQAgAAN3ACAAAwcgA== Date: Tue, 2 Feb 2016 14:26:24 +0000 Message-ID: <1454423183.25997.21.camel@synopsys.com> References: <1454410739-24444-1-git-send-email-vgupta@synopsys.com> <1454410739-24444-8-git-send-email-vgupta@synopsys.com> <1454417606.25997.7.camel@synopsys.com> In-Reply-To: Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.225.15.89] Content-Type: text/plain; charset="utf-8" Content-ID: <3E755CC3B3A3EF4D9E96E1C2CC9207B4@internal.synopsys.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u12EQgKZ018848 Hi Christian, On Tue, 2016-02-02 at 14:43 +0100, christian.ruppert@alitech.com wrote: > Alexey Brodkin 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 > > > > > > 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 > > > Signed-off-by: Vineet Gupta > > > --- > > > 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