From patchwork Tue Oct 6 17:01:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 54541 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 0408D22FC5 for ; Tue, 6 Oct 2015 17:02:49 +0000 (UTC) Received: by lbwr8 with SMTP id r8sf50515806lbw.0 for ; Tue, 06 Oct 2015 10:02:48 -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=szzsUtwvMpwQfboSFJF9dLOdk9IhJa1B3vG88hQTnp8=; b=GUGo1RVGbiFMc6tRQktKHbXf6KbbUSCT8PjugmQ6iEo4o5UNatKek1UDrr/5epw+qx OIEe1aQw6gbkadZqY7NPlsqp91u4xnvj4qY6eT2gGEizyHQRAheZE/rBEsX+OxmgNJ/w FQETO1ByZawHUczwAEuofyok9YNZaXpD3e1JJww0C/xSN+dFab0mVZNgiryrLyJrb/Dp ambMhktAUEq7qrLV1PwiaXwmCC0YarPsAV/z1elaIri40h9+jNVCMD2APnmoqknpctKw yTcH9a+xyjGLTJLxNT691we5Nf28ISL5MCzvTv2rcYFBkMYAlVocLxqY8hrUV3nl4Xse +7ZQ== X-Gm-Message-State: ALoCoQmrApzsQZUMZXl7fq4SfjFj+0io4eVQMZquQZyj0Gqc6t9+qpDh4B89Hd3lCc4x2A4BifJS X-Received: by 10.180.72.68 with SMTP id b4mr3592475wiv.2.1444150967954; Tue, 06 Oct 2015 10:02:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.166.200 with SMTP id p191ls552179lfe.37.gmail; Tue, 06 Oct 2015 10:02:47 -0700 (PDT) X-Received: by 10.25.169.68 with SMTP id s65mr10156169lfe.78.1444150967750; Tue, 06 Oct 2015 10:02:47 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id 18si21648262lfw.5.2015.10.06.10.02.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Oct 2015 10:02:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by lacwq3 with SMTP id wq3so2325894lac.0 for ; Tue, 06 Oct 2015 10:02:47 -0700 (PDT) X-Received: by 10.25.40.130 with SMTP id o124mr9736371lfo.41.1444150967620; Tue, 06 Oct 2015 10:02:47 -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 w3csp1963981lbq; Tue, 6 Oct 2015 10:02:46 -0700 (PDT) X-Received: by 10.68.202.66 with SMTP id kg2mr47674498pbc.81.1444150966369; Tue, 06 Oct 2015 10:02:46 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z6si50229316pbt.171.2015.10.06.10.02.46; Tue, 06 Oct 2015 10:02:46 -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 S1752166AbbJFRCp (ORCPT + 5 others); Tue, 6 Oct 2015 13:02:45 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:45258 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751498AbbJFRCo (ORCPT ); Tue, 6 Oct 2015 13:02:44 -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 t96H2ECm013658; Tue, 6 Oct 2015 12:02:15 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t96H2EHv002442; Tue, 6 Oct 2015 12:02:14 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Tue, 6 Oct 2015 12:02:15 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t96H2DNn006234; Tue, 6 Oct 2015 12:02:14 -0500 From: Felipe Balbi To: Tony Lindgren CC: Linux OMAP Mailing List , Linux ARM Kernel Mailing List , , , Linux Kernel Mailing List , Felipe Balbi Subject: [PATCH 02/11] arm: omap2: timer: add a gptimer argument to sync32k_timer_init() Date: Tue, 6 Oct 2015 12:01:58 -0500 Message-ID: <1444150927-14771-3-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.5.3 In-Reply-To: <1444150927-14771-1-git-send-email-balbi@ti.com> References: <1444150927-14771-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.53 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 23e58ea6a171..f53ed049d710 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -604,14 +604,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 @@ -622,7 +622,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 */ @@ -630,13 +630,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 */ @@ -653,7 +653,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)