Author: stepan Date: 2007-02-03 16:23:34 +0100 (Sat, 03 Feb 2007) New Revision: 2548
Modified: trunk/LinuxBIOSv2/src/southbridge/nvidia/mcp55/mcp55_smbus.h Log: Nvidia MCP55 uses CMD to send/receive bytes instead of DAT0, that's the same as broadcom/bcm5785.
Signed-off-by: bxshi bingxunshi@gmail.com Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/LinuxBIOSv2/src/southbridge/nvidia/mcp55/mcp55_smbus.h =================================================================== --- trunk/LinuxBIOSv2/src/southbridge/nvidia/mcp55/mcp55_smbus.h 2007-02-03 10:43:48 UTC (rev 2547) +++ trunk/LinuxBIOSv2/src/southbridge/nvidia/mcp55/mcp55_smbus.h 2007-02-03 15:23:34 UTC (rev 2548) @@ -80,9 +80,7 @@ /* set the device I'm talking too */ outb(((device & 0x7f) << 1)|1 , smbus_io_base + SMBXMITADD); smbus_delay(); - /* set the command/address... */ - outb(0, smbus_io_base + SMBHSTCMD); - smbus_delay(); + /* byte data recv */ outb(0x05, smbus_io_base + SMBHSTPRTCL); smbus_delay(); @@ -95,7 +93,7 @@ global_status_register = inb(smbus_io_base + SMBHSTSTAT) & 0x80; /* lose check */
/* read results of transaction */ - byte = inb(smbus_io_base + SMBHSTDAT0); + byte = inb(smbus_io_base + SMBHSTCMD);
if (global_status_register != 0x80) { // lose check, otherwise it should be 0 return -1; @@ -109,13 +107,14 @@ outb(val, smbus_io_base + SMBHSTDAT0); smbus_delay();
+ /* set the command... */ + outb(val, smbus_io_base + SMBHSTCMD); + smbus_delay(); + /* set the device I'm talking too */ outb(((device & 0x7f) << 1) | 0, smbus_io_base + SMBXMITADD); smbus_delay();
- outb(0, smbus_io_base + SMBHSTCMD); - smbus_delay(); - /* set up for a byte data write */ outb(0x04, smbus_io_base + SMBHSTPRTCL); smbus_delay();