Lines Matching refs:map

107 	struct map_info map;  member
119 struct esb2rom_map_info *map, *scratch; in esb2rom_cleanup() local
128 list_for_each_entry_safe(map, scratch, &window->maps, list) { in esb2rom_cleanup()
129 if (map->rsrc.parent) in esb2rom_cleanup()
130 release_resource(&map->rsrc); in esb2rom_cleanup()
131 mtd_device_unregister(map->mtd); in esb2rom_cleanup()
132 map_destroy(map->mtd); in esb2rom_cleanup()
133 list_del(&map->list); in esb2rom_cleanup()
134 kfree(map); in esb2rom_cleanup()
152 struct esb2rom_map_info *map = NULL; in esb2rom_init_one() local
279 if (!map) in esb2rom_init_one()
280 map = kmalloc(sizeof(*map), GFP_KERNEL); in esb2rom_init_one()
281 if (!map) { in esb2rom_init_one()
285 memset(map, 0, sizeof(*map)); in esb2rom_init_one()
286 INIT_LIST_HEAD(&map->list); in esb2rom_init_one()
287 map->map.name = map->map_name; in esb2rom_init_one()
288 map->map.phys = map_top; in esb2rom_init_one()
290 map->map.virt = (void __iomem *) in esb2rom_init_one()
292 map->map.size = 0xffffffffUL - map_top + 1UL; in esb2rom_init_one()
294 sprintf(map->map_name, "%s @%08Lx", in esb2rom_init_one()
295 MOD_NAME, (unsigned long long)map->map.phys); in esb2rom_init_one()
301 for(map->map.bankwidth = 32; map->map.bankwidth; in esb2rom_init_one()
302 map->map.bankwidth >>= 1) { in esb2rom_init_one()
305 if (!map_bankwidth_supported(map->map.bankwidth)) in esb2rom_init_one()
309 simple_map_init(&map->map); in esb2rom_init_one()
314 map->mtd = do_map_probe(*probe_type, &map->map); in esb2rom_init_one()
315 if (map->mtd) in esb2rom_init_one()
323 if (map->mtd->size > map->map.size) { in esb2rom_init_one()
326 (unsigned long long)map->mtd->size, map->map.size); in esb2rom_init_one()
327 map->mtd->size = map->map.size; in esb2rom_init_one()
335 map->rsrc.name = map->map_name; in esb2rom_init_one()
336 map->rsrc.start = map->map.phys; in esb2rom_init_one()
337 map->rsrc.end = map->map.phys + map->mtd->size - 1; in esb2rom_init_one()
338 map->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY; in esb2rom_init_one()
339 if (request_resource(&window->rsrc, &map->rsrc)) { in esb2rom_init_one()
342 map->rsrc.parent = NULL; in esb2rom_init_one()
347 map->map.virt = window->virt; in esb2rom_init_one()
348 map->map.phys = window->phys; in esb2rom_init_one()
349 cfi = map->map.fldrv_priv; in esb2rom_init_one()
354 map->mtd->owner = THIS_MODULE; in esb2rom_init_one()
355 if (mtd_device_register(map->mtd, NULL, 0)) { in esb2rom_init_one()
356 map_destroy(map->mtd); in esb2rom_init_one()
357 map->mtd = NULL; in esb2rom_init_one()
362 map_top += map->mtd->size; in esb2rom_init_one()
365 list_add(&map->list, &window->maps); in esb2rom_init_one()
366 map = NULL; in esb2rom_init_one()
371 kfree(map); in esb2rom_init_one()