diff options
Diffstat (limited to 'target/linux/ath79')
-rw-r--r-- | target/linux/ath79/patches-4.19/403-mtd_fix_cfi_cmdset_0002_status_check.patch | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/target/linux/ath79/patches-4.19/403-mtd_fix_cfi_cmdset_0002_status_check.patch b/target/linux/ath79/patches-4.19/403-mtd_fix_cfi_cmdset_0002_status_check.patch index eeda620957..702e2a5b09 100644 --- a/target/linux/ath79/patches-4.19/403-mtd_fix_cfi_cmdset_0002_status_check.patch +++ b/target/linux/ath79/patches-4.19/403-mtd_fix_cfi_cmdset_0002_status_check.patch @@ -1,26 +1,24 @@ --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -1634,8 +1634,8 @@ static int __xipram do_write_oneword(str - break; +@@ -1640,7 +1640,7 @@ static int __xipram do_write_oneword(str } -- if (chip_ready(map, adr)) + if (chip_good(map, adr, datum)) - break; -+ if (chip_good(map, adr, datum)) + goto enable_xip; /* Latency issues. Drop the lock, wait a while and retry */ UDELAY(map, chip, adr, 1); -@@ -1651,6 +1651,8 @@ static int __xipram do_write_oneword(str - - ret = -EIO; +@@ -1657,6 +1657,8 @@ static int __xipram do_write_oneword(str + goto retry; + } } + + enable_xip: xip_enable(map, chip, adr); op_done: if (mode == FL_OTP_WRITE) -@@ -2229,7 +2231,6 @@ static int cfi_amdstd_panic_write(struct +@@ -2235,7 +2237,6 @@ static int cfi_amdstd_panic_write(struct return 0; } @@ -28,7 +26,7 @@ /* * Handle devices with one erase region, that only implement * the chip erase command. -@@ -2297,7 +2298,7 @@ static int __xipram do_erase_chip(struct +@@ -2303,7 +2304,7 @@ static int __xipram do_erase_chip(struct } if (chip_good(map, adr, map_word_ff(map))) @@ -37,7 +35,7 @@ if (time_after(jiffies, timeo)) { printk(KERN_WARNING "MTD %s(): software timeout\n", -@@ -2321,6 +2322,7 @@ static int __xipram do_erase_chip(struct +@@ -2327,6 +2328,7 @@ static int __xipram do_erase_chip(struct } } @@ -45,7 +43,7 @@ chip->state = FL_READY; xip_enable(map, chip, adr); DISABLE_VPP(map); -@@ -2393,7 +2395,7 @@ static int __xipram do_erase_oneblock(st +@@ -2399,7 +2401,7 @@ static int __xipram do_erase_oneblock(st } if (chip_good(map, adr, map_word_ff(map))) @@ -54,7 +52,7 @@ if (time_after(jiffies, timeo)) { printk(KERN_WARNING "MTD %s(): software timeout\n", -@@ -2417,6 +2419,7 @@ static int __xipram do_erase_oneblock(st +@@ -2423,6 +2425,7 @@ static int __xipram do_erase_oneblock(st } } |