[LinuxBIOS] M57SLI Rev2.0 SPI - how to add the second bios chip (incl. pictures)

Harald Gutmann harald.gutmann at gmx.net
Mon Oct 15 14:08:01 CEST 2007


Am Montag, 15. Oktober 2007 02:57:00 schrieb Stefan Reinauer:
> * Harald Gutmann <harald.gutmann at gmx.net> [071015 02:16]:
> > > > +static void check_n_write_enable() {
> > > > +	uint8_t result[3] = {0, 0, 0};
> > > > +	uint8_t command[5] = {0x06, 0, 0, 0, 0};
> > > > +	// Send WREN (Write Enable)
> > > > +	it8716f_spi_command(it8716f_flashport, 1, 0, command, result);
> > > > +	uint8_t reg=regval(it8716f_flashport,0x24);
> > > > +	reg|=(1<<4);
> > > > +	regwrite(it8716f_flashport,0x24,reg);
> > > > +}
> >
> > i think some parts here could be done easyer with outb.
>
> This implementation of the MX25L4005 relies heavily on the chip being
> attached to an IT8716F SuperIO.
yes, it does!

> I think we should create an abstraction 
would be good.

> layer (spi_command()? read_spi_status()?) that can be implemented by a
> SuperIO or southbridge that has an SPI bus attached. This way we could
> have fairly generic SPI flash chip drivers (most SPI chips are pretty
> similar too, I think), and they could be used on a new system by just
> implementing the southbridge/SuperIO specific part in some other place.
i also think that the spi programming is fairly generic on SPI flash devices.

>
> Stefan
regards,
Harald








More information about the coreboot mailing list