--- zzzz-none-000/linux-2.6.13.1/drivers/mtd/nand/nand_base.c 2005-09-10 02:42:58.000000000 +0000 +++ ohio-7170-487/linux-2.6.13.1/drivers/mtd/nand/nand_base.c 2006-11-06 16:02:03.000000000 +0000 @@ -89,14 +89,14 @@ .useecc = MTD_NANDECC_AUTOPLACE, .eccbytes = 3, .eccpos = {0, 1, 2}, - .oobfree = { {3, 2}, {6, 2} } + .oobfree = { {3, 2}, {6, 2}, {0, 0} } }; static struct nand_oobinfo nand_oob_16 = { .useecc = MTD_NANDECC_AUTOPLACE, .eccbytes = 6, .eccpos = {0, 1, 2, 3, 6, 7}, - .oobfree = { {8, 8} } + .oobfree = { {8, 8}, {0, 0} } }; static struct nand_oobinfo nand_oob_64 = { @@ -106,7 +106,7 @@ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}, - .oobfree = { {2, 38} } + .oobfree = { {2, 38}, {0, 0} } }; /* This is used for padding purposes in nand_write_oob */ @@ -486,10 +486,14 @@ */ static int nand_check_wp (struct mtd_info *mtd) { +#if defined(CONFIG_MIPS_OHIO) || defined(CONFIG_MIPS_AR7) + return 0; /*--- we can't read the right writeprotect bit ---*/ +#else struct nand_chip *this = mtd->priv; /* Check the WP bit */ this->cmdfunc (mtd, NAND_CMD_STATUS, -1, -1); return (this->read_byte(mtd) & NAND_STATUS_WP) ? 0 : 1; +#endif } /** @@ -652,7 +656,6 @@ column += mtd->oobblock; command = NAND_CMD_READ0; } - /* Begin command latch cycle */ this->hwcontrol(mtd, NAND_CTL_SETCLE);