diff options
author | Scott Wood <scottwood@freescale.com> | 2015-06-26 19:03:26 -0500 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-08-25 22:53:57 -0500 |
commit | d3963721d93fafa8da0f78de17602ef308ec15ba (patch) | |
tree | 3585b254c72b9d2122a456c433f24dfc723c8465 /drivers/mtd/nand/docg4.c | |
parent | 86a720aafce5b2571af66b8d7e04b144c05b1b8b (diff) | |
download | u-boot-d3963721d93fafa8da0f78de17602ef308ec15ba.zip u-boot-d3963721d93fafa8da0f78de17602ef308ec15ba.tar.gz u-boot-d3963721d93fafa8da0f78de17602ef308ec15ba.tar.bz2 |
nand: Sync with Linux v4.1
Update the NAND code to match Linux v4.1. The previous sync was
from Linux v3.15 in commit 4e67c57125290b25.
CONFIG_SYS_NAND_RESET_CNT is removed, as the upstream Linux code now
has its own timeout. Plus, CONFIG_SYS_NAND_RESET_CNT was undocumented
and not selected by any board.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'drivers/mtd/nand/docg4.c')
-rw-r--r-- | drivers/mtd/nand/docg4.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c index b9121c3..c1c1ff8 100644 --- a/drivers/mtd/nand/docg4.c +++ b/drivers/mtd/nand/docg4.c @@ -717,7 +717,7 @@ static int docg4_read_page(struct mtd_info *mtd, struct nand_chip *nand, return read_page(mtd, nand, buf, page, 1); } -static void docg4_erase_block(struct mtd_info *mtd, int page) +static int docg4_erase_block(struct mtd_info *mtd, int page) { struct nand_chip *nand = mtd->priv; struct docg4_priv *doc = nand->priv; @@ -760,6 +760,8 @@ static void docg4_erase_block(struct mtd_info *mtd, int page) write_nop(docptr); poll_status(docptr); write_nop(docptr); + + return nand->waitfunc(mtd, nand); } static int read_factory_bbt(struct mtd_info *mtd) @@ -972,7 +974,7 @@ int docg4_nand_init(struct mtd_info *mtd, struct nand_chip *nand, int devnum) nand->read_buf = docg4_read_buf; nand->write_buf = docg4_write_buf16; nand->scan_bbt = nand_default_bbt; - nand->erase_cmd = docg4_erase_block; + nand->erase = docg4_erase_block; nand->ecc.read_page = docg4_read_page; nand->ecc.write_page = docg4_write_page; nand->ecc.read_page_raw = docg4_read_page_raw; |