mtd: mxc_nand: preset_v1_v2: unlock all NAND flash blocks

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Nov 7 11:59:36 EST 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=5172ac1c6d2c1e631bc39ddf2d9334e05f69b022
Commit:     5172ac1c6d2c1e631bc39ddf2d9334e05f69b022
Parent:     75b66d8ccd5772b00a7328c2cf75bc506ec532a1
Author:     Wolfram Stering <wolfram.stering at hale.at>
AuthorDate: Fri Sep 23 13:53:44 2011 +0200
Committer:  Artem Bityutskiy <artem.bityutskiy at intel.com>
CommitDate: Fri Sep 23 15:25:35 2011 +0300

    mtd: mxc_nand: preset_v1_v2: unlock all NAND flash blocks
    
    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 <michael.thalmeier at hale.at>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at intel.com>
---
 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 4d4c677..74a43b8 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -845,7 +845,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();
 



More information about the linux-mtd-cvs mailing list