summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-03-24 23:41:29 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-03-24 23:41:29 +0000
commit28b9fea4e759470fd3e1f285b228b7101b15b18b (patch)
tree7e6f28414050fa3bac1e9b6e0d820191c7750e44
parent0121ec0e10442187c2e2f3b4db5340dd36fad6c1 (diff)
downloadmtk-20170518-28b9fea4e759470fd3e1f285b228b7101b15b18b.zip
mtk-20170518-28b9fea4e759470fd3e1f285b228b7101b15b18b.tar.gz
mtk-20170518-28b9fea4e759470fd3e1f285b228b7101b15b18b.tar.bz2
atheros: fix a spiflash write performance regression
SVN-Revision: 15027
-rw-r--r--target/linux/atheros/patches-2.6.28/120-spiflash.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/atheros/patches-2.6.28/120-spiflash.patch b/target/linux/atheros/patches-2.6.28/120-spiflash.patch
index e661365..e33733e 100644
--- a/target/linux/atheros/patches-2.6.28/120-spiflash.patch
+++ b/target/linux/atheros/patches-2.6.28/120-spiflash.patch
@@ -288,10 +288,10 @@
+}
+
+static void
-+spiflash_wait_complete(struct spiflash_priv *priv)
++spiflash_wait_complete(struct spiflash_priv *priv, unsigned int timeout)
+{
+ busy_wait(priv, spiflash_sendcmd(priv, SPI_RD_STATUS, 0) &
-+ SPI_STATUS_WIP, 20);
++ SPI_STATUS_WIP, timeout);
+ spiflash_done(priv);
+}
+
@@ -321,7 +321,7 @@
+ reg |= op->tx_cnt | SPI_CTL_START;
+ spiflash_write_reg(priv, SPI_FLASH_CTL, reg);
+
-+ spiflash_wait_complete(priv);
++ spiflash_wait_complete(priv, 20);
+
+ instr->state = MTD_ERASE_DONE;
+ if (instr->callback)
@@ -418,7 +418,7 @@
+ reg |= (read_len + 4) | SPI_CTL_START;
+ spiflash_write_reg(priv, SPI_FLASH_CTL, reg);
+
-+ spiflash_wait_complete(priv);
++ spiflash_wait_complete(priv, 1);
+
+ bytes_left -= read_len;
+ to += read_len;