Loading drivers/mtd/devices/doc2000.c +0 −2 Original line number Diff line number Diff line Loading @@ -584,8 +584,6 @@ void DoC2k_init(struct mtd_info *mtd) mtd->unpoint = NULL; mtd->read = doc_read; mtd->write = doc_write; mtd->read_ecc = doc_read_ecc; mtd->write_ecc = doc_write_ecc; mtd->read_oob = doc_read_oob; mtd->write_oob = doc_write_oob; mtd->sync = NULL; Loading drivers/mtd/devices/doc2001.c +0 −2 Original line number Diff line number Diff line Loading @@ -369,8 +369,6 @@ void DoCMil_init(struct mtd_info *mtd) mtd->unpoint = NULL; mtd->read = doc_read; mtd->write = doc_write; mtd->read_ecc = doc_read_ecc; mtd->write_ecc = doc_write_ecc; mtd->read_oob = doc_read_oob; mtd->write_oob = doc_write_oob; mtd->sync = NULL; Loading drivers/mtd/devices/doc2001plus.c +0 −2 Original line number Diff line number Diff line Loading @@ -491,8 +491,6 @@ void DoCMilPlus_init(struct mtd_info *mtd) mtd->unpoint = NULL; mtd->read = doc_read; mtd->write = doc_write; mtd->read_ecc = doc_read_ecc; mtd->write_ecc = doc_write_ecc; mtd->read_oob = doc_read_oob; mtd->write_oob = doc_write_oob; mtd->sync = NULL; Loading drivers/mtd/inftlcore.c +32 −31 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include <linux/mtd/mtd.h> #include <linux/mtd/nftl.h> #include <linux/mtd/inftl.h> #include <linux/mtd/nand.h> #include <asm/uaccess.h> #include <asm/errno.h> #include <asm/io.h> Loading Loading @@ -79,8 +80,6 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) inftl->mbd.devnum = -1; inftl->mbd.blksize = 512; inftl->mbd.tr = tr; memcpy(&inftl->oobinfo, &mtd->oobinfo, sizeof(struct nand_oobinfo)); inftl->oobinfo.useecc = MTD_NANDECC_PLACEONLY; if (INFTL_mount(inftl) < 0) { printk(KERN_WARNING "INFTL: could not mount device\n"); Loading Loading @@ -302,9 +301,10 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned } memset(&oob, 0xff, sizeof(struct inftl_oob)); oob.b.Status = oob.b.Status1 = SECTOR_USED; MTD_WRITEECC(inftl->mbd.mtd, (inftl->EraseSize * targetEUN) + nand_write_raw(inftl->mbd.mtd, (inftl->EraseSize * targetEUN) + (block * SECTORSIZE), SECTORSIZE, &retlen, movebuf, (char *)&oob, &inftl->oobinfo); movebuf, (char *)&oob); } /* Loading Loading @@ -784,9 +784,10 @@ static int inftl_writeblock(struct mtd_blktrans_dev *mbd, unsigned long block, memset(&oob, 0xff, sizeof(struct inftl_oob)); oob.b.Status = oob.b.Status1 = SECTOR_USED; MTD_WRITEECC(inftl->mbd.mtd, (writeEUN * inftl->EraseSize) + nand_write_raw(inftl->mbd.mtd, (writeEUN * inftl->EraseSize) + blockofs, SECTORSIZE, &retlen, (char *)buffer, (char *)&oob, &inftl->oobinfo); (char *)&oob); /* * need to write SECTOR_USED flags since they are not written * in mtd_writeecc Loading drivers/mtd/inftlmount.c +6 −6 Original line number Diff line number Diff line Loading @@ -350,21 +350,21 @@ static int check_free_sectors(struct INFTLrecord *inftl, unsigned int address, int len, int check_oob) { u8 buf[SECTORSIZE + inftl->mbd.mtd->oobsize]; struct mtd_info *mtd = inftl->mbd.mtd; size_t retlen; int i; DEBUG(MTD_DEBUG_LEVEL3, "INFTL: check_free_sectors(inftl=%p," "address=0x%x,len=%d,check_oob=%d)\n", inftl, address, len, check_oob); for (i = 0; i < len; i += SECTORSIZE) { if (MTD_READECC(inftl->mbd.mtd, address, SECTORSIZE, &retlen, buf, &buf[SECTORSIZE], &inftl->oobinfo) < 0) if (mtd->read(mtd, address, SECTORSIZE, &retlen, buf)) return -1; if (memcmpb(buf, 0xff, SECTORSIZE) != 0) return -1; if (check_oob) { if (memcmpb(buf + SECTORSIZE, 0xff, inftl->mbd.mtd->oobsize) != 0) if(mtd->read_oob(mtd, address, mtd->oobsize, &retlen, &buf[SECTORSIZE]) < 0) return -1; if (memcmpb(buf + SECTORSIZE, 0xff, mtd->oobsize) != 0) return -1; } address += SECTORSIZE; Loading Loading
drivers/mtd/devices/doc2000.c +0 −2 Original line number Diff line number Diff line Loading @@ -584,8 +584,6 @@ void DoC2k_init(struct mtd_info *mtd) mtd->unpoint = NULL; mtd->read = doc_read; mtd->write = doc_write; mtd->read_ecc = doc_read_ecc; mtd->write_ecc = doc_write_ecc; mtd->read_oob = doc_read_oob; mtd->write_oob = doc_write_oob; mtd->sync = NULL; Loading
drivers/mtd/devices/doc2001.c +0 −2 Original line number Diff line number Diff line Loading @@ -369,8 +369,6 @@ void DoCMil_init(struct mtd_info *mtd) mtd->unpoint = NULL; mtd->read = doc_read; mtd->write = doc_write; mtd->read_ecc = doc_read_ecc; mtd->write_ecc = doc_write_ecc; mtd->read_oob = doc_read_oob; mtd->write_oob = doc_write_oob; mtd->sync = NULL; Loading
drivers/mtd/devices/doc2001plus.c +0 −2 Original line number Diff line number Diff line Loading @@ -491,8 +491,6 @@ void DoCMilPlus_init(struct mtd_info *mtd) mtd->unpoint = NULL; mtd->read = doc_read; mtd->write = doc_write; mtd->read_ecc = doc_read_ecc; mtd->write_ecc = doc_write_ecc; mtd->read_oob = doc_read_oob; mtd->write_oob = doc_write_oob; mtd->sync = NULL; Loading
drivers/mtd/inftlcore.c +32 −31 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include <linux/mtd/mtd.h> #include <linux/mtd/nftl.h> #include <linux/mtd/inftl.h> #include <linux/mtd/nand.h> #include <asm/uaccess.h> #include <asm/errno.h> #include <asm/io.h> Loading Loading @@ -79,8 +80,6 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) inftl->mbd.devnum = -1; inftl->mbd.blksize = 512; inftl->mbd.tr = tr; memcpy(&inftl->oobinfo, &mtd->oobinfo, sizeof(struct nand_oobinfo)); inftl->oobinfo.useecc = MTD_NANDECC_PLACEONLY; if (INFTL_mount(inftl) < 0) { printk(KERN_WARNING "INFTL: could not mount device\n"); Loading Loading @@ -302,9 +301,10 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned } memset(&oob, 0xff, sizeof(struct inftl_oob)); oob.b.Status = oob.b.Status1 = SECTOR_USED; MTD_WRITEECC(inftl->mbd.mtd, (inftl->EraseSize * targetEUN) + nand_write_raw(inftl->mbd.mtd, (inftl->EraseSize * targetEUN) + (block * SECTORSIZE), SECTORSIZE, &retlen, movebuf, (char *)&oob, &inftl->oobinfo); movebuf, (char *)&oob); } /* Loading Loading @@ -784,9 +784,10 @@ static int inftl_writeblock(struct mtd_blktrans_dev *mbd, unsigned long block, memset(&oob, 0xff, sizeof(struct inftl_oob)); oob.b.Status = oob.b.Status1 = SECTOR_USED; MTD_WRITEECC(inftl->mbd.mtd, (writeEUN * inftl->EraseSize) + nand_write_raw(inftl->mbd.mtd, (writeEUN * inftl->EraseSize) + blockofs, SECTORSIZE, &retlen, (char *)buffer, (char *)&oob, &inftl->oobinfo); (char *)&oob); /* * need to write SECTOR_USED flags since they are not written * in mtd_writeecc Loading
drivers/mtd/inftlmount.c +6 −6 Original line number Diff line number Diff line Loading @@ -350,21 +350,21 @@ static int check_free_sectors(struct INFTLrecord *inftl, unsigned int address, int len, int check_oob) { u8 buf[SECTORSIZE + inftl->mbd.mtd->oobsize]; struct mtd_info *mtd = inftl->mbd.mtd; size_t retlen; int i; DEBUG(MTD_DEBUG_LEVEL3, "INFTL: check_free_sectors(inftl=%p," "address=0x%x,len=%d,check_oob=%d)\n", inftl, address, len, check_oob); for (i = 0; i < len; i += SECTORSIZE) { if (MTD_READECC(inftl->mbd.mtd, address, SECTORSIZE, &retlen, buf, &buf[SECTORSIZE], &inftl->oobinfo) < 0) if (mtd->read(mtd, address, SECTORSIZE, &retlen, buf)) return -1; if (memcmpb(buf, 0xff, SECTORSIZE) != 0) return -1; if (check_oob) { if (memcmpb(buf + SECTORSIZE, 0xff, inftl->mbd.mtd->oobsize) != 0) if(mtd->read_oob(mtd, address, mtd->oobsize, &retlen, &buf[SECTORSIZE]) < 0) return -1; if (memcmpb(buf + SECTORSIZE, 0xff, mtd->oobsize) != 0) return -1; } address += SECTORSIZE; Loading