summaryrefslogtreecommitdiffstats
path: root/src/usr/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/i2c')
-rwxr-xr-xsrc/usr/i2c/i2c.C16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/usr/i2c/i2c.C b/src/usr/i2c/i2c.C
index 63b579202..97334408b 100755
--- a/src/usr/i2c/i2c.C
+++ b/src/usr/i2c/i2c.C
@@ -449,12 +449,13 @@ errlHndl_t i2cPerformOp( DeviceFW::OperationType i_opType,
{
if( (subop==DeviceFW::I2C_SMBUS_BLOCK)
|| (subop==DeviceFW::I2C_SMBUS_BYTE)
- || (subop==DeviceFW::I2C_SMBUS_WORD))
+ || (subop==DeviceFW::I2C_SMBUS_WORD)
+ || (subop == DeviceFW::I2C_SMBUS_WORD_NO_PEC) )
{
args.smbus.commandCode =
static_cast<decltype(args.smbus.commandCode)>(
va_arg(i_args,uint64_t));
- args.smbus.usePec = true; // All implementations use PEC
+ args.smbus.usePec = true; // Most implementations use PEC
args.i2cMuxBusSelector = va_arg(i_args,uint64_t);
args.i2cMuxPath = reinterpret_cast<const TARGETING::EntityPath*>(
va_arg(i_args, uint64_t));
@@ -477,11 +478,18 @@ errlHndl_t i2cPerformOp( DeviceFW::OperationType i_opType,
if ( args.offset_length != 0 )
{
args.offset_buffer = temp;
-
}
}
- args.subop=subop;
+ if (subop == DeviceFW::I2C_SMBUS_WORD_NO_PEC)
+ {
+ args.smbus.usePec = false;
+ args.subop = DeviceFW::I2C_SMBUS_WORD;
+ }
+ else
+ {
+ args.subop=subop;
+ }
err = i2cCommonOp( i_opType,
i_target,
OpenPOWER on IntegriCloud