public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger•com>
To: linuxppc-dev@ozlabs•org, Wolfgang Grandegger <wg@grandegger•com>
Cc: Thomas Gleixner <tglx@linutronix•de>,
	devicetree-discuss@ozlabs•org,
	David Woodhouse <dwmw2@infradead•org>,
	Sebastian Siewior <bigeasy@linutronix•de>
Subject: [PATCH 7/8] Re: [PATCH 1/2] NAND: Add support for oob size 128
Date: Tue, 31 Mar 2009 14:37:34 +0200	[thread overview]
Message-ID: <20090331124036.204185953@denx.de> (raw)
In-Reply-To: 20090331123727.853787299@denx.de

* Wolfgang Grandegger | 2009-03-25 11:48:37 [+0100]:

>Signed-off-by: Ilya Yanok <yanok@emcraft•com>
>Acked-by: Wolfgang Grandegger <wg@grandegger•com>

You seem to forgot a few bits (subpage_sft & max page size). I had this
patch in my tree like for ever and forgot post it here. I did however
merge the mtd-utils bits allready :)

From: Thomas Gleixner <tglx@linutronix•de>
Date: Wed, 12 Dec 2007 17:27:03 +0100
Subject: [PATCH 7/8] [PATCH] [MTD] Add support for 4k pages.

Signed-off-by: Thomas Gleixner <tglx@linutronix•de>
Signed-off-by: Sebastian Siewior <bigeasy@linutronix•de>
---
 drivers/mtd/nand/nand_base.c |   18 ++++++++++++++++++
 include/linux/mtd/nand.h     |    4 ++--
 2 files changed, 20 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/mtd/nand/nand_base.c
===================================================================
--- linux-2.6.orig/drivers/mtd/nand/nand_base.c	2009-03-30 12:47:55.673721571 +0200
+++ linux-2.6/drivers/mtd/nand/nand_base.c	2009-03-30 12:48:07.896719130 +0200
@@ -82,6 +82,20 @@
 		 .length = 38}}
 };
 
+static struct nand_ecclayout nand_oob_128 = {
+	.eccbytes = 48,
+	.eccpos = {
+		   80, 81, 82, 83, 84, 85, 86, 87,
+		   88, 89, 90, 91, 92, 93, 94, 95,
+		   96, 97, 98, 99, 100, 101, 102, 103,
+		   104, 105, 106, 107, 108, 109, 110, 111,
+		   112, 113, 114, 115, 116, 117, 118, 119,
+		   120, 121, 122, 123, 124, 125, 126, 127},
+	.oobfree = {
+		{.offset = 2,
+		 .length = 78}}
+};
+
 static int nand_get_device(struct nand_chip *chip, struct mtd_info *mtd,
 			   int new_state);
 
@@ -2555,6 +2569,9 @@
 		case 64:
 			chip->ecc.layout = &nand_oob_64;
 			break;
+		case 128:
+			chip->ecc.layout = &nand_oob_128;
+			break;
 		default:
 			printk(KERN_WARNING "No oob scheme defined for "
 			       "oobsize %d\n", mtd->oobsize);
@@ -2676,6 +2693,7 @@
 			break;
 		case 4:
 		case 8:
+		case 16:
 			mtd->subpage_sft = 2;
 			break;
 		}
Index: linux-2.6/include/linux/mtd/nand.h
===================================================================
--- linux-2.6.orig/include/linux/mtd/nand.h	2009-03-30 12:47:55.673721571 +0200
+++ linux-2.6/include/linux/mtd/nand.h	2009-03-30 12:48:07.910718894 +0200
@@ -43,8 +43,8 @@
  * 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

  parent reply	other threads:[~2009-03-31 12:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 12:37 [PATCH 0/8] powerpc: i2c-mpc: make I2C bus speed configurable Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 1/8] [PATCH 3/4] powerpc/85xx: Move gianfar mdio nodes under the Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 2/8] [PATCH 01/28] RTC: Add support for RX8025 chip Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 3/8] powerpc/85xx: Add support for the "socrates" board (MPC8544) Wolfgang Grandegger
2009-03-31 15:57   ` Grant Likely
2009-03-31 19:20     ` Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 4/8] powerpc: i2c-mpc: preserve I2C clocking Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 5/8] powerpc: i2c-mpc: make I2C bus speed configurable Wolfgang Grandegger
2009-03-31 15:41   ` Grant Likely
2009-04-01  7:51     ` Wolfgang Grandegger
2009-04-01 13:30       ` Grant Likely
2009-04-01 13:41         ` Wolfgang Grandegger
2009-04-01 13:55           ` Wolfgang Grandegger
2009-04-01 13:55           ` Grant Likely
2009-04-02  6:55             ` Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 6/8] --- arch/powerpc/boot/dts/socrates.dts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) Wolfgang Grandegger
2009-03-31 23:04   ` David Gibson
2009-04-01  7:31     ` Wolfgang Grandegger
2009-04-01 11:09       ` David Gibson
2009-04-01 11:59         ` Wolfgang Grandegger
2009-04-01 23:57           ` David Gibson
2009-04-01 12:30         ` Anton Vorontsov
2009-04-01 23:58           ` David Gibson
2009-03-31 12:37 ` Wolfgang Grandegger [this message]
2009-03-31 12:37 ` [PATCH 8/8] NAND: Add support for NAND on the Socrates board Wolfgang Grandegger
2009-03-31 12:49 ` [PATCH 0/8] powerpc: i2c-mpc: make I2C bus speed configurable Wolfgang Grandegger
2009-03-31 16:23   ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090331124036.204185953@denx.de \
    --to=wg@grandegger$(echo .)com \
    --cc=bigeasy@linutronix$(echo .)de \
    --cc=devicetree-discuss@ozlabs$(echo .)org \
    --cc=dwmw2@infradead$(echo .)org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=tglx@linutronix$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox