
Wolfgang Denk wrote:
In message 4309F122.5090907@orkun.us you wrote:
The point is you can simply use already available "protect off" mechanism to lift the lock on these sectors instead of defining
You can do this, but I would reject such a broken implementation.
I guess I do not understand what is broken by having to use "protect off" for a flash that auto protects all sectors. If you automatically unlock sectors how do you know that sector X that was explicitly locked or not. I would personally err on being on the safe side and keep it locked until explicitly told by the user to unlock the sectors prior to be written.
I consider unlocking all sectors unconditionally is broken implementation.
U-Boot shall come up with writapble flash, except for the few protected sectors where U-Boot itself lives (plus the environment, plus eventually FPGA images needed to boot the hardware).
What about the sectors that are not in direct use by U-Boot. If I put a lock on a certain sector in Linux I would certainly would like to keep that lock to remain in that state across boot. U-Boot does not have any knowledge of the use of these other sectors and should not make assumptions on their lock/unlock state.
Best regards, Tolunay