diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-17 23:22:23 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-17 23:22:23 +0000 |
commit | 6665398afafcb1c75d933c1452a9010644aba3e6 (patch) | |
tree | 6a6dce2ac7835de25f422330ea224a01eef55635 /drivers/mtd | |
parent | c0caac93f873cd3402b63246bf94d904afc4f5fd (diff) | |
parent | bf32eb85492af197ea5ff20e0be56f667a80584d (diff) | |
download | linux-3.10-6665398afafcb1c75d933c1452a9010644aba3e6.tar.gz linux-3.10-6665398afafcb1c75d933c1452a9010644aba3e6.tar.bz2 linux-3.10-6665398afafcb1c75d933c1452a9010644aba3e6.zip |
Merge branch 'cache' (early part)
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/maps/pxa2xx-flash.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c index 74fa075c838..b13f6417b5b 100644 --- a/drivers/mtd/maps/pxa2xx-flash.c +++ b/drivers/mtd/maps/pxa2xx-flash.c @@ -20,14 +20,23 @@ #include <asm/io.h> #include <mach/hardware.h> -#include <asm/cacheflush.h> #include <asm/mach/flash.h> +#define CACHELINESIZE 32 + static void pxa2xx_map_inval_cache(struct map_info *map, unsigned long from, ssize_t len) { - flush_ioremap_region(map->phys, map->cached, from, len); + unsigned long start = (unsigned long)map->cached + from; + unsigned long end = start + len; + + start &= ~(CACHELINESIZE - 1); + while (start < end) { + /* invalidate D cache line */ + asm volatile ("mcr p15, 0, %0, c7, c6, 1" : : "r" (start)); + start += CACHELINESIZE; + } } struct pxa2xx_flash_info { |