summaryrefslogtreecommitdiffstats
path: root/src/usr/i2c/i2c.C
diff options
context:
space:
mode:
authorMike Baiocchi <mbaiocch@us.ibm.com>2019-03-22 13:56:33 -0500
committerNicholas E. Bofferding <bofferdn@us.ibm.com>2019-03-26 10:38:01 -0500
commit72fc1da005b7f17ca181a826e8c2559e843e45e3 (patch)
treee1d02ee657e93622da567caf293bed244411f403 /src/usr/i2c/i2c.C
parentffdc6b255981c8b52e3f5513425ebbaa8dfeb675 (diff)
downloadtalos-hostboot-72fc1da005b7f17ca181a826e8c2559e843e45e3.tar.gz
talos-hostboot-72fc1da005b7f17ca181a826e8c2559e843e45e3.zip
Invoke UCD Update Algorithm on UCD Devices
This commit invokes the full UCD update algorithm on all UCD9090 and UCD90120A devices found in ZZ and Zeppelin systems. The algorithm is based on walking through a pre-processed update binary per UCD device and calling the appropriate SMBUS device operations. Change-Id: I626df3612260d505e65a22d0620b65216d00c65f RTC:205979 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/74887 Reviewed-by: Matthew Raybuck <matthew.raybuck@ibm.com> Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Diffstat (limited to 'src/usr/i2c/i2c.C')
-rwxr-xr-xsrc/usr/i2c/i2c.C8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/usr/i2c/i2c.C b/src/usr/i2c/i2c.C
index 7f696c4e6..88233dadb 100755
--- a/src/usr/i2c/i2c.C
+++ b/src/usr/i2c/i2c.C
@@ -1452,7 +1452,6 @@ errlHndl_t i2cCommonOp( DeviceFW::OperationType i_opType,
|| (i_args.subop == DeviceFW::I2C_SMBUS_WORD)))
{
// Note: The SMBUS spec calls a 2 byte value a "word"
-
TRACUCOMP(g_trac_i2c, INFO_MRK
"I2C SMBUS Write %s: Command code = 0x%02X, "
"Use PEC = %d.",
@@ -1542,9 +1541,9 @@ errlHndl_t i2cCommonOp( DeviceFW::OperationType i_opType,
{
TRACUCOMP(g_trac_i2c, INFO_MRK
"I2C SMBUS Block Write: Command code = 0x%02X, "
- "Use PEC = %d.",
+ "Use PEC = %d. io_buflen = %d",
i_args.smbus.commandCode,
- i_args.smbus.usePec);
+ i_args.smbus.usePec, io_buflen);
// If requested length is for < 1 byte or > 255 bytes for a block
// write transaction, throw an error.
@@ -1622,7 +1621,6 @@ errlHndl_t i2cCommonOp( DeviceFW::OperationType i_opType,
|| (i_args.subop == DeviceFW::I2C_SMBUS_WORD)))
{
// Note: The SMBUS spec calls a 2 byte value a "word"
-
TRACUCOMP(g_trac_i2c, INFO_MRK
"I2C SMBUS Read %s: Command code = 0x%02X, "
"Use PEC = %d",
@@ -2671,7 +2669,7 @@ errlHndl_t i2cWrite ( TARGETING::Target * i_target,
break;
}
- for( bytesWritten = 0x0; bytesWritten < io_buflen; bytesWritten++ )
+ for( bytesWritten = 0x0; bytesWritten < io_buflen; ++bytesWritten )
{
// Wait for FIFO space to be available for the write
err = i2cWaitForFifoSpace( i_target,
OpenPOWER on IntegriCloud