26 __outbyte (iobase + 0, 0xFF);
27 __outbyte (iobase + 1, 0x1F);
28 __outbyte (iobase + 3,
offset);
29 __outbyte (iobase + 4,
address);
30 __outbyte (iobase + 2, 0x48);
33 limit = __rdtsc () + 2000000000 / 10;
36 status = __inbyte (iobase);
37 if (__rdtsc () > limit)
break;
38 if ((status & 2) == 0)
continue;
39 if ((status & 1) == 1)
continue;
43 buffer [0] = __inbyte (iobase + 5);
44 if (status == 2) status = 0;
59 __outbyte (iobase + 0, 0xFF);
60 __outbyte (iobase + 2, 0x44);
63 limit = __rdtsc () + 2000000000 / 10;
66 status = __inbyte (iobase);
67 if (__rdtsc () > limit)
break;
68 if ((status & 2) == 0)
continue;
69 if ((status & 1) == 1)
continue;
73 buffer [0] = __inbyte (iobase + 5);
74 if (status == 2) status = 0;
93 iobase, SmbusSlaveAddress,
count);
104 for (index = 1; index <
count; index++)
121 __outbyte (ioBase + 0x0E, 66000000 / 400000 / 4);
128 return readspd (ioBase, spdAddress,
buf, len);
static void pm_write16(uint8_t reg, uint16_t value)
#define printk(level,...)
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
u8 buffer[C2P_BUFFER_MAXSIZE]
static int readSmbusByte(int iobase, int address, char *buffer)
static int readSmbusByteData(int iobase, int address, char *buffer, int offset)
int hudson_readSpd(int spdAddress, char *buf, size_t len)
static int readspd(int iobase, int SmbusSlaveAddress, char *buffer, int count)
static void setupFch(int ioBase)