Lines Matching defs:mtd

19 #include <linux/mtd/mtd.h>
20 #include <linux/mtd/rawnand.h>
21 #include <linux/mtd/partitions.h>
29 #include <linux/mtd/lpc32xx_mlc.h>
129 static int lpc32xx_ooblayout_ecc(struct mtd_info *mtd, int section,
132 struct nand_chip *nand_chip = mtd_to_nand(mtd);
143 static int lpc32xx_ooblayout_free(struct mtd_info *mtd, int section,
146 struct nand_chip *nand_chip = mtd_to_nand(mtd);
323 struct mtd_info *mtd = nand_to_mtd(chip);
333 dev_dbg(&mtd->dev, "Warning: NAND not ready.\n");
343 struct mtd_info *mtd = nand_to_mtd(chip);
353 dev_dbg(&mtd->dev, "Warning: Controller not ready.\n");
392 static int lpc32xx_xmit_dma(struct mtd_info *mtd, void *mem, int len,
395 struct nand_chip *chip = mtd_to_nand(mtd);
406 dev_err(mtd->dev.parent, "Failed to map sg list\n");
412 dev_err(mtd->dev.parent, "Failed to prepare slave sg\n");
437 struct mtd_info *mtd = nand_to_mtd(chip);
468 mtd->ecc_stats.failed++;
469 dev_warn(&mtd->dev, "%s: DECODER_FAILURE\n", __func__);
471 mtd->ecc_stats.corrected += ((mlc_isr >> 4) & 0x3) + 1;
476 res = lpc32xx_xmit_dma(mtd, dma_buf + i * 512, 512,
495 memcpy(buf, dma_buf, mtd->writesize);
504 struct mtd_info *mtd = nand_to_mtd(chip);
513 memcpy(dma_buf, buf, mtd->writesize);
524 res = lpc32xx_xmit_dma(mtd, dma_buf + i * 512, 512,
574 struct mtd_info *mtd = nand_to_mtd(&host->nand_chip);
578 dev_err(mtd->dev.parent, "no DMA platform data\n");
587 dev_err(mtd->dev.parent, "Failed to request DMA channel\n");
606 dev_err(mtd->dev.parent, "Failed to setup DMA slave\n");
645 struct mtd_info *mtd = nand_to_mtd(chip);
652 host->dma_buf = devm_kzalloc(dev, mtd->writesize, GFP_KERNEL);
656 host->dummy_buf = devm_kzalloc(dev, mtd->writesize, GFP_KERNEL);
671 mtd_set_ooblayout(mtd, &lpc32xx_ooblayout_ops);
672 host->mlcsubpages = mtd->writesize / 512;
687 struct mtd_info *mtd;
706 mtd = nand_to_mtd(nand_chip);
732 mtd->dev.parent = &pdev->dev;
800 mtd->name = DRV_NAME;
802 res = mtd_device_register(mtd, host->ncfg->parts,