aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorJared Hulbert <jaredeh@gmail.com>2007-08-22 12:38:25 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-08-23 07:31:31 -0400
commit90833fdab89da02fc0276224167f0a42e5176f41 (patch)
tree98faf88d640260ccd7d4d6f8050d3daac29e4374 /drivers/mtd/maps
parentcb00e99c0abd844b884c64c6b54aa3b7d345ebb1 (diff)
[ARM] 4554/1: replace consistent_sync() with flush_ioremap_region()
This fixes a regression from around 2.6.18, consistent_sync() will now BUG() under these circumstances. The use of consistent_sync() was a hack, replacing it's usage here with a new function, flush_ioremap_region(). Signed-off-by: Jared Hulbert <jaredeh@gmail.com> Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/lubbock-flash.c6
-rw-r--r--drivers/mtd/maps/mainstone-flash.c5
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/mtd/maps/lubbock-flash.c b/drivers/mtd/maps/lubbock-flash.c
index 1aa0447c5e66..e8560683b973 100644
--- a/drivers/mtd/maps/lubbock-flash.c
+++ b/drivers/mtd/maps/lubbock-flash.c
@@ -15,9 +15,7 @@
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/slab.h>
19 18
20#include <linux/dma-mapping.h>
21#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
22#include <linux/mtd/map.h> 20#include <linux/mtd/map.h>
23#include <linux/mtd/partitions.h> 21#include <linux/mtd/partitions.h>
@@ -26,7 +24,7 @@
26#include <asm/hardware.h> 24#include <asm/hardware.h>
27#include <asm/arch/pxa-regs.h> 25#include <asm/arch/pxa-regs.h>
28#include <asm/arch/lubbock.h> 26#include <asm/arch/lubbock.h>
29 27#include <asm/cacheflush.h>
30 28
31#define ROM_ADDR 0x00000000 29#define ROM_ADDR 0x00000000
32#define FLASH_ADDR 0x04000000 30#define FLASH_ADDR 0x04000000
@@ -35,7 +33,7 @@
35 33
36static void lubbock_map_inval_cache(struct map_info *map, unsigned long from, ssize_t len) 34static void lubbock_map_inval_cache(struct map_info *map, unsigned long from, ssize_t len)
37{ 35{
38 consistent_sync((char *)map->cached + from, len, DMA_FROM_DEVICE); 36 flush_ioremap_region(map->phys, map->cached, from, len);
39} 37}
40 38
41static struct map_info lubbock_maps[2] = { { 39static struct map_info lubbock_maps[2] = { {
diff --git a/drivers/mtd/maps/mainstone-flash.c b/drivers/mtd/maps/mainstone-flash.c
index eaa4bbb868a3..d76487d82dcd 100644
--- a/drivers/mtd/maps/mainstone-flash.c
+++ b/drivers/mtd/maps/mainstone-flash.c
@@ -15,8 +15,6 @@
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/dma-mapping.h>
19#include <linux/slab.h>
20 18
21#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
22#include <linux/mtd/map.h> 20#include <linux/mtd/map.h>
@@ -26,6 +24,7 @@
26#include <asm/hardware.h> 24#include <asm/hardware.h>
27#include <asm/arch/pxa-regs.h> 25#include <asm/arch/pxa-regs.h>
28#include <asm/arch/mainstone.h> 26#include <asm/arch/mainstone.h>
27#include <asm/cacheflush.h>
29 28
30 29
31#define ROM_ADDR 0x00000000 30#define ROM_ADDR 0x00000000
@@ -36,7 +35,7 @@
36static void mainstone_map_inval_cache(struct map_info *map, unsigned long from, 35static void mainstone_map_inval_cache(struct map_info *map, unsigned long from,
37 ssize_t len) 36 ssize_t len)
38{ 37{
39 consistent_sync((char *)map->cached + from, len, DMA_FROM_DEVICE); 38 flush_ioremap_region(map->phys, map->cached, from, len);
40} 39}
41 40
42static struct map_info mainstone_maps[2] = { { 41static struct map_info mainstone_maps[2] = { {