summaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/mtd-abi.h
diff options
context:
space:
mode:
authorEric Bénard <eric@eukrea.com>2012-07-05 12:22:46 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-07-05 20:58:54 +0200
commit4b23222c4d68bf40ad89c99bf5e7fcbaa235bffb (patch)
treedca683032731510c0e9591de384e200efeee4e33 /include/linux/mtd/mtd-abi.h
parent7baead578db7e47aedfcd3a5a21a69b9f37630d1 (diff)
downloadbarebox-4b23222c4d68bf40ad89c99bf5e7fcbaa235bffb.tar.gz
barebox-4b23222c4d68bf40ad89c99bf5e7fcbaa235bffb.tar.xz
nand_base: add ONFI flash detection
the code is taken from linux & u-boot implementations Validated on an i.MX53 which gives the following log : ONFI flash detected ... ONFI param page 0 valid NAND device: Manufacturer ID: 0x2c, Chip ID: 0x38 (Micron MT29F8G08ABABAWP), page size: 4096, OOB size: 224 Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux/mtd/mtd-abi.h')
-rw-r--r--include/linux/mtd/mtd-abi.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/mtd/mtd-abi.h b/include/linux/mtd/mtd-abi.h
index 33e1fe2805..90dee7eb02 100644
--- a/include/linux/mtd/mtd-abi.h
+++ b/include/linux/mtd/mtd-abi.h
@@ -115,16 +115,17 @@ struct nand_oobfree {
uint32_t length;
};
-#define MTD_MAX_OOBFREE_ENTRIES 8
+#define MTD_MAX_OOBFREE_ENTRIES_LARGE 32
+#define MTD_MAX_ECCPOS_ENTRIES_LARGE 128 /* FIXME : understand why 448 is not working */
/*
* ECC layout control structure. Exported to userspace for
* diagnosis and to allow creation of raw images
*/
struct nand_ecclayout {
uint32_t eccbytes;
- uint32_t eccpos[64];
+ uint32_t eccpos[MTD_MAX_ECCPOS_ENTRIES_LARGE];
uint32_t oobavail;
- struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
+ struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES_LARGE];
};
/**