Lines Matching refs:mtd

24 static int mapram_point (struct mtd_info *mtd, loff_t from, size_t len,
26 static int mapram_unpoint(struct mtd_info *mtd, loff_t from, size_t len);
37 struct mtd_info *mtd; in map_ram_probe() local
60 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); in map_ram_probe()
61 if (!mtd) in map_ram_probe()
65 mtd->priv = map; in map_ram_probe()
66 mtd->name = map->name; in map_ram_probe()
67 mtd->type = MTD_RAM; in map_ram_probe()
68 mtd->size = map->size; in map_ram_probe()
69 mtd->_erase = mapram_erase; in map_ram_probe()
70 mtd->_read = mapram_read; in map_ram_probe()
71 mtd->_write = mapram_write; in map_ram_probe()
72 mtd->_panic_write = mapram_write; in map_ram_probe()
73 mtd->_sync = mapram_nop; in map_ram_probe()
74 mtd->flags = MTD_CAP_RAM; in map_ram_probe()
75 mtd->writesize = 1; in map_ram_probe()
79 mtd->_point = mapram_point; in map_ram_probe()
80 mtd->_unpoint = mapram_unpoint; in map_ram_probe()
83 mtd->erasesize = PAGE_SIZE; in map_ram_probe()
84 while(mtd->size & (mtd->erasesize - 1)) in map_ram_probe()
85 mtd->erasesize >>= 1; in map_ram_probe()
88 return mtd; in map_ram_probe()
91 static int mapram_point(struct mtd_info *mtd, loff_t from, size_t len, in mapram_point() argument
94 struct map_info *map = mtd->priv; in mapram_point()
105 static int mapram_unpoint(struct mtd_info *mtd, loff_t from, size_t len) in mapram_unpoint() argument
110 static int mapram_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) in mapram_read() argument
112 struct map_info *map = mtd->priv; in mapram_read()
119 static int mapram_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char … in mapram_write() argument
121 struct map_info *map = mtd->priv; in mapram_write()
128 static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr) in mapram_erase() argument
132 struct map_info *map = mtd->priv; in mapram_erase()
142 static void mapram_nop(struct mtd_info *mtd) in mapram_nop() argument