diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/mtd/maps/pxa2xx-flash.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/mtd/maps/pxa2xx-flash.c')
-rw-r--r-- | drivers/mtd/maps/pxa2xx-flash.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c index 74fa075c838a..91dc6331053f 100644 --- a/drivers/mtd/maps/pxa2xx-flash.c +++ b/drivers/mtd/maps/pxa2xx-flash.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
@@ -20,14 +21,23 @@ | |||
20 | 21 | ||
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <asm/cacheflush.h> | ||
24 | 24 | ||
25 | #include <asm/mach/flash.h> | 25 | #include <asm/mach/flash.h> |
26 | 26 | ||
27 | #define CACHELINESIZE 32 | ||
28 | |||
27 | static void pxa2xx_map_inval_cache(struct map_info *map, unsigned long from, | 29 | static void pxa2xx_map_inval_cache(struct map_info *map, unsigned long from, |
28 | ssize_t len) | 30 | ssize_t len) |
29 | { | 31 | { |
30 | flush_ioremap_region(map->phys, map->cached, from, len); | 32 | unsigned long start = (unsigned long)map->cached + from; |
33 | unsigned long end = start + len; | ||
34 | |||
35 | start &= ~(CACHELINESIZE - 1); | ||
36 | while (start < end) { | ||
37 | /* invalidate D cache line */ | ||
38 | asm volatile ("mcr p15, 0, %0, c7, c6, 1" : : "r" (start)); | ||
39 | start += CACHELINESIZE; | ||
40 | } | ||
31 | } | 41 | } |
32 | 42 | ||
33 | struct pxa2xx_flash_info { | 43 | struct pxa2xx_flash_info { |