diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-07-04 20:28:58 +0200 |
---|---|---|
committer | Zoltan HERPAI <wigyori@uid0.hu> | 2016-07-04 20:28:58 +0200 |
commit | 5e2a11f9b72d828141e9b9ea22277c1d64db47f8 (patch) | |
tree | b36dddc396031d7f0eeb421e2bd747c658e17482 | |
parent | afc13094badfef7d8182b8dc656d387a51b2f1cd (diff) | |
download | master-187ad058-5e2a11f9b72d828141e9b9ea22277c1d64db47f8.tar.gz master-187ad058-5e2a11f9b72d828141e9b9ea22277c1d64db47f8.tar.bz2 master-187ad058-5e2a11f9b72d828141e9b9ea22277c1d64db47f8.zip |
mvebu: add a patch to deal with excessive latencies/delays during flash PIO command processing
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | target/linux/mvebu/patches-4.4/110-pxa3xxx_nand-handle-PIO-delays.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-4.4/110-pxa3xxx_nand-handle-PIO-delays.patch b/target/linux/mvebu/patches-4.4/110-pxa3xxx_nand-handle-PIO-delays.patch new file mode 100644 index 0000000000..7fa56970c1 --- /dev/null +++ b/target/linux/mvebu/patches-4.4/110-pxa3xxx_nand-handle-PIO-delays.patch @@ -0,0 +1,36 @@ +Handle delays/excessive latency during flash command processing with PIO. + +Signed-off-by: Felix Fietkau <nbd@nbd.name> + +--- a/drivers/mtd/nand/pxa3xx_nand.c ++++ b/drivers/mtd/nand/pxa3xx_nand.c +@@ -227,6 +227,7 @@ struct pxa3xx_nand_info { + int use_dma; /* use DMA ? */ + int use_spare; /* use spare ? */ + int need_wait; ++ int pio_progress; + + /* Amount of real data per full chunk */ + unsigned int chunk_size; +@@ -769,6 +770,7 @@ static irqreturn_t pxa3xx_nand_irq_threa + { + struct pxa3xx_nand_info *info = data; + ++ info->pio_progress = 1; + handle_data_pio(info); + + info->state = STATE_CMD_DONE; +@@ -1175,8 +1177,13 @@ static void nand_cmdfunc(struct mtd_info + info->need_wait = 1; + pxa3xx_nand_start(info); + ++retry: ++ info->pio_progress = 0; + if (!wait_for_completion_timeout(&info->cmd_complete, + CHIP_DELAY_TIMEOUT)) { ++ if (info->pio_progress) ++ goto retry; ++ + dev_err(&info->pdev->dev, "Wait time out!!!\n"); + /* Stop State Machine for next command cycle */ + pxa3xx_nand_stop(info); |