From patchwork Fri Mar 2 10:45:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 144215 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 224831007D3 for ; Fri, 2 Mar 2012 21:49:05 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1S3Q0A-0007Se-7v; Fri, 02 Mar 2012 10:46:18 +0000 Received: from mail-gx0-f177.google.com ([209.85.161.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1S3Q05-0007SD-S6 for linux-arm-kernel@lists.infradead.org; Fri, 02 Mar 2012 10:46:15 +0000 Received: by ggnk1 with SMTP id k1so561566ggn.36 for ; Fri, 02 Mar 2012 02:46:12 -0800 (PST) Received-SPF: pass (google.com: domain of festevam@gmail.com designates 10.236.173.195 as permitted sender) client-ip=10.236.173.195; Authentication-Results: mr.google.com; spf=pass (google.com: domain of festevam@gmail.com designates 10.236.173.195 as permitted sender) smtp.mail=festevam@gmail.com; dkim=pass header.i=festevam@gmail.com Received: from mr.google.com ([10.236.173.195]) by 10.236.173.195 with SMTP id v43mr12905875yhl.40.1330685172038 (num_hops = 1); Fri, 02 Mar 2012 02:46:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=qlkNIrvgQiI18vpgvt+ALb7nlvwoysyNqzguiIO832g=; b=A9UKTPODro5weQXaO6Wp2Q5Dnkn59ubtvBxGu8zwIJUzwc0JoiKqQ60f0/3xPlnU0N tBI+58csnH5vmKb9qL4cxqZt9srmEbiUdzL40hetpcyqxB/IjihT6lYnUYOgzMbybLVI aUFqAGmcf4X4QEau7QdJj1KejXAmvOM8db+z5VDPwhLXnLIcJpdw/0qmFVACwdSUYJL0 sA6WrSJEvRr6kPE4ggIdhM5qfvuXe5xEF0PZqmQKL2m6pKJZ2OAjiZw0mjBOMa+/CemY lXWjJUrFOBwbP3ipEUCb3fIDl0aGdj3H4L0ctAZHEwBiZe8vA4DFll+J6J0JFrSSEKuF hrug== Received: by 10.236.173.195 with SMTP id v43mr10194598yhl.40.1330685171980; Fri, 02 Mar 2012 02:46:11 -0800 (PST) Received: from localhost.localdomain ([201.82.161.72]) by mx.google.com with ESMTPS id s10sm8129999anl.17.2012.03.02.02.46.08 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 02 Mar 2012 02:46:10 -0800 (PST) From: Fabio Estevam To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] ARM: mx5: Use common function for configuring AIPS Date: Fri, 2 Mar 2012 07:45:58 -0300 Message-Id: <1330685159-4137-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.1 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.161.177 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Fabio Estevam , Fabio Estevam , kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Now that a common imx_set_aips() function is available, use it on mx51 and mx53. This lets the code smaller and cleaner. Signed-off-by: Fabio Estevam --- arch/arm/mach-imx/cpu-imx5.c | 36 ------------------------------------ arch/arm/mach-imx/mm-imx5.c | 8 ++++++++ 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c index 5e2e7a8..aa15c51 100644 --- a/arch/arm/mach-imx/cpu-imx5.c +++ b/arch/arm/mach-imx/cpu-imx5.c @@ -149,39 +149,3 @@ int mx50_revision(void) return mx5_cpu_rev; } EXPORT_SYMBOL(mx50_revision); - -static int __init post_cpu_init(void) -{ - unsigned int reg; - void __iomem *base; - - if (cpu_is_mx51() || cpu_is_mx53()) { - if (cpu_is_mx51()) - base = MX51_IO_ADDRESS(MX51_AIPS1_BASE_ADDR); - else - base = MX53_IO_ADDRESS(MX53_AIPS1_BASE_ADDR); - - __raw_writel(0x0, base + 0x40); - __raw_writel(0x0, base + 0x44); - __raw_writel(0x0, base + 0x48); - __raw_writel(0x0, base + 0x4C); - reg = __raw_readl(base + 0x50) & 0x00FFFFFF; - __raw_writel(reg, base + 0x50); - - if (cpu_is_mx51()) - base = MX51_IO_ADDRESS(MX51_AIPS2_BASE_ADDR); - else - base = MX53_IO_ADDRESS(MX53_AIPS2_BASE_ADDR); - - __raw_writel(0x0, base + 0x40); - __raw_writel(0x0, base + 0x44); - __raw_writel(0x0, base + 0x48); - __raw_writel(0x0, base + 0x4C); - reg = __raw_readl(base + 0x50) & 0x00FFFFFF; - __raw_writel(reg, base + 0x50); - } - - return 0; -} - -postcore_initcall(post_cpu_init); diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c index 49549a7..8543ffb 100644 --- a/arch/arm/mach-imx/mm-imx5.c +++ b/arch/arm/mach-imx/mm-imx5.c @@ -185,6 +185,10 @@ void __init imx51_soc_init(void) /* i.mx51 has the i.mx35 type sdma */ imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata); + + /* Setup AIPS registers */ + imx_set_aips(MX51_IO_ADDRESS(MX51_AIPS1_BASE_ADDR)); + imx_set_aips(MX51_IO_ADDRESS(MX51_AIPS2_BASE_ADDR)); } void __init imx53_soc_init(void) @@ -200,4 +204,8 @@ void __init imx53_soc_init(void) /* i.mx53 has the i.mx35 type sdma */ imx_add_imx_sdma("imx35-sdma", MX53_SDMA_BASE_ADDR, MX53_INT_SDMA, &imx53_sdma_pdata); + + /* Setup AIPS registers */ + imx_set_aips(MX53_IO_ADDRESS(MX53_AIPS1_BASE_ADDR)); + imx_set_aips(MX53_IO_ADDRESS(MX53_AIPS2_BASE_ADDR)); }