Lines Matching refs:mtd
35 struct mtd_info *mtd; in map_ram_probe() local
58 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); in map_ram_probe()
59 if (!mtd) in map_ram_probe()
63 mtd->priv = map; in map_ram_probe()
64 mtd->name = map->name; in map_ram_probe()
65 mtd->type = MTD_RAM; in map_ram_probe()
66 mtd->size = map->size; in map_ram_probe()
67 mtd->_erase = mapram_erase; in map_ram_probe()
68 mtd->_get_unmapped_area = mapram_unmapped_area; in map_ram_probe()
69 mtd->_read = mapram_read; in map_ram_probe()
70 mtd->_write = mapram_write; in map_ram_probe()
71 mtd->_panic_write = mapram_write; in map_ram_probe()
72 mtd->_sync = mapram_nop; in map_ram_probe()
73 mtd->flags = MTD_CAP_RAM; in map_ram_probe()
74 mtd->writesize = 1; in map_ram_probe()
76 mtd->erasesize = PAGE_SIZE; in map_ram_probe()
77 while(mtd->size & (mtd->erasesize - 1)) in map_ram_probe()
78 mtd->erasesize >>= 1; in map_ram_probe()
81 return mtd; in map_ram_probe()
90 static unsigned long mapram_unmapped_area(struct mtd_info *mtd, in mapram_unmapped_area() argument
95 struct map_info *map = mtd->priv; in mapram_unmapped_area()
99 static int mapram_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) in mapram_read() argument
101 struct map_info *map = mtd->priv; in mapram_read()
108 static int mapram_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char … in mapram_write() argument
110 struct map_info *map = mtd->priv; in mapram_write()
117 static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr) in mapram_erase() argument
121 struct map_info *map = mtd->priv; in mapram_erase()
133 static void mapram_nop(struct mtd_info *mtd) in mapram_nop() argument