X-Account-Key: account2
X-Mozilla-Keys: 
Received: from mx05.mfg.onr.siteprotect.com (unknown [192.168.33.227])
	by mf30.mfg.onr.chicago.hostway (Postfix) with ESMTP id B985FEA04A4
	for <troy.kisky@boundarydevices.com>; Wed, 13 May 2009 22:00:17 -0500 (CDT)
Received: from mpls-qmqp-03.inet.qwest.net (mpls-qmqp-03.inet.qwest.net [63.231.195.114])
	by mx05.mfg.onr.siteprotect.com (Postfix) with ESMTP id 9C3D055C07F
	for <troy.kisky@boundarydevices.com>; Wed, 13 May 2009 22:00:17 -0500 (CDT)
Received: from localhost (unknown [67.42.45.38])
	by mpls-qmqp-03.inet.qwest.net (Postfix) with ESMTP id 14C72621C6C;
	Thu, 14 May 2009 03:00:15 +0000 (UTC)
Received: by localhost (Postfix, from userid 1002)
	id 9EF43588191; Wed, 13 May 2009 20:00:09 -0700 (MST)
From: Troy Kisky <troy.kisky@boundarydevices.com>
To: linux-mtd@lists.infradead.org
Cc: david-b@pacbell.net, Troy Kisky <troy.kisky@boundarydevices.com>
Subject: [PATCH 4/5] mtd: nand: cafe_nand: use default ecc layout
Date: Wed, 13 May 2009 20:00:07 -0700
Message-Id: <1242270008-1552-4-git-send-email-troy.kisky@boundarydevices.com>
X-Mailer: git-send-email 1.5.4.3
In-Reply-To: <1242270008-1552-3-git-send-email-troy.kisky@boundarydevices.com>
References: <>
 <1242270008-1552-1-git-send-email-troy.kisky@boundarydevices.com>
 <1242270008-1552-2-git-send-email-troy.kisky@boundarydevices.com>
 <1242270008-1552-3-git-send-email-troy.kisky@boundarydevices.com>
Mail-Filter-Gateway: Found to be Virus Free
X-Mail-Filter-Gateway-SpamDetectionEngine: NOT SPAM,
	MailFilterGateway Engine (Not Cached, Score=-1, Score Required 3,
	autolearn=disabled, CTASD_SPAM_UNKNOWN -1.00)
X-Mail-Filter-Gateway-From: tkisky@boundarydevices.com
X-Mail-Filter-Gateway-To: troy.kisky@boundarydevices.com
X-Spam-Status: No

The bad block marker is at 14, but oobfree also
starts at 14. This doesn't make sense to me,
so I don't know if this patch is good or not.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 drivers/mtd/nand/cafe_nand.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c
index c6c7f51..6048bd9 100644
--- a/drivers/mtd/nand/cafe_nand.c
+++ b/drivers/mtd/nand/cafe_nand.c
@@ -456,12 +456,6 @@ static int cafe_nand_read_page(struct mtd_info *mtd, struct nand_chip *chip,
 	return 0;
 }
 
-static const struct nand_ecclayout cafe_oobinfo_2048 __devinitdata = {
-	.eccbytes = 14,
-	.eccpos = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13},
-	.oobfree = {{14, 50}}
-};
-
 /* Ick. The BBT code really ought to be able to work this bit out
    for itself from the above, at least for the 2KiB case */
 static uint8_t cafe_bbt_pattern_2048[] = { 'B', 'b', 't', '0' };
@@ -491,12 +485,6 @@ static struct nand_bbt_descr cafe_bbt_mirror_descr_2048 = {
 	.pattern = cafe_mirror_pattern_2048
 };
 
-static const struct nand_ecclayout cafe_oobinfo_512 __devinitdata = {
-	.eccbytes = 14,
-	.eccpos = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13},
-	.oobfree = {{14, 2}}
-};
-
 static struct nand_bbt_descr cafe_bbt_main_descr_512 = {
 	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
 		| NAND_BBT_2BIT | NAND_BBT_VERSION,
@@ -772,13 +760,9 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
 
 	/* Set up ECC according to the type of chip we found */
 	if (mtd->writesize == 2048) {
-		memcpy(&cafe->nand.ecc.layout, &cafe_oobinfo_2048,
-				sizeof(cafe->nand.ecc.layout));
 		cafe->nand.bbt_td = &cafe_bbt_main_descr_2048;
 		cafe->nand.bbt_md = &cafe_bbt_mirror_descr_2048;
 	} else if (mtd->writesize == 512) {
-		memcpy(&cafe->nand.ecc.layout, &cafe_oobinfo_512,
-				sizeof(cafe->nand.ecc.layout));
 		cafe->nand.bbt_td = &cafe_bbt_main_descr_512;
 		cafe->nand.bbt_md = &cafe_bbt_mirror_descr_512;
 	} else {
-- 
1.5.4.3


