[U-Boot] non-blocking flash functions - is this possible/acceptable?

Wolfgang Wegner wolfgang at leila.ping.de
Tue Oct 27 16:24:51 CET 2009


On Tue, Oct 27, 2009 at 09:21:25AM -0400, Jerry Van Baren wrote:
> Wolfgang Wegner wrote:
> >Is such a use case generally acceptable in U-Boot, and if so,
> 
> I'll defer to Wolfgang Denk, Stefan Roese, (Scott Wood?), and others for 
> this half.

:-)

> >anybody have an idea how to implement those without all this duplicate
> >code?
> 
> Move the code to the non-blocking functions (which you have already 
> done), and then implement the blocking versions as wrappers that simply 
> call the non-blocking write followed by a loop calling 
> flash_status_check_nb() until the write is complete.  For erase, you 
> would need a loop to do the multi-sector erase as multiple non-blocking 
> + wait operations.

I will try this and see if it looks clean after implementing.

Thanks for the hint.

Regards,
Wolfgang



More information about the U-Boot mailing list