From patchwork Sun Apr 26 14:31:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 47576 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8B8972121F for ; Sun, 26 Apr 2015 14:37:27 +0000 (UTC) Received: by wghm4 with SMTP id m4sf20455801wgh.2 for ; Sun, 26 Apr 2015 07:37:26 -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=n2r4TzwwBRIdjLYDqYFa/YXTotENZ4LmCzfPe8Avl38=; b=dSRclmYcjXYHhXWvjbx5xI7JQjdXXee/CMrBm4lhODmgQrApPD9sgyTDkXvB/GNObf QU+QdTN2mloXcbtogfq4aosZ9He8milqRbwHrOgtkwzs1pwFRsYUDsmBJP5ELqiPRvj9 Jp0NZrileWPtaOC4DrdYVVvkNfY/bBCB1RFMGijmL2hdo92T2qzKwJJudM2qKDVoHYvP PN9gJ9HXDIeFY+FkUkHwRiGzI2mmAhRzKIlaYP33xkVVZMhmL1tvBFc4ROxOPM93hU93 6WYe1hCTKOiDyEXDDcdigFjZwZwJlfbfjTQVxnVT8CDCE+z2NYq2KyNT6d01qTU61lb6 Cuzw== X-Gm-Message-State: ALoCoQnwTQbWpml8wWb20s25DyiQqb5lH5Zb+0D581kXa+PBEU67Bi8yFBQYXWvyDahP41iC0EFC X-Received: by 10.194.249.1 with SMTP id yq1mr4739951wjc.2.1430059046920; Sun, 26 Apr 2015 07:37:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.104 with SMTP id j8ls555803laj.106.gmail; Sun, 26 Apr 2015 07:37:26 -0700 (PDT) X-Received: by 10.112.180.201 with SMTP id dq9mr6556918lbc.78.1430059046566; Sun, 26 Apr 2015 07:37:26 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id ot8si12714162lbb.177.2015.04.26.07.37.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Apr 2015 07:37:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by lagv1 with SMTP id v1so63802327lag.3 for ; Sun, 26 Apr 2015 07:37:26 -0700 (PDT) X-Received: by 10.112.184.70 with SMTP id es6mr6305298lbc.117.1430059046476; Sun, 26 Apr 2015 07:37:26 -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 l1csp814631lbt; Sun, 26 Apr 2015 07:37:25 -0700 (PDT) X-Received: by 10.66.139.109 with SMTP id qx13mr14048269pab.110.1430059044721; Sun, 26 Apr 2015 07:37:24 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id bx10si25919506pdb.154.2015.04.26.07.37.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Apr 2015 07:37:24 -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 1YmNej-0002sd-Hq; Sun, 26 Apr 2015 14:35:37 +0000 Received: from mail-pd0-f173.google.com ([209.85.192.173]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YmNdY-00019r-Kt for linux-arm-kernel@lists.infradead.org; Sun, 26 Apr 2015 14:34:25 +0000 Received: by pdea3 with SMTP id a3so100551391pde.3 for ; Sun, 26 Apr 2015 07:34:03 -0700 (PDT) X-Received: by 10.68.206.8 with SMTP id lk8mr14191092pbc.13.1430058843637; Sun, 26 Apr 2015 07:34:03 -0700 (PDT) Received: from localhost.localdomain ([104.207.83.1]) by mx.google.com with ESMTPSA id x2sm16622905pdm.40.2015.04.26.07.34.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Apr 2015 07:34:03 -0700 (PDT) From: Shawn Guo To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/11] ARM: imx5: let pm code map CCM block on its own Date: Sun, 26 Apr 2015 22:31:05 +0800 Message-Id: <1430058672-9267-5-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_073424_766167_1F49AA3E X-CRM114-Status: GOOD ( 12.67 ) 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.173 listed in list.dnswl.org] -0.2 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.192.173 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.41 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 We are about to move imx5 clock driver into drivers/clk, so let's get imx5 pm code map CCM block on its own rather than relying on clock driver to do the mapping. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/clk-imx51-imx53.c | 2 -- arch/arm/mach-imx/common.h | 2 -- arch/arm/mach-imx/pm-imx5.c | 9 ++++----- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index 0f7e536147cb..f341464fe7e9 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c @@ -133,8 +133,6 @@ static struct clk_onecell_data clk_data; static void __init mx5_clocks_common_init(void __iomem *ccm_base) { - imx5_pm_set_ccm_base(ccm_base); - clk[IMX5_CLK_DUMMY] = imx_clk_fixed("dummy", 0); clk[IMX5_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0); clk[IMX5_CLK_OSC] = imx_obtain_fixed_clock("osc", 0); diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 3682d094a259..fe510fbd0c8c 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -132,11 +132,9 @@ void imx6q_pm_set_ccm_base(void __iomem *base); #ifdef CONFIG_PM void imx51_pm_init(void); void imx53_pm_init(void); -void imx5_pm_set_ccm_base(void __iomem *base); #else static inline void imx51_pm_init(void) {} static inline void imx53_pm_init(void) {} -static inline void imx5_pm_set_ccm_base(void __iomem *base) {} #endif #ifdef CONFIG_NEON diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c index f1f80ab73e69..b04025592d94 100644 --- a/arch/arm/mach-imx/pm-imx5.c +++ b/arch/arm/mach-imx/pm-imx5.c @@ -50,16 +50,19 @@ #define IMX5_DEFAULT_CPU_IDLE_STATE WAIT_UNCLOCKED_POWER_OFF struct imx5_pm_data { + phys_addr_t ccm_addr; phys_addr_t cortex_addr; phys_addr_t gpc_addr; }; static const struct imx5_pm_data imx51_pm_data __initconst = { + .ccm_addr = 0x73fd4000, .cortex_addr = 0x83fa0000, .gpc_addr = 0x73fd8000, }; static const struct imx5_pm_data imx53_pm_data __initconst = { + .ccm_addr = 0x53fd4000, .cortex_addr = 0x63fa0000, .gpc_addr = 0x53fd8000, }; @@ -68,11 +71,6 @@ static void __iomem *ccm_base; static void __iomem *cortex_base; static void __iomem *gpc_base; -void __init imx5_pm_set_ccm_base(void __iomem *base) -{ - ccm_base = base; -} - /* * set cpu low power mode before WFI instruction. This function is called * mx5 because it can be used for mx51, and mx53. @@ -208,6 +206,7 @@ static int __init imx5_pm_common_init(const struct imx5_pm_data *data) arm_pm_idle = imx5_pm_idle; + ccm_base = ioremap(data->ccm_addr, SZ_16K); cortex_base = ioremap(data->cortex_addr, SZ_16K); gpc_base = ioremap(data->gpc_addr, SZ_16K); WARN_ON(!ccm_base || !cortex_base || !gpc_base);