mtd: rawnand: davinci: Reduce polling interval in NAND_OP_WAITRDY_INSTR
Subsystems (2)
PATCH v3 1/1 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).
---
Changes in v3:
- Set poll interval to 5 us (instead of 0).
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Fix SOB.
- Link to v1: https://lore.kernel.org/r/[email protected]
--- drivers/mtd/nand/raw/davinci_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/davinci_nand.c +1 -1
@@ -724,7 +724,7 @@ static int davinci_nand_exec_instr(struct davinci_nand_info *info,case NAND_OP_WAITRDY_INSTR : timeout_us = instr->ctx.waitrdy.timeout_ms *1000 ; ret =readl_relaxed_poll_timeout (info->base +NANDFSR_OFFSET , - status, status &BIT (0 ),100 , + status, status &BIT (0 ),5 , timeout_us);if (ret)return ret;
---
base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37
change-id: 20241219-patch-nand-poll-b215766ea0a2
Best regards,
Signature · 1 line
Bastien Curutchet <[email protected]>
Quoted 8 lines · Bastien Curutchet
For each
NAND_OP_WAITRDY_INSTRoperation, the NANDFSR register is polled only once every 100 us to check for theEMA_WAITpin. 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_speedby ~30% (~10% on page writes).[...]
Applied to nand/next, thanks!
[1/1] mtd: rawnand: davinci: Reduce polling interval in NAND_OP_WAITRDY_INSTR
commit: 6df2d9553e168fe32dd49873dd254a63ca913307
Patche(s) will be available within hours on:
mtd/linux.git
Kind regards,
Miquèl