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()
815 static int parse_badblocks(struct nandsim *ns, struct mtd_info *mtd) in parse_badblocks() argument
833 if (mtd_block_markbad(mtd, offset)) { in parse_badblocks()
1014 static int setup_wear_reporting(struct mtd_info *mtd) in setup_wear_reporting() argument
1018 wear_eb_count = div_u64(mtd->size, mtd->erasesize); in setup_wear_reporting()
1909 static u_char ns_nand_read_byte(struct mtd_info *mtd) in ns_nand_read_byte() argument
1911 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv; in ns_nand_read_byte()
1970 static void ns_nand_write_byte(struct mtd_info *mtd, u_char byte) in ns_nand_write_byte() argument
1972 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv; in ns_nand_write_byte()
2124 static void ns_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int bitmask) in ns_hwcontrol() argument
2126 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv; in ns_hwcontrol()
2133 ns_nand_write_byte(mtd, cmd); in ns_hwcontrol()
2136 static int ns_device_ready(struct mtd_info *mtd) in ns_device_ready() argument
2142 static uint16_t ns_nand_read_word(struct mtd_info *mtd) in ns_nand_read_word() argument
2144 struct nand_chip *chip = (struct nand_chip *)mtd->priv; in ns_nand_read_word()
2148 return chip->read_byte(mtd) | (chip->read_byte(mtd) << 8); in ns_nand_read_word()
2151 static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) in ns_nand_write_buf() argument
2153 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv; in ns_nand_write_buf()
2178 static void ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) in ns_nand_read_buf() argument
2180 struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv; in ns_nand_read_buf()
2201 buf[i] = ((struct nand_chip *)mtd->priv)->read_byte(mtd); in ns_nand_read_buf()