]> git.sur5r.net Git - u-boot/commitdiff
delta, zylonite: Update nand_oobinfo to nand_ecclayout.
authorScott Wood <scottwood@freescale.com>
Wed, 10 Sep 2008 16:48:49 +0000 (11:48 -0500)
committerScott Wood <scottwood@freescale.com>
Wed, 10 Sep 2008 16:48:49 +0000 (11:48 -0500)
This is part of the switch to newer upstream MTD code.

Signed-off-by: Scott Wood <scottwood@freescale.com>
board/delta/nand.c
board/zylonite/nand.c

index 4ce78a1e1da8ce8dc4e4e1dfe7d7586366d72303..ceb798bd2d3321db6c3ee95b56862b739c692e97 100644 (file)
@@ -58,14 +58,12 @@ static struct nand_bbt_descr delta_bbt_descr = {
        .pattern = scan_ff_pattern
 };
 
-static struct nand_oobinfo delta_oob = {
-       .useecc = MTD_NANDECC_AUTOPL_USR, /* MTD_NANDECC_PLACEONLY, */
+static struct nand_ecclayout delta_oob = {
        .eccbytes = 6,
        .eccpos = {2, 3, 4, 5, 6, 7},
        .oobfree = { {8, 2}, {12, 4} }
 };
 
-
 /*
  * not required for Monahans DFC
  */
@@ -541,6 +539,7 @@ int board_nand_init(struct nand_chip *nand)
        nand->cmd_ctrl = dfc_hwcontrol;
 /*     nand->dev_ready = dfc_device_ready; */
        nand->ecc.mode = NAND_ECC_SOFT;
+       nand->ecc.layout = &delta_oob;
        nand->options = NAND_BUSWIDTH_16;
        nand->waitfunc = dfc_wait;
        nand->read_byte = dfc_read_byte;
@@ -549,7 +548,6 @@ int board_nand_init(struct nand_chip *nand)
        nand->write_buf = dfc_write_buf;
 
        nand->cmdfunc = dfc_cmdfunc;
-/*     nand->autooob = &delta_oob; */
        nand->badblock_pattern = &delta_bbt_descr;
        return 0;
 }
index 09bcbb233d2bde6289b5c781def86eb14af9fe53..7f2293523029f508099b78f3850dcaff5cc83873 100644 (file)
@@ -58,14 +58,12 @@ static struct nand_bbt_descr delta_bbt_descr = {
        .pattern = scan_ff_pattern
 };
 
-static struct nand_oobinfo delta_oob = {
-       .useecc = MTD_NANDECC_AUTOPL_USR, /* MTD_NANDECC_PLACEONLY, */
+static struct nand_ecclayout delta_oob = {
        .eccbytes = 6,
        .eccpos = {2, 3, 4, 5, 6, 7},
        .oobfree = { {8, 2}, {12, 4} }
 };
 
-
 /*
  * not required for Monahans DFC
  */
@@ -545,6 +543,7 @@ int board_nand_init(struct nand_chip *nand)
        nand->cmd_ctrl = dfc_hwcontrol;
 /*     nand->dev_ready = dfc_device_ready; */
        nand->ecc.mode = NAND_ECC_SOFT;
+       nand->ecc.layout = &delta_oob;
        nand->options = NAND_BUSWIDTH_16;
        nand->waitfunc = dfc_wait;
        nand->read_byte = dfc_read_byte;
@@ -553,7 +552,6 @@ int board_nand_init(struct nand_chip *nand)
        nand->write_buf = dfc_write_buf;
 
        nand->cmdfunc = dfc_cmdfunc;
-/*     nand->autooob = &delta_oob; */
        nand->badblock_pattern = &delta_bbt_descr;
        return 0;
 }