summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/nand_base.c
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-08-22 16:16:26 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-08-22 16:16:26 +0200
commit2a1325206da5381292c2b268e248702c523cc927 (patch)
tree45d684a865eab51b0711d07782b1d8e8ae9d9932 /drivers/mtd/nand/nand_base.c
parent2f2f858faddd3cce54f7c64bc8fc8b596c1ddfaf (diff)
Initial Toradex Colibri T20 L4T R15 support.T20_LinuxImageV2.0Alpha1_20120808
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r--drivers/mtd/nand/nand_base.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 52f8575aac..fd94206ea9 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -11,6 +11,7 @@
*
* Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com)
* 2002-2006 Thomas Gleixner (tglx@linutronix.de)
+ * 2012 Toradex, Inc.
*
* Credits:
* David Woodhouse for adding multichip support
@@ -2612,6 +2613,12 @@ static const struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
if (!ret)
nand_flash_detect_non_onfi(mtd, chip, type, &busw);
+ /* Work around wrong block size identified for our device
+ Note: ONFI would really be the way to go but does not seem to be
+ supported in U-Boot as of yet. */
+ if ((*maf_id == 0x2C) && (*dev_id == 0x38))
+ mtd->erasesize <<= 1;
+
/* Get chip options, preserve non chip based options */
chip->options &= ~NAND_CHIPOPTIONS_MSK;
chip->options |= type->options & NAND_CHIPOPTIONS_MSK;