From patchwork Fri May 15 08:11:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 48550 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 99E0D21411 for ; Fri, 15 May 2015 08:17:32 +0000 (UTC) Received: by wizk4 with SMTP id k4sf31538462wiz.2 for ; Fri, 15 May 2015 01:17:31 -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:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=SJ6v46BLrvTEN5o5y/YOmr+WWEhosb1xWxma1JjX1fg=; b=OomIL9x6kHGPsaLmInJzTL1q4hpIRvxi6ezUKBg3DDWKPjBokt9qf4DY4xRf5ZZI9z puq3SwyXLu+qXwjCvOtvIluUUItfY2/ZtfLGcgmYYY8duLaVORmmbDZOnPp7TcNovSrG sRyoa0ed13Sa5tSvsfpIRCnClfLccYykepZwGdAkboHDszHKfV5KOZRSAJBD5lQiTzqS K0fNgi/EytHZlys0kMy1xuMhKIyBjo7wO7wGV48dTq6h/WovKqkxgvGzIdnxUQ8+BApq PkeHbKXnaKI61uBWM1SYDnwjzH848uI+4l7GoPQD/2NIq9G4rwuMYWQl3U0a0PiVHMOE NHTQ== X-Gm-Message-State: ALoCoQmN6X3u3wwhqbSlbY10UO2gJyHHxw5nuD5JUeo2HWY73F8YQSEu79X+nbylAVkikAO3r63p X-Received: by 10.194.189.110 with SMTP id gh14mr6155114wjc.3.1431677851938; Fri, 15 May 2015 01:17:31 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.231 with SMTP id e7ls465543lah.38.gmail; Fri, 15 May 2015 01:17:31 -0700 (PDT) X-Received: by 10.112.139.198 with SMTP id ra6mr6305955lbb.15.1431677851681; Fri, 15 May 2015 01:17:31 -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 i4si598381lbc.22.2015.05.15.01.17.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 May 2015 01:17:31 -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 lagr1 with SMTP id r1so26427160lag.0 for ; Fri, 15 May 2015 01:17:31 -0700 (PDT) X-Received: by 10.152.29.161 with SMTP id l1mr6223669lah.76.1431677851560; Fri, 15 May 2015 01:17:31 -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.108.230 with SMTP id hn6csp1831694lbb; Fri, 15 May 2015 01:17:30 -0700 (PDT) X-Received: by 10.68.68.134 with SMTP id w6mr16153938pbt.25.1431677849897; Fri, 15 May 2015 01:17:29 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id kw1si1476928pab.127.2015.05.15.01.17.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 May 2015 01:17:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YtAm5-0008Fz-1A; Fri, 15 May 2015 08:15:17 +0000 Received: from mail.kernel.org ([198.145.29.136]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YtAkO-0006Jg-H0 for linux-arm-kernel@lists.infradead.org; Fri, 15 May 2015 08:13:35 +0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0F58420461; Fri, 15 May 2015 08:13:08 +0000 (UTC) Received: from localhost.localdomain (unknown [104.207.83.1]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 85DB120412; Fri, 15 May 2015 08:13:05 +0000 (UTC) From: shawnguo@kernel.org To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/9] ARM: imx: set up set_next_event hook in imx_timer_data_init() Date: Fri, 15 May 2015 16:11:43 +0800 Message-Id: <1431677507-27420-6-git-send-email-shawnguo@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431677507-27420-1-git-send-email-shawnguo@kernel.org> References: <1431677507-27420-1-git-send-email-shawnguo@kernel.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150515_011332_701236_C256D5FA X-CRM114-Status: GOOD ( 12.96 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Shawn Guo , Daniel Lezcano , kernel@pengutronix.de, Shenwei Wang X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org 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.mail=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 From: Shawn Guo Function imx_timer_data_init() was there for setting up device specific data, so let's move the setup of set_next_event hook into there. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/time.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index c86e25922eb4..d79a00e24084 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c @@ -290,15 +290,11 @@ static struct clock_event_device clockevent_mxc = { .name = "mxc_timer1", .features = CLOCK_EVT_FEAT_ONESHOT, .set_mode = mxc_set_mode, - .set_next_event = mx1_2_set_next_event, .rating = 200, }; static int __init mxc_clockevent_init(void) { - if (timer_is_v2()) - clockevent_mxc.set_next_event = v2_set_next_event; - clockevent_mxc.cpumask = cpumask_of(0); clockevents_config_and_register(&clockevent_mxc, clk_get_rate(imxtm.clk_per), @@ -351,15 +347,19 @@ static void __init imx_timer_data_init(void) switch (imxtm.type) { case GPT_TYPE_IMX1: imxtm.gpt_setup_tctl = imx1_gpt_setup_tctl; + clockevent_mxc.set_next_event = mx1_2_set_next_event; break; case GPT_TYPE_IMX21: imxtm.gpt_setup_tctl = imx21_gpt_setup_tctl; + clockevent_mxc.set_next_event = mx1_2_set_next_event; break; case GPT_TYPE_IMX31: imxtm.gpt_setup_tctl = imx31_gpt_setup_tctl; + clockevent_mxc.set_next_event = v2_set_next_event; break; case GPT_TYPE_IMX6DL: imxtm.gpt_setup_tctl = imx6dl_gpt_setup_tctl; + clockevent_mxc.set_next_event = v2_set_next_event; break; default: BUG();