[flashrom] Tagging all EWSR chips correctly (was: [PATCH] spi25.c: Refactor spi_write_status_register helpers.)

Steven Zakulec spzakulec at gmail.com
Mon Mar 26 04:24:01 CEST 2012


On Tue, Feb 7, 2012 at 7:25 PM, Stefan Tauner <
stefan.tauner at student.tuwien.ac.at> wrote:

> On Tue, 07 Feb 2012 23:31:50 +0100
> Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> wrote:
>
> > Ahem. Once we do the per-region unlock dance, this will be extremely
> > painful. We have three choices:
> > - Keep that part of the code as is. Not good.
> > - Spit out that message for every status register write. Not good.
> > - Fix all flash chip definitions. Good, but separate patch.
> > How do we proceed?
>
> fixing the stuff that needs fixing, of course.
>
> steve said he might look into it, so this is what has to be done:
> i have attached a file containing what seems to be the spi chips
> without correctly set feature_bits fields. we need to check the
> datasheets for the opcodes needed to enable writing to the status
> register. normally this is either WREN (write enable) or EWSR (enable
> write status register), or both.
> currently we are only interested in the non-volatile bits of the status
> register, but there are chips that require another write enable command
> for the volatile bits. if anyone creates a spreadsheet, he should
> probably note those too if feasible or maybe even add a comment in the
> patch.
>
> the field should be added after page_size and either set to:
>                .feature_bits   = FEATURE_WRSR_EWSR
> or
>                .feature_bits   = FEATURE_WRSR_EITHER
> if EWSR and WREN are allowed (all other SPI chips are already set
> to FEATURE_WRSR_WREN). in the case we encounter a chip that does use
> something else a comment should suffice for the time being.
>
> we could also split the work up, if it takes too long otherwise...
> --
> Kind regards/Mit freundlichen Grüßen, Stefan Tauner
>

I have tagged all of the ones in this list Stefan gave me except the Sanyo
one (no datasheet- apparently not a new issue either).

If there are any questions or comments, please send them.

Signed-off-by: Steven Zakulec <spzakulec at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20120325/9c458b99/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spi-write-enable.patch
Type: text/x-patch
Size: 20387 bytes
Desc: not available
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20120325/9c458b99/attachment.patch>


More information about the flashrom mailing list