From patchwork Sun Apr 26 14:31:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 47573 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 7FCAA2121F for ; Sun, 26 Apr 2015 14:36:24 +0000 (UTC) Received: by wizk4 with SMTP id k4sf12908883wiz.2 for ; Sun, 26 Apr 2015 07:36:23 -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=GFIkTxxEbUBbtZm/xritVSUkfLvnfsnD+Tzsb/+IU3s=; b=N/AnTqqkrB4VzY5xLEfkz+i0p0CnCJH7vZi8t8WNUZrnU+8SW/Zqn1NCsDN4COYW6F HdgPzL8nc1bz6R/dqHB92ATa0mNeCmCkGUktoFCL7KSs8zKpbOk5EtCC3gH9wVp8te60 Nke8Hn/Dj3KnXm+3tPj2fUis+R4kxNg7AgrFTpHo0o8UgSJJzDSyGbl5uM9qbn+m/87r r2ReiEmnX7VARAmaoalaEmqU6S9iAQL2ZDpnrcr1DF1Zvla84V1BOIR08d4ns4AtGQcZ LfDm1F+x0o7ufM9IPtc1W7harnj4nUZ7Y497yyk/4OE1oWMKxWMvh8AYB86hsWsWuxWw ZxhA== X-Gm-Message-State: ALoCoQnSR8Zl67wnid6uhI6hNQ7aiHJg789Ng9mfaZ90Xi/QrLld650KuonFCQ60z9h7GFEJCD1i X-Received: by 10.112.26.5 with SMTP id h5mr4750204lbg.4.1430058983706; Sun, 26 Apr 2015 07:36:23 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.38 with SMTP id jt6ls735167lab.101.gmail; Sun, 26 Apr 2015 07:36:23 -0700 (PDT) X-Received: by 10.152.88.1 with SMTP id bc1mr6444906lab.79.1430058983497; Sun, 26 Apr 2015 07:36:23 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id dp7si12713949lbc.155.2015.04.26.07.36.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Apr 2015 07:36:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by labbd9 with SMTP id bd9so63772548lab.2 for ; Sun, 26 Apr 2015 07:36:23 -0700 (PDT) X-Received: by 10.152.4.137 with SMTP id k9mr6357578lak.29.1430058983203; Sun, 26 Apr 2015 07:36:23 -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.67.65 with SMTP id l1csp814266lbt; Sun, 26 Apr 2015 07:36:22 -0700 (PDT) X-Received: by 10.70.38.138 with SMTP id g10mr14059244pdk.98.1430058981408; Sun, 26 Apr 2015 07:36:21 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id au5si25824271pbc.232.2015.04.26.07.36.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Apr 2015 07:36:21 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) 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 1YmNe3-0001Sk-C6; Sun, 26 Apr 2015 14:34:55 +0000 Received: from mail-pd0-f181.google.com ([209.85.192.181]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YmNdQ-00017p-RB for linux-arm-kernel@lists.infradead.org; Sun, 26 Apr 2015 14:34:18 +0000 Received: by pdea3 with SMTP id a3so100549553pde.3 for ; Sun, 26 Apr 2015 07:33:55 -0700 (PDT) X-Received: by 10.68.68.232 with SMTP id z8mr14227382pbt.104.1430058835741; Sun, 26 Apr 2015 07:33:55 -0700 (PDT) Received: from localhost.localdomain ([104.207.83.1]) by mx.google.com with ESMTPSA id x2sm16622905pdm.40.2015.04.26.07.33.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Apr 2015 07:33:55 -0700 (PDT) From: Shawn Guo To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 02/11] ARM: imx: use dynamic mapping for CCM Date: Sun, 26 Apr 2015 22:31:03 +0800 Message-Id: <1430058672-9267-3-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430058672-9267-1-git-send-email-shawn.guo@linaro.org> References: <1430058672-9267-1-git-send-email-shawn.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150426_073416_975298_FE5D31FF X-CRM114-Status: GOOD ( 11.57 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.192.181 listed in list.dnswl.org] -0.2 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.192.181 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record Cc: Frank Li , Stephen Boyd , Russell King , kernel@pengutronix.de, Mike Turquette , Shawn Guo 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: shawn.guo@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.48 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 Replace the static mapping of CCM block in clock drivers with dynamic mapping. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/clk-imx1.c | 3 ++- arch/arm/mach-imx/clk-imx31.c | 5 ++++- arch/arm/mach-imx/clk-imx35.c | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c index f4a76e841966..5301d2ebb234 100644 --- a/arch/arm/mach-imx/clk-imx1.c +++ b/arch/arm/mach-imx/clk-imx1.c @@ -75,7 +75,8 @@ static void __init _mx1_clocks_init(unsigned long fref) int __init mx1_clocks_init(unsigned long fref) { - ccm = MX1_IO_ADDRESS(MX1_CCM_BASE_ADDR); + ccm = ioremap(MX1_CCM_BASE_ADDR, SZ_4K); + BUG_ON(!ccm); _mx1_clocks_init(fref); diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c index 8a103a2c8b68..2aaccadb9e13 100644 --- a/arch/arm/mach-imx/clk-imx31.c +++ b/arch/arm/mach-imx/clk-imx31.c @@ -50,9 +50,12 @@ static struct clk_onecell_data clk_data; int __init mx31_clocks_init(unsigned long fref) { - void __iomem *base = MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR); + void __iomem *base; struct device_node *np; + base = ioremap(MX31_CCM_BASE_ADDR, SZ_4K); + BUG_ON(!base); + clk[dummy] = imx_clk_fixed("dummy", 0); clk[ckih] = imx_clk_fixed("ckih", fref); clk[ckil] = imx_clk_fixed("ckil", 32768); diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c index 4ef1e8bdac5b..14f33ec049bc 100644 --- a/arch/arm/mach-imx/clk-imx35.c +++ b/arch/arm/mach-imx/clk-imx35.c @@ -71,11 +71,14 @@ static struct clk *clk[clk_max]; int __init mx35_clocks_init(void) { - void __iomem *base = MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR); + void __iomem *base; u32 pdr0, consumer_sel, hsp_sel; struct arm_ahb_div *aad; unsigned char *hsp_div; + base = ioremap(MX35_CCM_BASE_ADDR, SZ_4K); + BUG_ON(base); + pdr0 = __raw_readl(base + MXC_CCM_PDR0); consumer_sel = (pdr0 >> 16) & 0xf; aad = &clk_consumer[consumer_sel];