diff options
author | Brian Norris <computersforpeace@gmail.com> | 2013-12-16 23:50:32 -0500 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-01-03 14:22:26 -0500 |
commit | 5e41d0a7102cfd43a3f0e178d37f2e9654f2fd50 (patch) | |
tree | 9a01a7aa913f5156f7fd6ced5f8f88ae4e5e1619 | |
parent | 0966a416d22bb5d4a5444e5a8eb0e0ae671826e6 (diff) |
mtd: nand: lpc32xx_mlc: drop custom write_page callback
This driver doesn't need its own custom chip->write_page callback; the
only "custom" requirement is that this driver does not support subpage
writes, which we can avoid using the NAND_NO_SUBPAGE_WRITE flag. With
NAND_NO_SUBPAGE_WRITE, the default routine (nand_write_page()) should
perform the equivalent operations.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Roland Stigge <stigge@antcom.de>
Tested-by: Roland Stigge <stigge@antcom.de>
-rw-r--r-- | drivers/mtd/nand/lpc32xx_mlc.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/mtd/nand/lpc32xx_mlc.c b/drivers/mtd/nand/lpc32xx_mlc.c index 327d96c03505..48be85039a89 100644 --- a/drivers/mtd/nand/lpc32xx_mlc.c +++ b/drivers/mtd/nand/lpc32xx_mlc.c | |||
@@ -539,20 +539,6 @@ static int lpc32xx_write_page_lowlevel(struct mtd_info *mtd, | |||
539 | return 0; | 539 | return 0; |
540 | } | 540 | } |
541 | 541 | ||
542 | static int lpc32xx_write_page(struct mtd_info *mtd, struct nand_chip *chip, | ||
543 | uint32_t offset, int data_len, const uint8_t *buf, | ||
544 | int oob_required, int page, int cached, int raw) | ||
545 | { | ||
546 | int res; | ||
547 | |||
548 | chip->cmdfunc(mtd, NAND_CMD_SEQIN, 0x00, page); | ||
549 | res = lpc32xx_write_page_lowlevel(mtd, chip, buf, oob_required); | ||
550 | chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1); | ||
551 | lpc32xx_waitfunc(mtd, chip); | ||
552 | |||
553 | return res; | ||
554 | } | ||
555 | |||
556 | static int lpc32xx_read_oob(struct mtd_info *mtd, struct nand_chip *chip, | 542 | static int lpc32xx_read_oob(struct mtd_info *mtd, struct nand_chip *chip, |
557 | int page) | 543 | int page) |
558 | { | 544 | { |
@@ -732,9 +718,9 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) | |||
732 | nand_chip->ecc.write_oob = lpc32xx_write_oob; | 718 | nand_chip->ecc.write_oob = lpc32xx_write_oob; |
733 | nand_chip->ecc.read_oob = lpc32xx_read_oob; | 719 | nand_chip->ecc.read_oob = lpc32xx_read_oob; |
734 | nand_chip->ecc.strength = 4; | 720 | nand_chip->ecc.strength = 4; |
735 | nand_chip->write_page = lpc32xx_write_page; | ||
736 | nand_chip->waitfunc = lpc32xx_waitfunc; | 721 | nand_chip->waitfunc = lpc32xx_waitfunc; |
737 | 722 | ||
723 | nand_chip->options = NAND_NO_SUBPAGE_WRITE; | ||
738 | nand_chip->bbt_options = NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB; | 724 | nand_chip->bbt_options = NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB; |
739 | nand_chip->bbt_td = &lpc32xx_nand_bbt; | 725 | nand_chip->bbt_td = &lpc32xx_nand_bbt; |
740 | nand_chip->bbt_md = &lpc32xx_nand_bbt_mirror; | 726 | nand_chip->bbt_md = &lpc32xx_nand_bbt_mirror; |