[ar7] correct the MDIO base address and reset sequence for Titan (#6573)
[openwrt.git] / target / linux / ar71xx / patches-2.6.33 / 111-mtd-cfi_cmdset_0002-force-word-write.patch
1 --- a/drivers/mtd/chips/cfi_cmdset_0002.c
2 +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
3 @@ -39,7 +39,7 @@
4 #include <linux/mtd/xip.h>
5
6 #define AMD_BOOTLOC_BUG
7 -#define FORCE_WORD_WRITE 0
8 +#define FORCE_WORD_WRITE 1
9
10 #define MAX_WORD_RETRIES 3
11
12 @@ -55,7 +55,9 @@
13
14 static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
15 static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
16 +#if !FORCE_WORD_WRITE
17 static int cfi_amdstd_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
18 +#endif
19 static int cfi_amdstd_erase_chip(struct mtd_info *, struct erase_info *);
20 static int cfi_amdstd_erase_varsize(struct mtd_info *, struct erase_info *);
21 static void cfi_amdstd_sync (struct mtd_info *);
22 @@ -190,6 +192,7 @@ static void fixup_amd_bootblock(struct m
23 }
24 #endif
25
26 +#if !FORCE_WORD_WRITE
27 static void fixup_use_write_buffers(struct mtd_info *mtd, void *param)
28 {
29 struct map_info *map = mtd->priv;
30 @@ -199,6 +202,7 @@ static void fixup_use_write_buffers(stru
31 mtd->write = cfi_amdstd_write_buffers;
32 }
33 }
34 +#endif /* !FORCE_WORD_WRITE */
35
36 /* Atmel chips don't use the same PRI format as AMD chips */
37 static void fixup_convert_atmel_pri(struct mtd_info *mtd, void *param)
38 @@ -1304,6 +1308,7 @@ static int cfi_amdstd_write_words(struct
39 /*
40 * FIXME: interleaved mode not tested, and probably not supported!
41 */
42 +#if !FORCE_WORD_WRITE
43 static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
44 unsigned long adr, const u_char *buf,
45 int len)
46 @@ -1415,7 +1420,6 @@ static int __xipram do_write_buffer(stru
47 return ret;
48 }
49
50 -
51 static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
52 size_t *retlen, const u_char *buf)
53 {
54 @@ -1494,6 +1498,7 @@ static int cfi_amdstd_write_buffers(stru
55
56 return 0;
57 }
58 +#endif /* !FORCE_WORD_WRITE */
59
60 /*
61 * Handle devices with one erase region, that only implement
This page took 0.048428 seconds and 5 git commands to generate.