9 #include <vendorcode/amd/include/Porting.h>
24 int offset,
int initial_offset)
26 unsigned int status = -1;
32 if (
offset == initial_offset) {
44 while (__rdtsc() <= time_limit) {
82 static UINT8
readspd(UINT16 iobase, UINT8 SmbusSlaveAddress,
char *
buffer,
87 UINT8 initial_offset = 0;
91 for (index = initial_offset; index <
count; index++) {
103 int ioBase = SMBUS0_BASE_ADDRESS;
105 return readspd (ioBase, spdAddress,
buf, len);
u8 buffer[C2P_BUFFER_MAXSIZE]
#define MAX_READ_TSC_COUNT
#define SMBUS_READ_COMMAND
#define STATUS__COMPLETED_SUCCESSFULLY
#define SMBUS_HOST_CMD_REG
#define SMBUS_BAR_LOW_BYTE
#define SMBUS_FREQUENCY_CONST
#define SMBUS_SLAVE_STATUS_REG
#define SMBUS_BAR_HIGH_BYTE
#define SMBUS_CONTROL_REG
#define SMBUS_READ_BYTE_COMMAND
#define SMBUS_COMMAND_REG
#define SMBUS_INTERRUPT_MASK
static void setupFch(UINT16 ioBase)
static UINT8 readSmbusByte(UINT16 iobase, UINT8 address, char *buffer, int offset, int initial_offset)
Read a single SPD byte.
int smbus_readSpd(int spdAddress, char *buf, size_t len)
static UINT8 readspd(UINT16 iobase, UINT8 SmbusSlaveAddress, char *buffer, UINT16 count)
Read one or more SPD bytes from a DIMM.
static void writePmReg(UINT8 reg, UINT8 data)