12 #include <linux/module.h>
13 #include <linux/types.h>
14 #include <linux/slab.h>
15 #include <linux/kernel.h>
23 #include <mach/hardware.h>
27 #define CACHELINESIZE 32
29 static void pxa2xx_map_inval_cache(
struct map_info *
map,
unsigned long from,
33 unsigned long end = start + len;
38 asm volatile (
"mcr p15, 0, %0, c7, c6, 1" : :
"r" (
start));
49 static const char *probes[] = {
"RedBoot",
"cmdlinepart",
NULL };
66 info->
map.name = (
char *) flash->
name;
69 info->
map.size = resource_size(res);
72 if (!info->
map.virt) {
78 ioremap_cached(info->
map.phys, info->
map.size);
79 if (!info->
map.cached)
82 info->
map.inval_cache = pxa2xx_map_inval_cache;
86 "Probing %s at physical address 0x%08lx"
87 " (%d-bit bankwidth)\n",
88 info->
map.name, (
unsigned long)info->
map.phys,
89 info->
map.bankwidth * 8);
104 platform_set_drvdata(pdev, info);
112 platform_set_drvdata(dev,
NULL);
118 if (info->
map.cached)
129 if (info && mtd_suspend(info->
mtd) == 0)
130 mtd_resume(info->
mtd);
133 #define pxa2xx_flash_shutdown NULL
138 .name =
"pxa2xx-flash",
141 .probe = pxa2xx_flash_probe,