Lines Matching defs:map

15 #include <linux/mtd/map.h>
42 struct map_info map;
71 struct amd76xrom_map_info *map, *scratch;
82 list_for_each_entry_safe(map, scratch, &window->maps, list) {
83 if (map->rsrc.parent) {
84 release_resource(&map->rsrc);
86 mtd_device_unregister(map->mtd);
87 map_destroy(map->mtd);
88 list_del(&map->list);
89 kfree(map);
110 struct amd76xrom_map_info *map = NULL;
190 if (!map) {
191 map = kmalloc(sizeof(*map), GFP_KERNEL);
192 if (!map)
195 memset(map, 0, sizeof(*map));
196 INIT_LIST_HEAD(&map->list);
197 map->map.name = map->map_name;
198 map->map.phys = map_top;
200 map->map.virt = (void __iomem *)
202 map->map.size = 0xffffffffUL - map_top + 1UL;
203 /* Set the name of the map to the address I am trying */
204 sprintf(map->map_name, "%s @%08Lx",
205 MOD_NAME, (unsigned long long)map->map.phys);
208 for(map->map.bankwidth = 32; map->map.bankwidth;
209 map->map.bankwidth >>= 1)
213 if (!map_bankwidth_supported(map->map.bankwidth))
216 /* Setup the map methods */
217 simple_map_init(&map->map);
222 map->mtd = do_map_probe(*probe_type, &map->map);
223 if (map->mtd)
230 /* Trim the size if we are larger than the map */
231 if (map->mtd->size > map->map.size) {
234 (unsigned long long)map->mtd->size, map->map.size);
235 map->mtd->size = map->map.size;
243 map->rsrc.name = map->map_name;
244 map->rsrc.start = map->map.phys;
245 map->rsrc.end = map->map.phys + map->mtd->size - 1;
246 map->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
247 if (request_resource(&window->rsrc, &map->rsrc)) {
250 map->rsrc.parent = NULL;
254 /* Make the whole region visible in the map */
255 map->map.virt = window->virt;
256 map->map.phys = window->phys;
257 cfi = map->map.fldrv_priv;
263 map->mtd->owner = THIS_MODULE;
264 if (mtd_device_register(map->mtd, NULL, 0)) {
265 map_destroy(map->mtd);
266 map->mtd = NULL;
272 map_top += map->mtd->size;
274 /* File away the map structure */
275 list_add(&map->list, &window->maps);
276 map = NULL;
280 /* Free any left over map structures */
281 kfree(map);
282 /* See if I have any map structures */
348 MODULE_DESCRIPTION("MTD map driver for BIOS chips on the AMD76X southbridge");