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

Stefan Reinauer stepan at coresystems.de
Mon Oct 15 02:57:00 CEST 2007


* 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. I think we should create an abstraction
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.

Stefan

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866




More information about the coreboot mailing list