Lines Matching defs:map

18 #include <linux/mtd/map.h>
46 struct map_info map;
84 struct ck804xrom_map_info *map, *scratch;
94 list_for_each_entry_safe(map, scratch, &window->maps, list) {
95 if (map->rsrc.parent)
96 release_resource(&map->rsrc);
98 mtd_device_unregister(map->mtd);
99 map_destroy(map->mtd);
100 list_del(&map->list);
101 kfree(map);
123 struct ck804xrom_map_info *map = NULL;
220 if (!map)
221 map = kmalloc(sizeof(*map), GFP_KERNEL);
223 if (!map) {
227 memset(map, 0, sizeof(*map));
228 INIT_LIST_HEAD(&map->list);
229 map->map.name = map->map_name;
230 map->map.phys = map_top;
232 map->map.virt = (void __iomem *)
234 map->map.size = 0xffffffffUL - map_top + 1UL;
235 /* Set the name of the map to the address I am trying */
236 sprintf(map->map_name, "%s @%08Lx",
237 MOD_NAME, (unsigned long long)map->map.phys);
240 for(map->map.bankwidth = 32; map->map.bankwidth;
241 map->map.bankwidth >>= 1)
245 if (!map_bankwidth_supported(map->map.bankwidth))
248 /* Setup the map methods */
249 simple_map_init(&map->map);
254 map->mtd = do_map_probe(*probe_type, &map->map);
255 if (map->mtd)
262 /* Trim the size if we are larger than the map */
263 if (map->mtd->size > map->map.size) {
266 (unsigned long long)map->mtd->size, map->map.size);
267 map->mtd->size = map->map.size;
275 map->rsrc.name = map->map_name;
276 map->rsrc.start = map->map.phys;
277 map->rsrc.end = map->map.phys + map->mtd->size - 1;
278 map->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
279 if (request_resource(&window->rsrc, &map->rsrc)) {
282 map->rsrc.parent = NULL;
286 /* Make the whole region visible in the map */
287 map->map.virt = window->virt;
288 map->map.phys = window->phys;
289 cfi = map->map.fldrv_priv;
294 map->mtd->owner = THIS_MODULE;
295 if (mtd_device_register(map->mtd, NULL, 0)) {
296 map_destroy(map->mtd);
297 map->mtd = NULL;
303 map_top += map->mtd->size;
305 /* File away the map structure */
306 list_add(&map->list, &window->maps);
307 map = NULL;
311 /* Free any left over map structures */
312 kfree(map);
314 /* See if I have any map structures */
387 MODULE_DESCRIPTION("MTD map driver for BIOS chips on the Nvidia ck804 southbridge");