mtd: cafe_nand: drop duplicate .write_page implementation
Subsystems (2)
PATCH 1/1 mtd: cafe_nand: drop duplicate .write_page implementation
This write_page() function is functionally equivalent to the default in nand_base.c. Its only difference is in subpage programming support, which cafe_nand.c does not advertise, so the difference is negligible.
Signed-off-by Brian Norris <[email protected]>
--- drivers/mtd/nand/cafe_nand.c | 45 -------------------------------------------- 1 file changed, 45 deletions(-)
drivers/mtd/nand/cafe_nand.c +0 -45
@@ -529,50 +529,6 @@ static int cafe_nand_write_page_lowlevel(struct mtd_info *mtd,return 0 ; } -static int cafe_nand_write_page (struct mtd_info *mtd,struct nand_chip *chip, -uint32_t offset,int data_len,const uint8_t *buf, -int oob_required,int page,int cached,int raw) -{ -int status; - - chip->cmdfunc (mtd,NAND_CMD_SEQIN ,0x00 , page); - -if (unlikely (raw)) - status = chip->ecc.write_page_raw (mtd, chip, buf, oob_required); -else - status = chip->ecc.write_page (mtd, chip, buf, oob_required); - -if (status <0 ) -return status; - -/* -* Cached progamming disabled for now, Not sure if its worth the -* trouble. The speed gain is not very impressive. (2.3->2.6Mib/s) -*/ - cached =0 ; - -if (!cached || !(chip->options &NAND_CACHEPRG )) { - - chip->cmdfunc (mtd,NAND_CMD_PAGEPROG ,-1 ,-1 ); - status = chip->waitfunc (mtd, chip); -/* -* See if operation failed and additional status checks are -* available -*/ -if ((status &NAND_STATUS_FAIL ) && (chip->errstat)) - status = chip->errstat (mtd, chip,FL_WRITING , status, - page); - -if (status &NAND_STATUS_FAIL ) -return -EIO ; - }else { - chip->cmdfunc (mtd,NAND_CMD_CACHEDPROG ,-1 ,-1 ); - status = chip->waitfunc (mtd, chip); - } - -return 0 ; -} -static int cafe_nand_block_bad (struct mtd_info *mtd,loff_t ofs,int getchip) {return 0 ;
@@ -800,7 +756,6 @@ static int cafe_nand_probe(struct pci_dev *pdev, cafe->nand.ecc.hwctl = (void *)cafe_nand_bug; cafe->nand.ecc.calculate = (void *)cafe_nand_bug; cafe->nand.ecc.correct = (void *)cafe_nand_bug; - cafe->nand.write_page = cafe_nand_write_page; cafe->nand.ecc.write_page = cafe_nand_write_page_lowlevel; cafe->nand.ecc.write_oob = cafe_nand_write_oob; cafe->nand.ecc.read_page = cafe_nand_read_page;
Signature · 1 line
1.9.1
Brian Norris
AppliedQuoted 5 lines · Brian Norris
This
write_page()function is functionally equivalent to the default innand_base.c. Its only difference is in subpage programming support, whichcafe_nand.cdoes not advertise, so the difference is negligible.Signed-off-by Brian Norris <[email protected]>
Applied to l2-mtd.git.
Brian