
Wolfgang, Stefan and Detlev,
The CFG_FLASH_USE_BUFFER_WRITE does not help in this case because the intel flash chip on M5329EVB does not support Buffer Write. (It could be verified by reading the CFI at offset 0x2a)
I were doing an experiment days ago by redirected some of the CFI driver functions to board specific flash driver functions. I replaced flash_write_cfiword() in write_buff() to write_data(). Program the flash for 1MB. flash_add_byte() is ~5s more than total time in board specific flash driver. Replaced the write_data() flash status check in while loop - while ((*addr & (u16) FLASH_STATUS_DONE) != (u16) FLASH_STATUS_DONE) to while(!flash_isset (info, sec, 0, FLASH_STATUS_DONE)), this will add another ~11s.
There are some overhead in the CFI flash driver for non Buffer Write. Anyway, I am going to use the CFI flash driver from now on.
Again. Thanks for yours help and comments.
Regards, TsiChung
-----Original Message----- From: Stefan Roese [mailto:sr@denx.de] Sent: Tuesday, July 03, 2007 3:54 AM To: Liew Tsi Chung-r5aahp Cc: Wolfgang Denk; u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] U-boot ColdFire development
Hi TsiChung,
On Saturday 30 June 2007, Wolfgang Denk wrote:
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
Are you absolutely sure about this? Did you enable CFG_FLASH_USE_BUFFER_WRITE in your board config file?
If yes, then can you please try to explain *why* there is such a speed difference? In general, the CFI driver should be able to do exactly the same what a custom flash driver can do - if there is anything missing, it should be added. Patches welcome.
Yes, I would expect when the write buffering is enabled (Wolfgang mentioned the config option above) the programming speed should be the same to your board specific driver.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================