mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd/nand: increase page and oob size limits
@ 2011-03-17 13:23 Baruch Siach
  2011-03-17 13:23 ` [PATCH 2/2] mtd/nand_imx: add support for page size of 4k Baruch Siach
  0 siblings, 1 reply; 2+ messages in thread
From: Baruch Siach @ 2011-03-17 13:23 UTC (permalink / raw)
  To: barebox

Sync these limits with the Linux kernel. This allows support for NAND devices
with page size of 4k.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 include/linux/mtd/nand.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index cb35fd2..0fe66e4 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -45,8 +45,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	576
+#define NAND_MAX_PAGESIZE	8192
 
 /*
  * Constants for hardware specific CLE/ALE/NCE function
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] mtd/nand_imx: add support for page size of 4k
  2011-03-17 13:23 [PATCH 1/2] mtd/nand: increase page and oob size limits Baruch Siach
@ 2011-03-17 13:23 ` Baruch Siach
  0 siblings, 0 replies; 2+ messages in thread
From: Baruch Siach @ 2011-03-17 13:23 UTC (permalink / raw)
  To: barebox

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/mtd/nand/nand_imx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/nand_imx.c b/drivers/mtd/nand/nand_imx.c
index 48841dc..aff636a 100644
--- a/drivers/mtd/nand/nand_imx.c
+++ b/drivers/mtd/nand/nand_imx.c
@@ -1013,7 +1013,7 @@ static int __init imxnd_probe(struct device_d *dev)
 
 	imx_nand_set_layout(mtd->writesize, pdata->width == 2 ? 16 : 8);
 
-	if (mtd->writesize == 2048) {
+	if (mtd->writesize >= 2048) {
 		this->ecc.layout = oob_largepage;
 		host->pagesize_2k = 1;
 		if (nfc_is_v21()) {
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-17 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-17 13:23 [PATCH 1/2] mtd/nand: increase page and oob size limits Baruch Siach
2011-03-17 13:23 ` [PATCH 2/2] mtd/nand_imx: add support for page size of 4k Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox