Lines Matching refs:mtd

22 static int maprom_erase (struct mtd_info *mtd, struct erase_info *info);
43 struct mtd_info *mtd; in map_rom_probe() local
45 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); in map_rom_probe()
46 if (!mtd) in map_rom_probe()
50 mtd->priv = map; in map_rom_probe()
51 mtd->name = map->name; in map_rom_probe()
52 mtd->type = MTD_ROM; in map_rom_probe()
53 mtd->size = map->size; in map_rom_probe()
54 mtd->_get_unmapped_area = maprom_unmapped_area; in map_rom_probe()
55 mtd->_read = maprom_read; in map_rom_probe()
56 mtd->_write = maprom_write; in map_rom_probe()
57 mtd->_sync = maprom_nop; in map_rom_probe()
58 mtd->_erase = maprom_erase; in map_rom_probe()
59 mtd->flags = MTD_CAP_ROM; in map_rom_probe()
60 mtd->erasesize = default_erasesize(map); in map_rom_probe()
61 mtd->writesize = 1; in map_rom_probe()
62 mtd->writebufsize = 1; in map_rom_probe()
65 return mtd; in map_rom_probe()
74 static unsigned long maprom_unmapped_area(struct mtd_info *mtd, in maprom_unmapped_area() argument
79 struct map_info *map = mtd->priv; in maprom_unmapped_area()
83 static int maprom_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) in maprom_read() argument
85 struct map_info *map = mtd->priv; in maprom_read()
92 static void maprom_nop(struct mtd_info *mtd) in maprom_nop() argument
97 static int maprom_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char … in maprom_write() argument
102 static int maprom_erase (struct mtd_info *mtd, struct erase_info *info) in maprom_erase() argument