[kernel] update to 2.6.33.7
[openwrt/svn-archive/archive.git] / target / linux / ifxmips / patches-2.6.33 / 200-cfi-swap.patch
1 --- a/drivers/mtd/chips/cfi_cmdset_0001.c
2 +++ b/drivers/mtd/chips/cfi_cmdset_0001.c
3 @@ -41,7 +41,11 @@
4 /* #define CMDSET0001_DISABLE_WRITE_SUSPEND */
5
6 // debugging, turns off buffer write mode if set to 1
7 -#define FORCE_WORD_WRITE 0
8 +#ifdef CONFIG_IFXMIPS
9 +# define FORCE_WORD_WRITE 1
10 +#else
11 +# define FORCE_WORD_WRITE 0
12 +#endif
13
14 /* Intel chips */
15 #define I82802AB 0x00ad
16 @@ -1494,6 +1498,9 @@ static int __xipram do_write_oneword(str
17 int ret=0;
18
19 adr += chip->start;
20 +#ifdef CONFIG_IFXMIPS
21 + adr ^= 2;
22 +#endif
23
24 switch (mode) {
25 case FL_WRITING:
26 --- a/drivers/mtd/chips/cfi_cmdset_0002.c
27 +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
28 @@ -39,7 +39,11 @@
29 #include <linux/mtd/xip.h>
30
31 #define AMD_BOOTLOC_BUG
32 -#define FORCE_WORD_WRITE 0
33 +#ifdef CONFIG_IFXMIPS
34 +# define FORCE_WORD_WRITE 1
35 +#else
36 +# define FORCE_WORD_WRITE 0
37 +#endif
38
39 #define MAX_WORD_RETRIES 3
40
41 @@ -1096,7 +1100,9 @@ static int __xipram do_write_oneword(str
42 int retry_cnt = 0;
43
44 adr += chip->start;
45 -
46 +#ifdef CONFIG_IFXMIPS
47 + adr ^= 2;
48 +#endif
49 spin_lock(chip->mutex);
50 ret = get_chip(map, chip, adr, FL_WRITING);
51 if (ret) {