[flashrom] [PATCH 2/2] sbxxx: Set SPI clock to 16.5 MHz and disable fast reads.

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Sun Sep 15 16:18:44 CEST 2013


On Sun, 15 Sep 2013 03:07:54 +0200
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> wrote:

> Am 12.09.2013 17:18 schrieb Stefan Tauner:
> > Do not rely on broken firmware to set up the SPI configuration correctly.
> > Some boards fail with flashrom because the firmware chose too high speeds
> > for the alternate SPI mode which flashrom uses. Temporarily change the
> > clock to the lowest common value of 16.5 MHz.
> >
> > Also, disable fast reads just to be safe.
> >
> > Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
> 
> Thanks! One nitpick, otherwise
> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Thanks, r1750.

> > diff --git a/sb600spi.c b/sb600spi.c
> > index febeabb..91268c0 100644
> > --- a/sb600spi.c
> > +++ b/sb600spi.c
> > @@ -272,6 +272,62 @@ static int sb600_spi_send_command(struct flashctx *flash, unsigned int writecnt,
> >  	return 0;
> >  }
> >  
> > +struct spispeed {
> > +	const char *const name;
> > +	const int8_t speed;
> 
> uint8_t instead? That would avoid a type conversion in set_speed().

Yes, probably a typo - at least I cannot remember any rationale :)

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner




More information about the flashrom mailing list