[U-Boot] non-blocking flash functions - is this possible/acceptable?
Wolfgang Wegner
wolfgang at leila.ping.de
Tue Oct 27 13:51:46 CET 2009
Hi,
we have an update protocol that normally relies on data being
received while the previous block is written to flash.
We hacked our U-Boot to provide non-blocking variants for flash
access for the relevant functions, which are:
flash_status_check_nb()
flash_full_status_check_nb()
flash_erase_nb() (single-sector only)
flash_write_cfibuffer_nb()
write_buff_nb()
Apart from flash_status_check_nb() and flash_erase_nb() (the latter
being reduced to handle only one sector at a time), these are mainly
the same functions as the originals, but use
flash_[full_]status_check_nb()
instead, so there is much duplicate code.
Is such a use case generally acceptable in U-Boot, and if so, does
anybody have an idea how to implement those without all this duplicate
code?
Of course I can also implement this stuff in our board code, but it
seems a bit unlogical to break the flash handling apart and the bloat
would remain, just in a different place.
[I am bringing this topic up because I am trying to prepare patches for
sending to the list, and this one seems to me as a real show-stopper
right now.]
Regards,
Wolfgang
More information about the U-Boot
mailing list