Lines Matching defs:mtd
13 #include <linux/mtd/partitions.h>
14 #include <linux/mtd/rawnand.h>
1463 qcom_nandc_read_cw_raw(struct mtd_info *mtd, struct nand_chip *chip,
1487 data_size1 = mtd->writesize - host->cw_size * (ecc->steps - 1);
1556 struct mtd_info *mtd = nand_to_mtd(chip);
1582 ret = qcom_nandc_read_cw_raw(mtd, chip, cw_data_buf,
1596 mtd->ecc_stats.failed++;
1598 mtd->ecc_stats.corrected += ret;
1615 struct mtd_info *mtd = nand_to_mtd(chip);
1688 mtd->ecc_stats.corrected += stat;
1916 struct mtd_info *mtd = nand_to_mtd(chip);
1926 ret = qcom_nandc_read_cw_raw(mtd, chip, data_buf, oob_buf,
2035 struct mtd_info *mtd = nand_to_mtd(chip);
2060 data_size1 = mtd->writesize - host->cw_size * (ecc->steps - 1);
2112 struct mtd_info *mtd = nand_to_mtd(chip);
2128 oob_size = mtd->oobavail;
2132 mtd_ooblayout_get_databytes(mtd, nandc->data_buffer + data_size, oob,
2133 0, mtd->oobavail);
2154 struct mtd_info *mtd = nand_to_mtd(chip);
2180 bbpos = mtd->writesize - host->cw_size * (ecc->steps - 1);
2313 static int qcom_nand_ooblayout_ecc(struct mtd_info *mtd, int section,
2316 struct nand_chip *chip = mtd_to_nand(mtd);
2329 oobregion->offset = mtd->oobsize - oobregion->length;
2335 static int qcom_nand_ooblayout_free(struct mtd_info *mtd, int section,
2338 struct nand_chip *chip = mtd_to_nand(mtd);
2367 struct mtd_info *mtd = nand_to_mtd(chip);
2378 cwperpage = mtd->writesize / NANDC_STEP_SIZE;
2385 mtd->oobsize - (cwperpage * 4));
2456 mtd_set_ooblayout(mtd, &qcom_nand_ooblayout_ops);
2486 bad_block_byte = mtd->writesize - host->cw_size * (cwperpage - 1) + 1;
3195 struct mtd_info *mtd = nand_to_mtd(chip);
3228 if (boot_partition->page_offset % mtd->writesize) {
3235 boot_partition->page_offset /= mtd->writesize;
3245 if (boot_partition->page_size % mtd->writesize) {
3252 boot_partition->page_size /= mtd->writesize;
3263 struct mtd_info *mtd = nand_to_mtd(chip);
3274 mtd->name = devm_kasprintf(dev, GFP_KERNEL, "qcom_nand.%d", host->cs);
3275 if (!mtd->name)
3278 mtd->owner = THIS_MODULE;
3279 mtd->dev.parent = dev;
3303 ret = mtd_device_parse_register(mtd, probes, NULL, NULL, 0);