On Saturday, January 29, 2011 12:00:48 Simon Guinot wrote:
> It is not clear for me how to proceed. Disable the write protection from
> the board setup code could be an idea but a problem is that the SPI flash
> API don't export any helpful method...
> Maybe I should add one ?
> 
> An another idea is disabling the write protection anyway while
> initializing the flash (from the low level macronix driver). It is quite
> straightforward but I don't know if a flash driver is allowed to do
> that. After all, a flash could be protected for some good reasons.

current behavior is for SPI flash drivers to clear all protection bits during 
init.  sst.c does exactly this.

if you wanted to extend the SPI flash API to include protect support as well 
as add a "protect" subcommand to "sf" (all of this would be behind a define 
like CONFIG_SPI_FLASH_PROTECTION), that'd be great.  otherwise, in the short 
term, i'd suggest you implement something like sst_unlock in the macronix 
driver.  i can take care of merging that.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to