]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/nand/docg4.c
nand: Sync with Linux v4.1
[karo-tx-uboot.git] / drivers / mtd / nand / docg4.c
index 09f01c80d3447d2a1feee6ccf84d84c7c22cf00b..c1c1ff876a7539d8a6c576c9e8d34a99d814415f 100644 (file)
@@ -3,8 +3,7 @@
  *
  * Copyright (C) 2013 Mike Dunn <mikedunn@newsguy.com>
  *
- * This file is released under the terms of GPL v2 and any later version.
- * See the file COPYING in the root directory of the source tree for details.
+ * SPDX-License-Identifier:    GPL-2.0+
  *
  * mtd nand driver for M-Systems DiskOnChip G4
  *
@@ -25,7 +24,6 @@
  *
  *  Support for multiple cascaded devices ("floors").  Not sure which gadgets
  *  contain multiple G4s in a cascaded configuration, if any.
- *
  */
 
 
@@ -719,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;
@@ -762,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)
@@ -974,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;