]> git.sur5r.net Git - u-boot/blobdiff - drivers/mtd/nand/ndfc.c
dfu, nand: before write a buffer to nand, erase the nand sectors
[u-boot] / drivers / mtd / nand / ndfc.c
index 6ebbb5ebee9cfb7e2de3cea92c28ec4de7fbf096..94b90332d622acb518d3006857ca6e9ecba99dd7 100644 (file)
@@ -156,7 +156,7 @@ static uint8_t ndfc_read_byte(struct mtd_info *mtd)
 
        struct nand_chip *chip = mtd->priv;
 
-#ifdef CONFIG_SYS_NDFC_16BIT
+#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT
        return (uint8_t) readw(chip->IO_ADDR_R);
 #else
        return readb(chip->IO_ADDR_R);
@@ -216,9 +216,10 @@ int board_nand_init(struct nand_chip *nand)
        nand->ecc.mode = NAND_ECC_HW;
        nand->ecc.size = 256;
        nand->ecc.bytes = 3;
+       nand->ecc.strength = 1;
        nand->select_chip = ndfc_select_chip;
 
-#ifdef CONFIG_SYS_NDFC_16BIT
+#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT
        nand->options |= NAND_BUSWIDTH_16;
 #endif