From patchwork Tue Sep 29 20:43:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 54249 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id 2FFF122B1E for ; Tue, 29 Sep 2015 20:44:59 +0000 (UTC) Received: by laak17 with SMTP id k17sf10566295laa.3 for ; Tue, 29 Sep 2015 13:44:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=bvFlsAJmVn7Oxm/OQ9FyCpsko5fFk9eAIxN0yO9lEw4=; b=dhh7ivbzQAOSuz2mukMLBm8vrHPqKrCsiTfSRI+tEMoDmc+S2zpt0eFnTjkm1dloiq g2mbuvRJ0YzrlPDOwMXK5f/hOAt/dS9Gmcse4FqNyclRBFlTT72rhUclneYbbmidXoZe fuJyihAe3KaU8II3Gj8Ug225p6IerjW9oGk+OHKZyiEpejqzu2cDNcsRjsnfsYEv2ASl KNQzi81oGQ1eY5dIvfswfB5tCZHk4UQUoDheb+CL2/hQgANbDJziOScKnmNIgWUfNZXT ABYtf5JYOQVhl8YejS4U4kRiec5fzpFjmIIfX1qJ6t0Xpw4mMpojfGo8vlbh/0Z7PpFR pgAA== X-Gm-Message-State: ALoCoQk7avk2rNlBUeZWaQrtCTxq6p8oJySISWNVf2Qkut8rZcrwknOeewCpgq+xC+eZRQpyNP+V X-Received: by 10.180.10.202 with SMTP id k10mr4219863wib.2.1443559498086; Tue, 29 Sep 2015 13:44:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.162 with SMTP id c2ls2356laa.60.gmail; Tue, 29 Sep 2015 13:44:57 -0700 (PDT) X-Received: by 10.152.18.167 with SMTP id x7mr1039lad.29.1443559497791; Tue, 29 Sep 2015 13:44:57 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id c1si2586673laf.95.2015.09.29.13.44.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Sep 2015 13:44:57 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by laer8 with SMTP id r8so23119349lae.2 for ; Tue, 29 Sep 2015 13:44:57 -0700 (PDT) X-Received: by 10.152.21.41 with SMTP id s9mr7468lae.86.1443559497605; Tue, 29 Sep 2015 13:44:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2360970lbq; Tue, 29 Sep 2015 13:44:56 -0700 (PDT) X-Received: by 10.66.182.135 with SMTP id ee7mr35146748pac.95.1443559495837; Tue, 29 Sep 2015 13:44:55 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tx7si39966996pac.207.2015.09.29.13.44.55; Tue, 29 Sep 2015 13:44:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752658AbbI2Uow (ORCPT + 5 others); Tue, 29 Sep 2015 16:44:52 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:56229 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752453AbbI2Uoq (ORCPT ); Tue, 29 Sep 2015 16:44:46 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id t8TKiASt023541; Tue, 29 Sep 2015 15:44:10 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8TKiAmo020315; Tue, 29 Sep 2015 15:44:10 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Tue, 29 Sep 2015 15:44:11 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8TKi9Oe028636; Tue, 29 Sep 2015 15:44:10 -0500 From: Felipe Balbi To: Tony Lindgren CC: Linux OMAP Mailing List , Linux ARM Kernel Mailing List , Linux Kernel Mailing List , , , Felipe Balbi Subject: [RFC/PATCH 02/11] arm: omap2: timer: add a gptimer argument to sync32k_timer_init() Date: Tue, 29 Sep 2015 15:43:57 -0500 Message-ID: <1443559446-26969-3-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.5.3 In-Reply-To: <1443559446-26969-1-git-send-email-balbi@ti.com> References: <1443559446-26969-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , as it turns out, __omap_gptimer_init() and __omap_sync32k_timer_init() are essentially the same thing, but __omap_gptimer_init() wants to always use gptimer. Instead of forcing all those devices to pass a use_gptimer cmdline argument, we add a new function argument to __omap_sync32k_timer_init() in preparation to deleting __omap_gptimer_init(). On a follow-up patch, we will remove uses of __omap_gptimer_init() and replace them with __omap_sync32k_timer_init() and pass the last argument as true. Signed-off-by: Felipe Balbi --- arch/arm/mach-omap2/timer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 1f6532bd104e..4f9cd4b2e6b0 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -608,14 +608,14 @@ static void __init __omap_gptimer_init(int clkev_nr, const char *clkev_src, static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src, const char *clkev_prop, int clksrc_nr, const char *clksrc_src, - const char *clksrc_prop) + const char *clksrc_prop, bool gptimer) { omap_clk_init(); omap_dmtimer_init(); omap2_gp_clockevent_init(clkev_nr, clkev_src, clkev_prop); /* Enable the use of clocksource="gp_timer" kernel parameter */ - if (use_gptimer_clksrc) + if (use_gptimer_clksrc || gptimer) omap2_gptimer_clocksource_init(clksrc_nr, clksrc_src, clksrc_prop); else @@ -626,7 +626,7 @@ static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src void __init omap2_sync32k_timer_init(void) { __omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon", - 2, "timer_sys_ck", NULL); + 2, "timer_sys_ck", NULL, false); } #endif /* CONFIG_ARCH_OMAP2 */ @@ -634,13 +634,13 @@ void __init omap2_sync32k_timer_init(void) void __init omap3_sync32k_timer_init(void) { __omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon", - 2, "timer_sys_ck", NULL); + 2, "timer_sys_ck", NULL, false); } void __init omap3_secure_sync32k_timer_init(void) { __omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure", - 2, "timer_sys_ck", NULL); + 2, "timer_sys_ck", NULL, false); } #endif /* CONFIG_ARCH_OMAP3 */ @@ -657,7 +657,7 @@ void __init omap3_gptimer_timer_init(void) static void __init omap4_sync32k_timer_init(void) { __omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon", - 2, "sys_clkin_ck", NULL); + 2, "sys_clkin_ck", NULL, false); } void __init omap4_local_timer_init(void)