Lines Matching refs:map
39 struct map_info map; member
70 static map_word bfin_flash_read(struct map_info *map, unsigned long ofs) in bfin_flash_read() argument
72 struct async_state *state = (struct async_state *)map->map_priv_1; in bfin_flash_read()
78 word = readw(map->virt + ofs); in bfin_flash_read()
86 static void bfin_flash_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len) in bfin_flash_copy_from() argument
88 struct async_state *state = (struct async_state *)map->map_priv_1; in bfin_flash_copy_from()
92 memcpy(to, map->virt + from, len); in bfin_flash_copy_from()
97 static void bfin_flash_write(struct map_info *map, map_word d1, unsigned long ofs) in bfin_flash_write() argument
99 struct async_state *state = (struct async_state *)map->map_priv_1; in bfin_flash_write()
106 writew(d, map->virt + ofs); in bfin_flash_write()
112 static void bfin_flash_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t le… in bfin_flash_copy_to() argument
114 struct async_state *state = (struct async_state *)map->map_priv_1; in bfin_flash_copy_to()
118 memcpy(map->virt + to, from, len); in bfin_flash_copy_to()
138 state->map.name = DRIVER_NAME; in bfin_flash_probe()
139 state->map.read = bfin_flash_read; in bfin_flash_probe()
140 state->map.copy_from = bfin_flash_copy_from; in bfin_flash_probe()
141 state->map.write = bfin_flash_write; in bfin_flash_probe()
142 state->map.copy_to = bfin_flash_copy_to; in bfin_flash_probe()
143 state->map.bankwidth = pdata->width; in bfin_flash_probe()
144 state->map.size = resource_size(memory); in bfin_flash_probe()
145 state->map.virt = (void __iomem *)memory->start; in bfin_flash_probe()
146 state->map.phys = memory->start; in bfin_flash_probe()
147 state->map.map_priv_1 = (unsigned long)state; in bfin_flash_probe()
159 pr_devinit(KERN_NOTICE DRIVER_NAME ": probing %d-bit flash bus\n", state->map.bankwidth * 8); in bfin_flash_probe()
160 state->mtd = do_map_probe(memory->name, &state->map); in bfin_flash_probe()