Lines Matching refs:mtd
22 static int maprom_erase (struct mtd_info *mtd, struct erase_info *info);
32 struct mtd_info *mtd; in map_rom_probe() local
34 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); in map_rom_probe()
35 if (!mtd) in map_rom_probe()
39 mtd->priv = map; in map_rom_probe()
40 mtd->name = map->name; in map_rom_probe()
41 mtd->type = MTD_ROM; in map_rom_probe()
42 mtd->size = map->size; in map_rom_probe()
43 mtd->read = maprom_read; in map_rom_probe()
44 mtd->write = maprom_write; in map_rom_probe()
45 mtd->sync = maprom_nop; in map_rom_probe()
46 mtd->erase = maprom_erase; in map_rom_probe()
47 mtd->flags = MTD_CAP_ROM; in map_rom_probe()
48 mtd->erasesize = map->size; in map_rom_probe()
49 mtd->writesize = 1; in map_rom_probe()
52 return mtd; in map_rom_probe()
56 static int maprom_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) in maprom_read() argument
58 struct map_info *map = mtd->priv; in maprom_read()
65 static void maprom_nop(struct mtd_info *mtd) in maprom_nop() argument
70 static int maprom_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char … in maprom_write() argument
76 static int maprom_erase (struct mtd_info *mtd, struct erase_info *info) in maprom_erase() argument