[U-Boot] [PATCH v2 5/5] cgtqmx6eval: Protect the manufacturing information in SPI NOR

Jagan Teki jteki at openedev.com
Sat Sep 26 05:47:51 CEST 2015


On 25 September 2015 at 22:33, Otavio Salvador
<otavio.salvador at ossystems.com.br> wrote:
> Hello Jagan,
>
> On Thu, Sep 24, 2015 at 5:03 PM, Jagan Teki <jteki at openedev.com> wrote:
> ...
>> "sf protect on off len" then based on the offset and len write the
>> protected bits and skips the sectors which are protected by showing
>> warning say "protected sectors will not be erased!" [1]"
>
> What about creating commands doing like this instead?
>
> "sf protect 000" ---> Write 000 to BP2 BP1 BP0 (do not protect any sector)
> "sf protect 001" ---> Write 001 to BP2 BP1 BP0 (protect the last 1/64 sectors)
> ...
> "sf protect 111" ---> Write 111 to BP2 BP1 BP0" (protect all sectors)

This would rather un-obvious implementation, how can use controls
register bits, from user point-of-view flash can be accessed in-terms
of offset, size.

>
> Would this method be acceptable? It much simpler.
>
> I don't think that the proposed "sf protect on off len" would apply to
> the SPI NOR protection layout.

No, it would apply any flash-layout not only for SPI-NOR, in fact it
is much known and acceptable way of implementation - see cfi flash for
example(both in Linux, U-Boot) and same case with SPI-NOR on Linux[1]

>
> Please advise.

[1] https://patchwork.ozlabs.org/patch/513041/

--  Jagan.


More information about the U-Boot mailing list