X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=target%2Flinux%2Fatheros%2Fpatches-2.6.28%2F120-spiflash.patch;h=e33733ecfb9c9d81f031de12271324b98aa0a4eb;hb=c6de2c0d2fb3c94abc129f9343d6f94257235c6d;hp=e66136506657075a8da1694ad11473e35d02b5f6;hpb=a5c4f544067e9cf7a79342bd20547beb41d80fba;p=openwrt-10.03%2F.git 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 e66136506..e33733ecf 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;