Lines Matching refs:info

52 	struct pxa2xx_flash_info *info;  in pxa2xx_flash_probe()  local
59 info = kzalloc(sizeof(struct pxa2xx_flash_info), GFP_KERNEL); in pxa2xx_flash_probe()
60 if (!info) in pxa2xx_flash_probe()
63 info->map.name = flash->name; in pxa2xx_flash_probe()
64 info->map.bankwidth = flash->width; in pxa2xx_flash_probe()
65 info->map.phys = res->start; in pxa2xx_flash_probe()
66 info->map.size = resource_size(res); in pxa2xx_flash_probe()
68 info->map.virt = ioremap(info->map.phys, info->map.size); in pxa2xx_flash_probe()
69 if (!info->map.virt) { in pxa2xx_flash_probe()
71 info->map.name); in pxa2xx_flash_probe()
74 info->map.cached = memremap(info->map.phys, info->map.size, in pxa2xx_flash_probe()
76 if (!info->map.cached) in pxa2xx_flash_probe()
78 info->map.name); in pxa2xx_flash_probe()
79 info->map.inval_cache = pxa2xx_map_inval_cache; in pxa2xx_flash_probe()
80 simple_map_init(&info->map); in pxa2xx_flash_probe()
85 info->map.name, (unsigned long)info->map.phys, in pxa2xx_flash_probe()
86 info->map.bankwidth * 8); in pxa2xx_flash_probe()
88 info->mtd = do_map_probe(flash->map_name, &info->map); in pxa2xx_flash_probe()
90 if (!info->mtd) { in pxa2xx_flash_probe()
91 iounmap((void *)info->map.virt); in pxa2xx_flash_probe()
92 if (info->map.cached) in pxa2xx_flash_probe()
93 iounmap(info->map.cached); in pxa2xx_flash_probe()
96 info->mtd->dev.parent = &pdev->dev; in pxa2xx_flash_probe()
98 mtd_device_parse_register(info->mtd, probes, NULL, flash->parts, in pxa2xx_flash_probe()
101 platform_set_drvdata(pdev, info); in pxa2xx_flash_probe()
107 struct pxa2xx_flash_info *info = platform_get_drvdata(dev); in pxa2xx_flash_remove() local
109 mtd_device_unregister(info->mtd); in pxa2xx_flash_remove()
111 map_destroy(info->mtd); in pxa2xx_flash_remove()
112 iounmap(info->map.virt); in pxa2xx_flash_remove()
113 if (info->map.cached) in pxa2xx_flash_remove()
114 memunmap(info->map.cached); in pxa2xx_flash_remove()
115 kfree(info); in pxa2xx_flash_remove()
122 struct pxa2xx_flash_info *info = platform_get_drvdata(dev); in pxa2xx_flash_shutdown() local
124 if (info && mtd_suspend(info->mtd) == 0) in pxa2xx_flash_shutdown()
125 mtd_resume(info->mtd); in pxa2xx_flash_shutdown()