On Mon, Oct 15, 2007 at 02:57:00AM +0200, Stefan Reinauer wrote:
> * Harald Gutmann <[EMAIL PROTECTED]> [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.

Full ack.


Uwe.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org

Attachment: signature.asc
Description: Digital signature

-- 
linuxbios mailing list
linuxbios@linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

Reply via email to