On Mon, Oct 13, 2008 at 11:36 AM, Corey Osgood corey.osgood@gmail.com wrote:
I'm working on vt8237 smbus in v3, and I had a quick question, mostly for Rudolf Marek and Bari, but feel free to jump in with your 2 cents:
u8 smbus_read_byte(u16 dimm, u8 offset, u16 smbus_io_base) { u8 val;
printk(BIOS_SPEW, "SMBus Read from DIMM %1x at address 0x%4x\n", dimm, offset); smbus_reset(smbus_io_base); /* Clear host data port. */ outb(0x00, smbus_io_base + SMBHSTDAT0); //SMBUS_DELAY(); smbus_wait_until_ready(smbus_io_base); dimm = (dimm << 1) | 1; outb(dimm, smbus_io_base + SMBXMITADD);
The dimm = (dimm << 1) | 1 is something that came from a via southbridge porting guide (NOT the one for the vt8237r, I don't have that one). With it, my spd addresses are 0x50, 0x51, etc, without it, they'd be 0xa1, 0xa3, etc. Which would be preferred? Do you think we'd ever need a 0xa0 or 0xa2 address?
stick with 0x50 etc. The SMBUS address is the high 7 bits with opcode in the lowest bit. So a1, a3, etc. are not real addresses. 50 and 51 are.
ron