Lines Matching refs:mtd
667 static int init_nandsim(struct mtd_info *mtd) in init_nandsim() argument
669 struct nand_chip *chip = mtd->priv; in init_nandsim()
685 ns->geom.totsz = mtd->size; in init_nandsim()
686 ns->geom.pgsz = mtd->writesize; in init_nandsim()
687 ns->geom.oobsz = mtd->oobsize; in init_nandsim()
688 ns->geom.secsz = mtd->erasesize; in init_nandsim()
816 static int parse_badblocks(struct nandsim *ns, struct mtd_info *mtd) in parse_badblocks() argument
834 if (mtd_block_markbad(mtd, offset)) { in parse_badblocks()
1015 static int setup_wear_reporting(struct mtd_info *mtd) in setup_wear_reporting() argument
1019 wear_eb_count = div_u64(mtd->size, mtd->erasesize); in setup_wear_reporting()
1910 static u_char ns_nand_read_byte(struct mtd_info *mtd) in ns_nand_read_byte() argument
1912 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv; in ns_nand_read_byte()
1971 static void ns_nand_write_byte(struct mtd_info *mtd, u_char byte) in ns_nand_write_byte() argument
1973 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv; in ns_nand_write_byte()
2125 static void ns_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int bitmask) in ns_hwcontrol() argument
2127 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv; in ns_hwcontrol()
2134 ns_nand_write_byte(mtd, cmd); in ns_hwcontrol()
2137 static int ns_device_ready(struct mtd_info *mtd) in ns_device_ready() argument
2143 static uint16_t ns_nand_read_word(struct mtd_info *mtd) in ns_nand_read_word() argument
2145 struct nand_chip *chip = (struct nand_chip *)mtd->priv; in ns_nand_read_word()
2149 return chip->read_byte(mtd) | (chip->read_byte(mtd) << 8); in ns_nand_read_word()
2152 static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) in ns_nand_write_buf() argument
2154 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv; in ns_nand_write_buf()
2179 static void ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) in ns_nand_read_buf() argument
2181 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv; in ns_nand_read_buf()
2202 buf[i] = ((struct nand_chip *)mtd->priv)->read_byte(mtd); in ns_nand_read_buf()