Lines Matching refs:mtd
34 struct mtd_info *mtd; in map_ram_probe() local
57 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); in map_ram_probe()
58 if (!mtd) in map_ram_probe()
62 mtd->priv = map; in map_ram_probe()
63 mtd->name = map->name; in map_ram_probe()
64 mtd->type = MTD_RAM; in map_ram_probe()
65 mtd->size = map->size; in map_ram_probe()
66 mtd->erase = mapram_erase; in map_ram_probe()
67 mtd->read = mapram_read; in map_ram_probe()
68 mtd->write = mapram_write; in map_ram_probe()
69 mtd->sync = mapram_nop; in map_ram_probe()
70 mtd->flags = MTD_CAP_RAM; in map_ram_probe()
71 mtd->writesize = 1; in map_ram_probe()
73 mtd->erasesize = PAGE_SIZE; in map_ram_probe()
74 while(mtd->size & (mtd->erasesize - 1)) in map_ram_probe()
75 mtd->erasesize >>= 1; in map_ram_probe()
78 return mtd; in map_ram_probe()
82 static int mapram_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) in mapram_read() argument
84 struct map_info *map = mtd->priv; in mapram_read()
91 static int mapram_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char … in mapram_write() argument
93 struct map_info *map = mtd->priv; in mapram_write()
100 static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr) in mapram_erase() argument
104 struct map_info *map = mtd->priv; in mapram_erase()
120 static void mapram_nop(struct mtd_info *mtd) in mapram_nop() argument