[flashrom] [PATCH] Fix unlocking function for most Atmel AT2[56]D* chips.
Stefan Tauner
stefan.tauner at student.tuwien.ac.at
Sun Jun 16 11:47:21 CEST 2013
On Fri, 3 May 2013 22:58:39 +0200
Stefan Tauner <stefan.tauner at student.tuwien.ac.at> wrote:
> I broke unlocking them correctly in r1635 while refactoring (NB: the
> commit log including the overly selfconfident statement about the
> "bug in spi_disable_blockprotect_at25df()").
>
> Affected chips have per sector protection bits and the write protection bits
> in the status register do indicate if none, some or all sectors are protected.
> It is possible to globally (un)lock all sectors at once but in a way that was
> not anticipated when refactoring the spi25 unlocking functions into
> spi_disable_blockprotect_generic(). To globally unprotect not only the
> protection bits (2 and 3) have 0 to be written to them but also bits 4 and 5
> which normally would not be touched by spi_disable_blockprotect_generic().
> Some of the chips also support a permanent lockdown with fuses which we
> do not handle yet.
>
> To fix this without copying the whole method I introduce another mask
> parameter to spi_disable_blockprotect_generic() namely unprotect_mask.
> See verbose comments inline for details.
>
> Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
Hi Chi,
did you ever test this patch? IIRC Joshua tested it with his setup
(Dediprog + some Atmel chip I forgot...) and it worked.
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
More information about the flashrom
mailing list