From patchwork Mon Sep 17 01:28:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 184269 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (unknown [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 80B292C007F for ; Mon, 17 Sep 2012 11:32:31 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TDQ8t-0005s7-F6; Mon, 17 Sep 2012 01:28:55 +0000 Received: from mail-yw0-f49.google.com ([209.85.213.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TDQ8p-0005rt-No for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2012 01:28:52 +0000 Received: by yhjj52 with SMTP id j52so1469470yhj.36 for ; Sun, 16 Sep 2012 18:28:48 -0700 (PDT) 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=vsGEiUGBbeSDLq4fjhOhkYp2M1ca4kNKwSarqfBgFIQ=; b=Crml+ay9lHkSy+Bt9ehoFW2RagxcBfvT2BrIIempaK26YZyyQsInKTwMIC4HVX3sV8 ccrl8Egj6wpqHWm/jRXi0G0YHHSH4jCqD3EEzYr/wowRpzwTsaI4Nzmnrd2jb/fkPMio 4rzIH+sOSvIwio+XoX5LL6jICIerpvjVOKGLs7a1dA+s7DcCOvyGmzY3/4xQxkJ21HaX wMZvPGaB8emh0PF7Kf5gerr96k5aw2bLddESVx4RI6cF6iZdceKONxj2rBQvYL7p1VY+ W89hKb2KAyCC5x3pxPjaY0xeKHmRmDY1zc9ocDxljX38Nv3ZGZdeteP74gG/6rRONqta tl0g== Received: by 10.236.183.168 with SMTP id q28mr9962684yhm.45.1347845328524; Sun, 16 Sep 2012 18:28:48 -0700 (PDT) Received: from localhost.localdomain ([189.101.148.2]) by mx.google.com with ESMTPS id i3sm7983695anl.0.2012.09.16.18.28.46 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 16 Sep 2012 18:28:47 -0700 (PDT) From: Fabio Estevam To: kernel@pengutronix.de Subject: [PATCH v3] ARM: imx: armadillo5x0: Fix illegal register access Date: Sun, 16 Sep 2012 22:28:35 -0300 Message-Id: <1347845315-16565-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.9.5 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.213.49 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 , arnd@arndb.de, linux-arm-kernel@lists.infradead.org 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 From: Fabio Estevam Since commit eb92044eb (ARM i.MX3: Make ccm base address a variable ) it is necessary to pass the CCM register base as a variable. Fix the CCM register access in mach-armadillo5x0 by passing mx3_ccm_base and avoid illegal accesses. Reported-by: Arnd Bergmann Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann --- Changes since v2: - Indicate the correct commit that caused the issue Changes since v1: - Also fixes the write part. arch/arm/mach-imx/mach-armadillo5x0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index 2c6ab32..9f39f7e 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c @@ -526,7 +526,8 @@ static void __init armadillo5x0_init(void) imx31_add_mxc_nand(&armadillo5x0_nand_board_info); /* set NAND page size to 2k if not configured via boot mode pins */ - __raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR); + __raw_writel(__raw_readl(mx3_ccm_base + MXC_CCM_RCSR) | + (1 << 30), mx3_ccm_base + MXC_CCM_RCSR); /* RTC */ /* Get RTC IRQ and register the chip */