Skip to content

Commit a4ca0c4

Browse files
hcodinamiquelraynal
authored andcommitted
mtd: rawnand: fsmc: Take instruction delay into account
The FSMC NAND controller should apply a delay after the instruction has been issued on the bus. The FSMC NAND controller driver did not handle this delay. Add this waiting delay in the FSMC NAND controller driver. Fixes: 4da712e ("mtd: nand: fsmc: use ->exec_op()") Signed-off-by: Herve Codina <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 36a6598 commit a4ca0c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/mtd/nand/raw/fsmc_nand.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include <linux/clk.h>
1717
#include <linux/completion.h>
18+
#include <linux/delay.h>
1819
#include <linux/dmaengine.h>
1920
#include <linux/dma-direction.h>
2021
#include <linux/dma-mapping.h>
@@ -664,6 +665,9 @@ static int fsmc_exec_op(struct nand_chip *chip, const struct nand_operation *op,
664665
instr->ctx.waitrdy.timeout_ms);
665666
break;
666667
}
668+
669+
if (instr->delay_ns)
670+
ndelay(instr->delay_ns);
667671
}
668672

669673
return ret;

0 commit comments

Comments
 (0)