[U-Boot-Users] [PATCH] cfi_flash.c patches

Tolunay Orkun listmember at orkun.us
Fri Aug 19 20:36:30 CEST 2005


Dear Sangmoon,

I've examined your patch for clearing the protection of flash sectors
automatically during flash init. As a matter of fact a similar patch was
also proposed by someone else and I had commented on it as well.

I think this is wrong approach. These sectors are protected for a reason
(to prevent accidental writes - forgetting to enable protection).

You should enable CFG_FLASH_PROTECTION in your board config file. If you
don't do this U-Boot will do software protection of sectors (which is
really for those flash chips with no hardware protection capability) and
"protect off" will not issue unlock commands as you may have witnessed.

CFG_FLASH_PROTECTION will enable the "protect  off" command to disable
protection properly on these sectors as it should.

IMHO, No patch is needed here! Perhaps we need to add a couple of
comment lines in README (DULG?) for documentation purposes. Wolfgang,
can you comment here.

Best regards,
Tolunay

Sangmoon Kim wrote:
> Hi,
> The two patches attached are for drivers/cfi_flash.c.
> 
> cfi_flash-protect.patch adds CFG_FLASH_PROTECT_CLEAR
> because for some flash memories(such as 28F320C3)
> all banks are protected after reset.
> 
> cfi_flash-buffer.patch makes write_buff not to call 
> flash_write_cfibuffer if buffer_size is1.
> Because for flash memories with buffer_size 1,
> buffer write is not supported.
> 
> Regards,
> Sangmoon Kim





More information about the U-Boot mailing list