06781a5026
The DEVICE_BUSY_TIMEOUT value is described in the Reference Manual as: | Timeout waiting for NAND Ready/Busy or ATA IRQ. Used in WAIT_FOR_READY | mode. This value is the number of GPMI_CLK cycles multiplied by 4096. So instead of multiplying the value in cycles with 4096, we have to divide it by that value. Use DIV_ROUND_UP to make sure we are on the safe side, especially when the calculated value in cycles is smaller than 4096 as typically the case. This bug likely never triggered because any timeout != 0 usually will do. In my case the busy timeout in cycles was originally calculated as 2408, which multiplied with 4096 is 0x968000. The lower 16 bits were taken for the 16 bit wide register field, so the register value was 0x8000. With |
||
---|---|---|
.. | ||
onenand | ||
raw | ||
spi | ||
Kconfig | ||
Makefile | ||
bbt.c | ||
core.c | ||
ecc-mtk.c | ||
ecc-mxic.c | ||
ecc-sw-bch.c | ||
ecc-sw-hamming.c | ||
ecc.c |