summaryrefslogtreecommitdiff
path: root/target/linux/ramips/patches-3.6/011-mtd-cfi_cmdset_0002-force-word-write.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2012-11-07 20:25:34 +0000
committerJohn Crispin <john@openwrt.org>2012-11-07 20:25:34 +0000
commitca1fcaed5be02f18bf9c06473e3e554aa6801ab5 (patch)
tree1abe66efe47fe9848a14f92d7b49eb0babbb9ed6 /target/linux/ramips/patches-3.6/011-mtd-cfi_cmdset_0002-force-word-write.patch
parentcc826486008092661ad72a57f3715948501a6f30 (diff)
downloadmtk-20170518-ca1fcaed5be02f18bf9c06473e3e554aa6801ab5.zip
mtk-20170518-ca1fcaed5be02f18bf9c06473e3e554aa6801ab5.tar.gz
mtk-20170518-ca1fcaed5be02f18bf9c06473e3e554aa6801ab5.tar.bz2
ramips: port patches to linux-3.6
Signed-off-by: Daniel Golle <dgolle@allnet.de> create mode 100644 target/linux/ramips/patches-3.6/001-mips-add-cp0-compare-irq-function.patch create mode 100644 target/linux/ramips/patches-3.6/010-mtd_fix_cfi_cmdset_0002_erase_status_check.patch create mode 100644 target/linux/ramips/patches-3.6/011-mtd-cfi_cmdset_0002-force-word-write.patch create mode 100644 target/linux/ramips/patches-3.6/100-mips-ralink-core.patch create mode 100644 target/linux/ramips/patches-3.6/101-rt288x_serial_driver_hack.patch create mode 100644 target/linux/ramips/patches-3.6/102-rt288x-pci-driver-hook.patch create mode 100644 target/linux/ramips/patches-3.6/103-ethernet.patch create mode 100644 target/linux/ramips/patches-3.6/104-ramips-watchdog-driver.patch create mode 100644 target/linux/ramips/patches-3.6/105-ramips-spi-driver.patch create mode 100644 target/linux/ramips/patches-3.6/105-usb_dwc_otg.patch create mode 100644 target/linux/ramips/patches-3.6/106-rt3883-pci-support.patch create mode 100644 target/linux/ramips/patches-3.6/200-rt3883-ehci-glue.patch create mode 100644 target/linux/ramips/patches-3.6/201-rt3883-ohci-glue.patch SVN-Revision: 34108
Diffstat (limited to 'target/linux/ramips/patches-3.6/011-mtd-cfi_cmdset_0002-force-word-write.patch')
-rw-r--r--target/linux/ramips/patches-3.6/011-mtd-cfi_cmdset_0002-force-word-write.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-3.6/011-mtd-cfi_cmdset_0002-force-word-write.patch b/target/linux/ramips/patches-3.6/011-mtd-cfi_cmdset_0002-force-word-write.patch
new file mode 100644
index 0000000..e60bdf5
--- /dev/null
+++ b/target/linux/ramips/patches-3.6/011-mtd-cfi_cmdset_0002-force-word-write.patch
@@ -0,0 +1,63 @@
+Index: linux-3.6.6/drivers/mtd/chips/cfi_cmdset_0002.c
+===================================================================
+--- linux-3.6.6.orig/drivers/mtd/chips/cfi_cmdset_0002.c
++++ linux-3.6.6/drivers/mtd/chips/cfi_cmdset_0002.c
+@@ -39,7 +39,7 @@
+ #include <linux/mtd/xip.h>
+
+ #define AMD_BOOTLOC_BUG
+-#define FORCE_WORD_WRITE 0
++#define FORCE_WORD_WRITE 1
+
+ #define MAX_WORD_RETRIES 3
+
+@@ -50,7 +50,9 @@
+
+ static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
+ static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
++#if !FORCE_WORD_WRITE
+ static int cfi_amdstd_write_buffers(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
++#endif
+ static int cfi_amdstd_erase_chip(struct mtd_info *, struct erase_info *);
+ static int cfi_amdstd_erase_varsize(struct mtd_info *, struct erase_info *);
+ static void cfi_amdstd_sync (struct mtd_info *);
+@@ -186,6 +188,7 @@ static void fixup_amd_bootblock(struct m
+ }
+ #endif
+
++#if !FORCE_WORD_WRITE
+ static void fixup_use_write_buffers(struct mtd_info *mtd)
+ {
+ struct map_info *map = mtd->priv;
+@@ -195,6 +198,7 @@ static void fixup_use_write_buffers(stru
+ mtd->_write = cfi_amdstd_write_buffers;
+ }
+ }
++#endif /* !FORCE_WORD_WRITE */
+
+ /* Atmel chips don't use the same PRI format as AMD chips */
+ static void fixup_convert_atmel_pri(struct mtd_info *mtd)
+@@ -1376,6 +1380,7 @@ static int cfi_amdstd_write_words(struct
+ /*
+ * FIXME: interleaved mode not tested, and probably not supported!
+ */
++#if !FORCE_WORD_WRITE
+ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
+ unsigned long adr, const u_char *buf,
+ int len)
+@@ -1488,7 +1493,6 @@ static int __xipram do_write_buffer(stru
+ return ret;
+ }
+
+-
+ static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
+ size_t *retlen, const u_char *buf)
+ {
+@@ -1563,6 +1567,7 @@ static int cfi_amdstd_write_buffers(stru
+
+ return 0;
+ }
++#endif /* !FORCE_WORD_WRITE */
+
+ /*
+ * Wait for the flash chip to become ready to write data