[RFC] spi-nor: Use different timeout values for write and erase operations

Andrey Smirnov andrew.smirnov at gmail.com
Sat Feb 6 19:19:04 PST 2016


On Sat, Feb 6, 2016 at 12:23 PM, Andrey Smirnov
<andrew.smirnov at gmail.com> wrote:
> Some chips take longer than 40 seconds to perform certain
> operations. One concrete example would be M25P128 that, according to
> its spec, can take up to 250 seconds to perform a chip erase.
>
> This commit:
>
>      - Adds 'wait_time` parameter to spi_nor_wait_till_ready() so that
>        each individual caller of would be able to use custom timeout
>
>      - Adds timings information to flash_info and nor_spi structures
>        to specify sector and chip erase timeouts
>
>      - Modifies the code of spi_nor_erase() to make use of previously
>        mentioned changes
>
> Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>


I was pointed to a kernel patch that solves the same problem in a less
verbose way:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09b6a377687b885565339e60bc62566433a0406f

so instead of going with what's in my RFC I think I'll port those
kernel changes to Barebox.

Sorry for the noise.

Andrey



More information about the barebox mailing list