aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2011-11-19 10:02:54 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:07:25 -0500
commit7a7fcf14021bc0f0728dd0aaa2635475de0db54c (patch)
tree0286e8b77641220abebe4b654362ef8eb743d2c9 /drivers/mtd/devices
parentde03cd716ba7b8103ef9bef425be1ac72b81aeca (diff)
mtd: docg3: map erase and write functions
Map the developped write and erase functions into the mtd structure. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-by: Ivan Djelic <ivan.djelic@parrot.com> Reviewed-by: Mike Dunn <mikedunn@newsguy.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/docg3.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 3087b1564a4d..1f949eac6351 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -41,8 +41,6 @@
41 * 41 *
42 * As no specification is available from M-Systems/Sandisk, this drivers lacks 42 * As no specification is available from M-Systems/Sandisk, this drivers lacks
43 * several functions available on the chip, as : 43 * several functions available on the chip, as :
44 * - block erase
45 * - page write
46 * - IPL write 44 * - IPL write
47 * - ECC fixing (lack of BCH algorith understanding) 45 * - ECC fixing (lack of BCH algorith understanding)
48 * - powerdown / powerup 46 * - powerdown / powerup
@@ -1586,23 +1584,19 @@ static void __init doc_set_driver_info(int chip_id, struct mtd_info *mtd)
1586 break; 1584 break;
1587 } 1585 }
1588 mtd->type = MTD_NANDFLASH; 1586 mtd->type = MTD_NANDFLASH;
1589 /* 1587 mtd->flags = MTD_CAP_NANDFLASH;
1590 * Once write methods are added, the correct flags will be set.
1591 * mtd->flags = MTD_CAP_NANDFLASH;
1592 */
1593 mtd->flags = MTD_CAP_ROM;
1594 mtd->size = (docg3->max_block + 1) * DOC_LAYOUT_BLOCK_SIZE; 1588 mtd->size = (docg3->max_block + 1) * DOC_LAYOUT_BLOCK_SIZE;
1595 mtd->erasesize = DOC_LAYOUT_BLOCK_SIZE * DOC_LAYOUT_NBPLANES; 1589 mtd->erasesize = DOC_LAYOUT_BLOCK_SIZE * DOC_LAYOUT_NBPLANES;
1596 mtd->writesize = DOC_LAYOUT_PAGE_SIZE; 1590 mtd->writesize = DOC_LAYOUT_PAGE_SIZE;
1597 mtd->oobsize = DOC_LAYOUT_OOB_SIZE; 1591 mtd->oobsize = DOC_LAYOUT_OOB_SIZE;
1598 mtd->owner = THIS_MODULE; 1592 mtd->owner = THIS_MODULE;
1599 mtd->erase = NULL; 1593 mtd->erase = doc_erase;
1600 mtd->point = NULL; 1594 mtd->point = NULL;
1601 mtd->unpoint = NULL; 1595 mtd->unpoint = NULL;
1602 mtd->read = doc_read; 1596 mtd->read = doc_read;
1603 mtd->write = NULL; 1597 mtd->write = doc_write;
1604 mtd->read_oob = doc_read_oob; 1598 mtd->read_oob = doc_read_oob;
1605 mtd->write_oob = NULL; 1599 mtd->write_oob = doc_write_oob;
1606 mtd->sync = NULL; 1600 mtd->sync = NULL;
1607 mtd->block_isbad = doc_block_isbad; 1601 mtd->block_isbad = doc_block_isbad;
1608 mtd->ecclayout = &docg3_oobinfo; 1602 mtd->ecclayout = &docg3_oobinfo;