summaryrefslogtreecommitdiff
path: root/packages/linux/linux-ezx/pxa_mtd_fix.patch
blob: 98df93513dfaac1ab9c9be0f20825bdbfc2f9ae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Index: linux-2.6.16.5-ezx/drivers/mtd/maps/Kconfig
===================================================================
--- linux-2.6.16.5-ezx.orig/drivers/mtd/maps/Kconfig	2006-04-17 09:05:51.000000000 -0300
+++ linux-2.6.16.5-ezx/drivers/mtd/maps/Kconfig	2006-04-21 22:57:38.000000000 -0300
@@ -622,7 +622,7 @@
 	  This enables access to the flash chip on the Sharp SL Series of PDAs.
 
 config MTD_PXA27x
-	bool "Map driver for Intel PXA27x"
+	tristate "Map driver for Intel PXA27x"
 	depends on MTD && ARCH_PXA
 	help
 	  This enables access to the flash chip on the Intel PXA27x
Index: linux-2.6.16.5-ezx/drivers/mtd/maps/pxa27x.c
===================================================================
--- linux-2.6.16.5-ezx.orig/drivers/mtd/maps/pxa27x.c	2006-04-17 09:05:51.000000000 -0300
+++ linux-2.6.16.5-ezx/drivers/mtd/maps/pxa27x.c	2006-04-21 23:00:08.000000000 -0300
@@ -36,10 +36,8 @@
 static void pxa27x_map_inval_cache(struct map_info *map, unsigned long from,
 				   ssize_t len)
 {
+#if 0
 	unsigned long endaddress, i, j;
-
-	/* FIXME: can this be replaced by consistent_sync? */
-
 	endaddress = from + len -1;
 	from &= ~(32-1);
 	endaddress &= ~(32-1);
@@ -50,6 +48,9 @@
 		"mov %0, %0\n"
 		"sub pc, pc #4"
 		:"=r"(j));
+#else
+	consistent_sync((char *)map->cached + from, len, DMA_FROM_DEVICE);
+#endif
 }
 
 
@@ -184,4 +185,4 @@
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
-MODULE_DESCRIPTION("MTD map driver for Intel PXA27x");
+MODULE_DESCRIPTION("MTD map driver for Motorola EZX platform");