From patchwork Sat Sep 15 19:15:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 184096 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 442592C0085 for ; Sun, 16 Sep 2012 05:19:17 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TCxq3-0001ml-8E; Sat, 15 Sep 2012 19:15:35 +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 1TCxpz-0001mX-9B for linux-arm-kernel@lists.infradead.org; Sat, 15 Sep 2012 19:15:32 +0000 Received: by yhjj52 with SMTP id j52so1321313yhj.36 for ; Sat, 15 Sep 2012 12:15:26 -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=BjeJ11wnMRkUb3du1HcjDK0a93FBMh7BUpacIV4yK1M=; b=03CnaZGRptXlggtMdJ1L2tUBFaPmopQ4jp5tVUBaE9i2dhVhD5sLEH4//A/q1xZC1P QB2KOWP8w1/00XAuYd+k0uHSvDdPHGEn+G9nL8aNbv22lF50vDgNA6EFKCFZak/8A7hn BnoB0Kis6R/YoIbAbJM+Hk5M8D6i7YF7eCHXSsbERSYNPHOrGr2lm0cvbKyIot8imnxK +yYDV4QK+lw/GRxaQaWuq8bO35PZylsaE1B6GhNnl8lYGPsAYV7UUL5Is9O/RFB7ITwV wswu6LSZI2lvm9uOqOLZkbTl/4ANvKzNZlxtwYNTdYWpDwVPurBNfHi4RuB0iB9erXS7 jaWQ== Received: by 10.236.91.48 with SMTP id g36mr8072662yhf.53.1347736526728; Sat, 15 Sep 2012 12:15:26 -0700 (PDT) Received: from localhost.localdomain ([189.101.148.2]) by mx.google.com with ESMTPS id q47sm1982438yhj.13.2012.09.15.12.15.23 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 15 Sep 2012 12:15:24 -0700 (PDT) From: Fabio Estevam To: kernel@pengutronix.de Subject: [PATCH] ARM: imx: armadillo5x0: Fix illegal register access Date: Sat, 15 Sep 2012 16:15:16 -0300 Message-Id: <1347736516-10697-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 commit 0c8bad6a(Armadillo 500 add NAND flash device support (resend).) introduced an incorrect access to MXC_CCM_RCSR. MXC_CCM_RCSR is an offset and in order to properly access this register, the mx3_ccm_base needs to be passed, otherwise an illegal access is done. Reported-by: Arnd Bergmann Signed-off-by: Fabio Estevam --- 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..d22e8cc 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), MXC_CCM_RCSR); /* RTC */ /* Get RTC IRQ and register the chip */