
Hi Liew,
Are you sure that you need this board specific flash driver? Can't you use the common CFI flash driver? What FLASH chips are used on the board?
There is no speed performance in erasing and reading between common CFI flash driver and board specific flash driver, except programming. CFI flash driver needs ~80s to program 1MB data compare to board specific flash driver needs only ~14s. User has a choice to select them either by define or undef CFG_FLASH_CFI in configuration file. If there is a 8MB flash, it would take about 640s compare to 112s. Big different. I might have missed a define for common flash driver in configuration file that might caused slow programming in flash, if I do please let me know.
I think Stefans intention of the question was a little bit different. For the maintainability of U-Boot we should strive to share as many code as possible between different boards, so for quite sometime now we generally(*) encourage people to use the CFI driver in order to achieve this goal.
I am not at all convinced that even a factor of two in programming times can compensate for the added complexity of Yet Another Custom Flash Driver.
What would really be interesting is to find out why the CFI driver is slower. I think fixing this will be a much more worthwhile contribution to U-Boot as a whole.
Thanks Detlev
(*) Wolfgang happily allows exceptions for resource limited setups.