Skip to content

Commit 6df2d95

Browse files
bastien-curutchetmiquelraynal
authored andcommitted
mtd: rawnand: davinci: Reduce polling interval in NAND_OP_WAITRDY_INSTR
For each NAND_OP_WAITRDY_INSTR operation, the NANDFSR register is polled only once every 100 us to check for the EMA_WAIT pin. This isn't frequent enough and causes delays in NAND accesses. Set the polling interval to 5 us. It increases the page read speed reported by flash_speed by ~30% (~10% on page writes). Signed-off-by: Bastien Curutchet <[email protected]> Signed-off-by: Miquel Raynal <[email protected]>
1 parent b937186 commit 6df2d95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/nand/raw/davinci_nand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ static int davinci_nand_exec_instr(struct davinci_nand_info *info,
736736
case NAND_OP_WAITRDY_INSTR:
737737
timeout_us = instr->ctx.waitrdy.timeout_ms * 1000;
738738
ret = readl_relaxed_poll_timeout(info->base + NANDFSR_OFFSET,
739-
status, status & BIT(0), 100,
739+
status, status & BIT(0), 5,
740740
timeout_us);
741741
if (ret)
742742
return ret;

0 commit comments

Comments
 (0)