From patchwork Sat Dec 2 02:34:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 10088425 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 20D416037E for ; Sat, 2 Dec 2017 02:37:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FAD128A98 for ; Sat, 2 Dec 2017 02:37:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0428029DE5; Sat, 2 Dec 2017 02:37:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 685A728A98 for ; Sat, 2 Dec 2017 02:37:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=NgW9hAcLkisLi59UqEmB06g9Rp/BijX1SehjRIjFlxA=; b=sFC7V5v6eMvb4/S9aDeWMtseHT B1WAbhyVLZ/FmAgc5Pa4oa5K8TV25psqE94UwSS68bZMprqDam0SjFyfnInQkR5aQAIxMUvCkYO6/ kYKE4NDlZssjmfFKPLuwIGEM41toCGPYdq77kGncYrrLRLSm4ZH6DKBRJ1KMR/bPH4Krk61MEYmQv OlchECJjyV3I7SHKil6SFXYFWd0G4jjJ2tGXURcxePZFXZLcBxcx88TomOJiNPr6Mh5ZjyqkQjw19 5W9VgVSLm34UTMeMLc4M3ZtPSoDs3HxaaJnjp29yh0MAvbGEy6AEyuuM5nex8pQBAu66yHXyIthm8 O2yJI5wA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eKxgQ-0004Bh-4A; Sat, 02 Dec 2017 02:37:38 +0000 Received: from vern.gendns.com ([206.190.152.46]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eKxfa-0003C1-Sv for linux-arm-kernel@lists.infradead.org; Sat, 02 Dec 2017 02:36:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XoR0kWwlRSxVcHZamnXGBDgmG3DCNbSZiUnEMhstbKI=; b=esArxv/hll6xtabajsAn5T+Zl V0baXhiahlCDC0RVhpQWuXwSsHkYCOKEYOcsKnzy5vJWS36RN9a9u0CHolYZXbmS/cD5xmlt0F3Vx uMRQYUP4a1BV2UZC2kIurr85iu61jhLp9YUFF51cZBg8tu6g3zSHdEsjnKJIeKL0u9iV0hzOJLMhW 04+SqB5idXoRbIZEP7q/60Ka8da4g2dIg0M1bSNV+0a6yP/bLY3EajofdWfqF4A7z3f3BxE8YiHn2 HtJmrTBVTYHNzaqa5VeSkutlTeoEjFnutRL11NlRAbmETfkYMwe46pqYYkkctDsDYNZqmh7km5o0q xhIX7fVxA==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:46626 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.89) (envelope-from ) id 1eKxcp-000na0-8Y; Fri, 01 Dec 2017 21:33:55 -0500 From: David Lechner To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v1 2/6] ARM: davinci: move davinci_clk_init() to init_time Date: Fri, 1 Dec 2017 20:34:10 -0600 Message-Id: <1512182054-17410-3-git-send-email-david@lechnology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512182054-17410-1-git-send-email-david@lechnology.com> References: <1512182054-17410-1-git-send-email-david@lechnology.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171201_183647_029688_2E346A2E X-CRM114-Status: GOOD ( 10.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Sekhar Nori , David Lechner , Kevin Hilman MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This moves the call of davinci_clk_init() from map_io to init_time for all boards. This is the proper place to init clocks. This is also done in preparation for moving to the common clock framework. Signed-off-by: David Lechner --- arch/arm/mach-davinci/da830.c | 2 -- arch/arm/mach-davinci/da850.c | 2 -- arch/arm/mach-davinci/dm355.c | 1 - arch/arm/mach-davinci/dm365.c | 1 - arch/arm/mach-davinci/dm644x.c | 1 - arch/arm/mach-davinci/dm646x.c | 7 ------- arch/arm/mach-davinci/time.c | 7 +++++++ 7 files changed, 7 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index 2e249f0..f28eda1 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c @@ -1220,6 +1220,4 @@ void __init da830_map_io(void) da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K); WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module"); - - davinci_clk_init(davinci_soc_info_da830.cpu_clks); } diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 056b148..28d8ec2 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -1392,6 +1392,4 @@ void __init da850_map_io(void) v = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG)); v &= ~CFGCHIP3_PLL1_MASTER_LOCK; __raw_writel(v, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG)); - - davinci_clk_init(davinci_soc_info_da850.cpu_clks); } diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 88c3c80..164ff27 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c @@ -1043,7 +1043,6 @@ void __init dm355_map_io(void) { davinci_common_init(&davinci_soc_info_dm355); davinci_map_sysmod(); - davinci_clk_init(davinci_soc_info_dm355.cpu_clks); } int __init dm355_init_video(struct vpfe_config *vpfe_cfg, diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index f979180..6076085 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c @@ -1166,7 +1166,6 @@ void __init dm365_map_io(void) { davinci_common_init(&davinci_soc_info_dm365); davinci_map_sysmod(); - davinci_clk_init(davinci_soc_info_dm365.cpu_clks); } static struct resource dm365_vpss_resources[] = { diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 80048c0..c5b1cf3 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c @@ -931,7 +931,6 @@ void __init dm644x_map_io(void) { davinci_common_init(&davinci_soc_info_dm644x); davinci_map_sysmod(); - davinci_clk_init(davinci_soc_info_dm644x.cpu_clks); } int __init dm644x_init_video(struct vpfe_config *vpfe_cfg, diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index b3be5c8..a844f7b 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c @@ -17,7 +17,6 @@ #include #include -#include #include #include @@ -953,16 +952,10 @@ int __init dm646x_init_edma(struct edma_rsv_info *rsv) return IS_ERR(edma_pdev) ? PTR_ERR(edma_pdev) : 0; } -#define DM6467T_EVM_REF_FREQ 33000000 - void __init dm646x_map_io(void) { davinci_common_init(&davinci_soc_info_dm646x); davinci_map_sysmod(); - davinci_clk_init(davinci_soc_info_dm646x.cpu_clks); - - if (machine_is_davinci_dm6467tevm()) - davinci_set_refclk_rate(DM6467T_EVM_REF_FREQ); } static int __init dm646x_init_devices(void) diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c index 034f865..6ba156e 100644 --- a/arch/arm/mach-davinci/time.c +++ b/arch/arm/mach-davinci/time.c @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -341,6 +342,7 @@ static struct clock_event_device clockevent_davinci = { .set_state_oneshot = davinci_set_oneshot, }; +#define DM6467T_EVM_REF_FREQ 33000000 void __init davinci_timer_init(void) { @@ -350,6 +352,11 @@ void __init davinci_timer_init(void) unsigned int clocksource_id; int i; + davinci_clk_init(soc_info->cpu_clks); + + if (machine_is_davinci_dm6467tevm()) + davinci_set_refclk_rate(DM6467T_EVM_REF_FREQ); + clockevent_id = soc_info->timer_info->clockevent_id; clocksource_id = soc_info->timer_info->clocksource_id;