From: Sneha Narnakaje <[email protected]>

This patch adds support for NAND devices with 4K page size and 128bytes of OOB. 
In the patch, the macros for max page and oob sizes are updated. The 
nand_ecclayout data structure is also updated accordingly. Note that The same 
macros will have to be modified if the support has to be extended up to 8K page 
size.

Signed-off-by: Sandeep Paulraj <[email protected]>
Signed-off-by: Sneha Narnakaje <[email protected]>
---
 include/linux/mtd/nand.h |    4 ++--
 include/mtd/mtd-abi.h    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 27fb694..b2bed22 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -43,8 +43,8 @@ extern void nand_wait_ready(struct mtd_info *mtd);
  * is supported now. If you add a chip with bigger oobsize/page
  * adjust this accordingly.
  */
-#define NAND_MAX_OOBSIZE       64
-#define NAND_MAX_PAGESIZE      2048
+#define NAND_MAX_OOBSIZE       128
+#define NAND_MAX_PAGESIZE      4096
 
 /*
  * Constants for hardware specific CLE/ALE/NCE function
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index c6c61cd..85d1214 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -110,14 +110,14 @@ struct nand_oobfree {
        uint32_t length;
 };
 
-#define MTD_MAX_OOBFREE_ENTRIES        8
+#define MTD_MAX_OOBFREE_ENTRIES        16
 /*
  * 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[128];
        uint32_t oobavail;
        struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
 };
-- 
1.6.0.4

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to