[U-Boot] CFI: flash_write_cfiword() slow

Wolfgang Denk wd at denx.de
Mon Nov 3 21:10:02 CET 2008


Dear Jens Gehrlein,

In message <490EDD63.1010403 at tqs.de> you wrote:
> 
> find_sector() loops through the sector table from the last sector to
> the current sector. And the more sectors the device has, the slower
> the algorithm becomes. And this process for every sector to be 
> programmed. And yes, there are still devices around without (standard) 
> write buffer, e.g. the Samsung K8P2815UQB.

A classic (and  trivial  to  implement)  approach  is  not  to  start
searching  at  the  end, but at the last used sector (assuming search
driection and direction of "growth" are  identical).  This  way,  you
will  typically  find  the  match either immediately or with a single
step.

Maybe you want to give that a try...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A verbal contract isn't worth the paper it's written on.
                                                    -- Samuel Goldwyn


More information about the U-Boot mailing list