Lines Matching full:mtd

16 #include <linux/mtd/mtd.h>
17 #include <linux/mtd/map.h>
23 static int maprom_erase (struct mtd_info *mtd, struct erase_info *info);
24 static int maprom_point (struct mtd_info *mtd, loff_t from, size_t len,
26 static int maprom_unpoint(struct mtd_info *mtd, loff_t from, size_t len);
46 struct mtd_info *mtd; in map_rom_probe() local
48 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); in map_rom_probe()
49 if (!mtd) in map_rom_probe()
53 mtd->priv = map; in map_rom_probe()
54 mtd->name = map->name; in map_rom_probe()
55 mtd->type = MTD_ROM; in map_rom_probe()
56 mtd->size = map->size; in map_rom_probe()
57 mtd->_point = maprom_point; in map_rom_probe()
58 mtd->_unpoint = maprom_unpoint; in map_rom_probe()
59 mtd->_read = maprom_read; in map_rom_probe()
60 mtd->_write = maprom_write; in map_rom_probe()
61 mtd->_sync = maprom_nop; in map_rom_probe()
62 mtd->_erase = maprom_erase; in map_rom_probe()
63 mtd->flags = MTD_CAP_ROM; in map_rom_probe()
64 mtd->erasesize = default_erasesize(map); in map_rom_probe()
65 mtd->writesize = 1; in map_rom_probe()
66 mtd->writebufsize = 1; in map_rom_probe()
69 return mtd; in map_rom_probe()
73 static int maprom_point(struct mtd_info *mtd, loff_t from, size_t len, in maprom_point() argument
76 struct map_info *map = mtd->priv; in maprom_point()
87 static int maprom_unpoint(struct mtd_info *mtd, loff_t from, size_t len) in maprom_unpoint() argument
92 static int maprom_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) in maprom_read() argument
94 struct map_info *map = mtd->priv; in maprom_read()
101 static void maprom_nop(struct mtd_info *mtd) in maprom_nop() argument
106 static int maprom_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char … in maprom_write() argument
111 static int maprom_erase (struct mtd_info *mtd, struct erase_info *info) in maprom_erase() argument
133 MODULE_DESCRIPTION("MTD chip driver for ROM chips");