|
@@ -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 {
|