提交 7a7fcf14 编写于 作者: R Robert Jarzmik 提交者: David Woodhouse

mtd: docg3: map erase and write functions

Map the developped write and erase functions into the mtd
structure.
Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: NIvan Djelic <ivan.djelic@parrot.com>
Reviewed-by: NMike Dunn <mikedunn@newsguy.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 de03cd71
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
* *
* As no specification is available from M-Systems/Sandisk, this drivers lacks * As no specification is available from M-Systems/Sandisk, this drivers lacks
* several functions available on the chip, as : * several functions available on the chip, as :
* - block erase
* - page write
* - IPL write * - IPL write
* - ECC fixing (lack of BCH algorith understanding) * - ECC fixing (lack of BCH algorith understanding)
* - powerdown / powerup * - powerdown / powerup
...@@ -1586,23 +1584,19 @@ static void __init doc_set_driver_info(int chip_id, struct mtd_info *mtd) ...@@ -1586,23 +1584,19 @@ static void __init doc_set_driver_info(int chip_id, struct mtd_info *mtd)
break; break;
} }
mtd->type = MTD_NANDFLASH; mtd->type = MTD_NANDFLASH;
/* mtd->flags = MTD_CAP_NANDFLASH;
* Once write methods are added, the correct flags will be set.
* mtd->flags = MTD_CAP_NANDFLASH;
*/
mtd->flags = MTD_CAP_ROM;
mtd->size = (docg3->max_block + 1) * DOC_LAYOUT_BLOCK_SIZE; mtd->size = (docg3->max_block + 1) * DOC_LAYOUT_BLOCK_SIZE;
mtd->erasesize = DOC_LAYOUT_BLOCK_SIZE * DOC_LAYOUT_NBPLANES; mtd->erasesize = DOC_LAYOUT_BLOCK_SIZE * DOC_LAYOUT_NBPLANES;
mtd->writesize = DOC_LAYOUT_PAGE_SIZE; mtd->writesize = DOC_LAYOUT_PAGE_SIZE;
mtd->oobsize = DOC_LAYOUT_OOB_SIZE; mtd->oobsize = DOC_LAYOUT_OOB_SIZE;
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
mtd->erase = NULL; mtd->erase = doc_erase;
mtd->point = NULL; mtd->point = NULL;
mtd->unpoint = NULL; mtd->unpoint = NULL;
mtd->read = doc_read; mtd->read = doc_read;
mtd->write = NULL; mtd->write = doc_write;
mtd->read_oob = doc_read_oob; mtd->read_oob = doc_read_oob;
mtd->write_oob = NULL; mtd->write_oob = doc_write_oob;
mtd->sync = NULL; mtd->sync = NULL;
mtd->block_isbad = doc_block_isbad; mtd->block_isbad = doc_block_isbad;
mtd->ecclayout = &docg3_oobinfo; mtd->ecclayout = &docg3_oobinfo;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册