From patchwork Fri May 15 08:11:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 48548 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3121121411 for ; Fri, 15 May 2015 08:16:29 +0000 (UTC) Received: by wiz9 with SMTP id 9sf31579186wiz.3 for ; Fri, 15 May 2015 01:16:28 -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=rzh3g16gTxx/zvkPKdzzGsh7DBMlhuU8g0uIW07iy5o=; b=WTx7OTG1jj9T/T4cxhjkH5DfjfY1SwznZIjzYtYD2/TIami3kBCgN4bL0drJdfi4QM kA5a/iJwFL9FPLiosOArOaRAbaLOzWG5sTexkiaatzJD1pvK+g81BgIbPZi6RDP/ojta 5W0NJuuP7fjw/FSpOEc3Vjw0JWARxW6evMGa3YczaNKvzfAtfsRD3+D7iyTR4bd59jaN zaW3nghoCLD/g0IWUzaxhWnfp4Hg415aeY+bn0D9UFlEpJHtR2PHfBCcLkr7x7h0fiOq v7ZR5/IkGF727mNgfTik81JzL/wV0dNDCblrgTOjchBPRlp1LyiQXbvxXoDwA1+tbz1e k7tA== X-Gm-Message-State: ALoCoQlaHJfjcE5KZzNn3TO+opD3+8Bir0zsEMLGl/xNyBuuNUvQdeSx62iJRfdLPpNG1YgIJeS3 X-Received: by 10.112.138.2 with SMTP id qm2mr6161324lbb.19.1431677788476; Fri, 15 May 2015 01:16:28 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.10 with SMTP id p10ls527843lag.29.gmail; Fri, 15 May 2015 01:16:28 -0700 (PDT) X-Received: by 10.112.146.97 with SMTP id tb1mr6525667lbb.12.1431677788326; Fri, 15 May 2015 01:16:28 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id t7si580564lat.105.2015.05.15.01.16.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 May 2015 01:16:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lagr1 with SMTP id r1so26390432lag.0 for ; Fri, 15 May 2015 01:16:28 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr6125282lak.117.1431677787981; Fri, 15 May 2015 01:16:27 -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 hn6csp1831055lbb; Fri, 15 May 2015 01:16:26 -0700 (PDT) X-Received: by 10.66.62.166 with SMTP id z6mr2371218par.42.1431677786155; Fri, 15 May 2015 01:16:26 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id dt10si1480247pdb.120.2015.05.15.01.16.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 May 2015 01:16:26 -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 1YtAlI-0006oa-DP; Fri, 15 May 2015 08:14:28 +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 1YtAkE-0006GQ-G8 for linux-arm-kernel@lists.infradead.org; Fri, 15 May 2015 08:13:23 +0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4376020411; Fri, 15 May 2015 08:13:02 +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 9D8AF20412; Fri, 15 May 2015 08:12:59 +0000 (UTC) From: shawnguo@kernel.org To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/9] ARM: imx: initialize gpt device type for DT boot Date: Fri, 15 May 2015 16:11:41 +0800 Message-Id: <1431677507-27420-4-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_011322_616921_DE30FA74 X-CRM114-Status: GOOD ( 10.57 ) 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.45 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 Use different initialization function in CLOCKSOURCE_OF_DECLARE() to initialize gpt device type for DT boot. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/time.c | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index 5241a173fd60..ed01813cfc76 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c @@ -385,11 +385,39 @@ static void __init mxc_timer_init_dt(struct device_node *np) _mxc_timer_init(); } -CLOCKSOURCE_OF_DECLARE(mx1_timer, "fsl,imx1-gpt", mxc_timer_init_dt); -CLOCKSOURCE_OF_DECLARE(mx25_timer, "fsl,imx25-gpt", mxc_timer_init_dt); -CLOCKSOURCE_OF_DECLARE(mx50_timer, "fsl,imx50-gpt", mxc_timer_init_dt); -CLOCKSOURCE_OF_DECLARE(mx51_timer, "fsl,imx51-gpt", mxc_timer_init_dt); -CLOCKSOURCE_OF_DECLARE(mx53_timer, "fsl,imx53-gpt", mxc_timer_init_dt); -CLOCKSOURCE_OF_DECLARE(mx6q_timer, "fsl,imx6q-gpt", mxc_timer_init_dt); -CLOCKSOURCE_OF_DECLARE(mx6sl_timer, "fsl,imx6sl-gpt", mxc_timer_init_dt); -CLOCKSOURCE_OF_DECLARE(mx6sx_timer, "fsl,imx6sx-gpt", mxc_timer_init_dt); + +static void __init imx1_timer_init_dt(struct device_node *np) +{ + imxtm.type = GPT_TYPE_IMX1; + mxc_timer_init_dt(np); +} + +static void __init imx21_timer_init_dt(struct device_node *np) +{ + imxtm.type = GPT_TYPE_IMX21; + mxc_timer_init_dt(np); +} + +static void __init imx31_timer_init_dt(struct device_node *np) +{ + imxtm.type = GPT_TYPE_IMX31; + mxc_timer_init_dt(np); +} + +static void __init imx6dl_timer_init_dt(struct device_node *np) +{ + imxtm.type = GPT_TYPE_IMX6DL; + mxc_timer_init_dt(np); +} + +CLOCKSOURCE_OF_DECLARE(imx1_timer, "fsl,imx1-gpt", imx1_timer_init_dt); +CLOCKSOURCE_OF_DECLARE(imx21_timer, "fsl,imx21-gpt", imx21_timer_init_dt); +CLOCKSOURCE_OF_DECLARE(imx31_timer, "fsl,imx31-gpt", imx31_timer_init_dt); +CLOCKSOURCE_OF_DECLARE(imx25_timer, "fsl,imx25-gpt", imx31_timer_init_dt); +CLOCKSOURCE_OF_DECLARE(imx50_timer, "fsl,imx50-gpt", imx31_timer_init_dt); +CLOCKSOURCE_OF_DECLARE(imx51_timer, "fsl,imx51-gpt", imx31_timer_init_dt); +CLOCKSOURCE_OF_DECLARE(imx53_timer, "fsl,imx53-gpt", imx31_timer_init_dt); +CLOCKSOURCE_OF_DECLARE(imx6q_timer, "fsl,imx6q-gpt", imx31_timer_init_dt); +CLOCKSOURCE_OF_DECLARE(imx6dl_timer, "fsl,imx6dl-gpt", imx6dl_timer_init_dt); +CLOCKSOURCE_OF_DECLARE(imx6sl_timer, "fsl,imx6sl-gpt", imx6dl_timer_init_dt); +CLOCKSOURCE_OF_DECLARE(imx6sx_timer, "fsl,imx6sx-gpt", imx6dl_timer_init_dt);