From patchwork Fri Sep 23 11:53:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Thalmeier X-Patchwork-Id: 116047 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@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 2E0A6B6F8F for ; Fri, 23 Sep 2011 21:54:24 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1R74KT-0006AI-FH; Fri, 23 Sep 2011 11:54:05 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1R74KT-00062i-1U; Fri, 23 Sep 2011 11:54:05 +0000 Received: from mx09.lb01.inode.at ([62.99.145.9] helo=mx.inode.at) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1R74KP-00062N-KR for linux-mtd@lists.infradead.org; Fri, 23 Sep 2011 11:54:02 +0000 Received: from [83.64.51.210] (port=8306 helo=gateway1.hale) by smartmx-09.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1R74KJ-0005Yr-3F; Fri, 23 Sep 2011 13:53:55 +0200 Received: from mail1.hale.at (mail2.hale [192.168.100.12]) by gateway1.hale (8.13.8/8.13.7) with ESMTP id p8NBroZl005055; Fri, 23 Sep 2011 13:53:50 +0200 Received: from entw49.HALE ([192.168.100.117]) by hale.at with MailEnable ESMTP; Fri, 23 Sep 2011 13:53:44 +0200 From: Michael Thalmeier To: David Woodhouse Subject: [PATCH] mxc_nand: preset_v1_v2: unlock all NAND flash blocks Date: Fri, 23 Sep 2011 13:53:44 +0200 Message-Id: <1316778824-12518-1-git-send-email-michael.thalmeier@hale.at> X-Mailer: git-send-email 1.7.6.2 MIME-Version: 1.0 X-HALE-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: p8NBroZl005055 X-HALE-MailScanner: Found to be clean X-HALE-MailScanner-From: michael.thalmeier@hale.at MailScanner-NULL-Check: 1317383631.54472@KxNHLD3yMKWLP5M7Kx0ctw X-Spam-Status: No X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110923_075401_811660_2BCB24C5 X-CRM114-Status: UNSURE ( 9.30 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [62.99.145.9 listed in list.dnswl.org] Cc: Sascha Hauer , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Wolfram Stering For NFC v1, the unlock end block address was 0x4000, which would only unlock the first 32 blocks of the NAND flash. Change that value to 0xffff to unlock all available blocks, as is done for NFC v21 as well. Signed-off-by: Michael Thalmeier --- drivers/mtd/nand/mxc_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 90df34c..5b40786 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -849,7 +849,7 @@ static void preset_v1_v2(struct mtd_info *mtd) writew(0xffff, NFC_V21_UNLOCKEND_BLKADDR3); } else if (nfc_is_v1()) { writew(0x0, NFC_V1_UNLOCKSTART_BLKADDR); - writew(0x4000, NFC_V1_UNLOCKEND_BLKADDR); + writew(0xffff, NFC_V1_UNLOCKEND_BLKADDR); } else BUG();