Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752377AbcCHM1h (ORCPT ); Tue, 8 Mar 2016 07:27:37 -0500 Received: from smtprelay4.synopsys.com ([198.182.47.9]:46777 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933042AbcCHM1T (ORCPT ); Tue, 8 Mar 2016 07:27:19 -0500 From: Vineet Gupta To: CC: lkml , Noam Camus , Alexey Brodkin , Rob Herring , Daniel Lezcano , Christian Ruppert , Vineet Gupta Subject: [PATCH v2 7/9] ARC: use fixed frequencies in arc_set_early_base_baud() Date: Tue, 8 Mar 2016 17:56:10 +0530 Message-ID: <1457439972-20285-8-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457439972-20285-1-git-send-email-vgupta@synopsys.com> References: <1457439972-20285-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.12.197.157] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1563 Lines: 48 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. Cc: Christian Ruppert Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta --- Changes v1 -> v2 - Base baud TB10x needs to be 166.66 not 166.67 [Christian] v1: - http://lists.infradead.org/pipermail/linux-snps-arc/2016-February/000453.html 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..fecbc96df828 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 = 166666666; /* Fixed 166.6MHz clk (TB10x) */ 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) -- 2.5.0