Lines Matching refs:mtd
16 #include <linux/mtd/nand-ecc-sw-hamming.h>
241 struct mtd_info *mtd = ftl->trans->mtd;
282 ret = mtd_read_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops);
295 /* This should never happen, unless there is a bug in the mtd driver */
327 struct mtd_info *mtd = ftl->trans->mtd;
347 ret = mtd_write_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops);
468 struct mtd_info *mtd = ftl->trans->mtd;
484 if (mtd_erase(mtd, &erase)) {
564 static int sm_get_media_info(struct sm_ftl *ftl, struct mtd_info *mtd)
567 int size_in_megs = mtd->size / (1024 * 1024);
569 ftl->readonly = mtd->type == MTD_ROM;
586 if (mtd->writesize == SM_SMALL_PAGE) {
626 if (mtd->erasesize > ftl->block_size)
629 if (mtd->writesize > SM_SECTOR_SIZE)
632 if (ftl->smallpagenand && mtd->oobsize < SM_SMALL_OOB_SIZE)
635 if (!ftl->smallpagenand && mtd->oobsize < SM_OOB_SIZE)
639 if (!mtd_has_oob(mtd))
737 /* Basic test to determine if underlying mtd device if functional */
1132 static void sm_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
1148 if (sm_get_media_info(ftl, mtd)) {
1149 dbg("found unsupported mtd device, aborting");
1183 trans->mtd = mtd;
1189 dbg("CIS not found on mtd device, aborting");
1198 sm_printk("Found %d MiB xD/SmartMedia FTL on mtd%d",
1199 (int)(mtd->size / (1024 * 1024)), mtd->index);
1299 MODULE_DESCRIPTION("Smartmedia/xD mtd translation layer");