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);
222 if (!map)
225 memset(map, 0, sizeof(*map));
226 INIT_LIST_HEAD(&map->list);
227 map->map.name = map->map_name;
228 map->map.phys = map_top;
230 map->map.virt = (void __iomem *)
232 map->map.size = 0xffffffffUL - map_top + 1UL;
233 /* Set the name of the map to the address I am trying */
234 sprintf(map->map_name, "%s @%08Lx",
235 MOD_NAME, (unsigned long long)map->map.phys);
238 for(map->map.bankwidth = 32; map->map.bankwidth;
239 map->map.bankwidth >>= 1)
243 if (!map_bankwidth_supported(map->map.bankwidth))
246 /* Setup the map methods */
247 simple_map_init(&map->map);
252 map->mtd = do_map_probe(*probe_type, &map->map);
253 if (map->mtd)
260 /* Trim the size if we are larger than the map */
261 if (map->mtd->size > map->map.size) {
264 (unsigned long long)map->mtd->size, map->map.size);
265 map->mtd->size = map->map.size;
273 map->rsrc.name = map->map_name;
274 map->rsrc.start = map->map.phys;
275 map->rsrc.end = map->map.phys + map->mtd->size - 1;
276 map->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
277 if (request_resource(&window->rsrc, &map->rsrc)) {
280 map->rsrc.parent = NULL;
284 /* Make the whole region visible in the map */
285 map->map.virt = window->virt;
286 map->map.phys = window->phys;
287 cfi = map->map.fldrv_priv;
292 map->mtd->owner = THIS_MODULE;
293 if (mtd_device_register(map->mtd, NULL, 0)) {
294 map_destroy(map->mtd);
295 map->mtd = NULL;
301 map_top += map->mtd->size;
303 /* File away the map structure */
304 list_add(&map->list, &window->maps);
305 map = NULL;
309 /* Free any left over map structures */
310 kfree(map);
312 /* See if I have any map structures */
385 MODULE_DESCRIPTION("MTD map driver for BIOS chips on the Nvidia ck804 southbridge");