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> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2548 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
de7f81f48a
commit
c5708d19fd
|
@ -80,9 +80,7 @@ static int do_smbus_recv_byte(unsigned smbus_io_base, unsigned device)
|
||||||
/* set the device I'm talking too */
|
/* set the device I'm talking too */
|
||||||
outb(((device & 0x7f) << 1)|1 , smbus_io_base + SMBXMITADD);
|
outb(((device & 0x7f) << 1)|1 , smbus_io_base + SMBXMITADD);
|
||||||
smbus_delay();
|
smbus_delay();
|
||||||
/* set the command/address... */
|
|
||||||
outb(0, smbus_io_base + SMBHSTCMD);
|
|
||||||
smbus_delay();
|
|
||||||
/* byte data recv */
|
/* byte data recv */
|
||||||
outb(0x05, smbus_io_base + SMBHSTPRTCL);
|
outb(0x05, smbus_io_base + SMBHSTPRTCL);
|
||||||
smbus_delay();
|
smbus_delay();
|
||||||
|
@ -95,7 +93,7 @@ static int do_smbus_recv_byte(unsigned smbus_io_base, unsigned device)
|
||||||
global_status_register = inb(smbus_io_base + SMBHSTSTAT) & 0x80; /* lose check */
|
global_status_register = inb(smbus_io_base + SMBHSTSTAT) & 0x80; /* lose check */
|
||||||
|
|
||||||
/* read results of transaction */
|
/* 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
|
if (global_status_register != 0x80) { // lose check, otherwise it should be 0
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -109,11 +107,12 @@ static int do_smbus_send_byte(unsigned smbus_io_base, unsigned device, unsigned
|
||||||
outb(val, smbus_io_base + SMBHSTDAT0);
|
outb(val, smbus_io_base + SMBHSTDAT0);
|
||||||
smbus_delay();
|
smbus_delay();
|
||||||
|
|
||||||
/* set the device I'm talking too */
|
/* set the command... */
|
||||||
outb(((device & 0x7f) << 1) | 0, smbus_io_base + SMBXMITADD);
|
outb(val, smbus_io_base + SMBHSTCMD);
|
||||||
smbus_delay();
|
smbus_delay();
|
||||||
|
|
||||||
outb(0, smbus_io_base + SMBHSTCMD);
|
/* set the device I'm talking too */
|
||||||
|
outb(((device & 0x7f) << 1) | 0, smbus_io_base + SMBXMITADD);
|
||||||
smbus_delay();
|
smbus_delay();
|
||||||
|
|
||||||
/* set up for a byte data write */
|
/* set up for a byte data write */
|
||||||
|
|
Loading…
Reference in New Issue