[LinuxBIOS] GA-M57SLI SPI support
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Sun Sep 23 22:30:49 CEST 2007
Can somebody with the GA-M57SLI v2.0 try the following code snippet and
post the output? Code may not compile/link etc.
#include <stdint.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
uint8_t busy, data0, data1, data2;
do {
busy = inb(0x0820) & 0x80;
} while (busy);
/* RDID */
outb(0x0820+1, 0x9f);
/* Start IO, 33MHz, 3 input bytes, 0 output bytes*/
outb(0x0820, (0x5<<4)|(0x3<<2)|(0x0));
data0 = inb(0x0820+5);
data1 = inb(0x0820+6);
data2 = inb(0x0820+7);
printf("RDID returned %02x %02x %02x\n", data0, data1, data2);
return 0;
}
Carl-Daniel
More information about the coreboot
mailing list