summaryrefslogtreecommitdiffstats
path: root/src/usr/i2c/i2c.C
diff options
context:
space:
mode:
authorElizabeth Liner <eliner@us.ibm.com>2017-04-26 17:50:38 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-05-04 09:49:08 -0400
commit651ed35f1c045ea0c52ac659f9c27d757a351877 (patch)
tree5028db7400980000782a4faffebac314c5d77bbf /src/usr/i2c/i2c.C
parentc5e7b264aa4708fd9641a287a53441390bf2b325 (diff)
downloadtalos-hostboot-651ed35f1c045ea0c52ac659f9c27d757a351877.tar.gz
talos-hostboot-651ed35f1c045ea0c52ac659f9c27d757a351877.zip
ProcessMRW changes for dynamic i2c devices
HDAT has a requirement from hostboot to provide I2C information from the connections in the mrw. This change pulls the changes out of the mrw and stores them under the master proc target. Each index in the arrays created is a separate connection. The information is then pulled out in i2c.C getDeviceInfo() Change-Id: I725278bc482131a65b8cfb565e08ff0a37f4cb30 RTC:165485 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39737 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/i2c/i2c.C')
-rwxr-xr-xsrc/usr/i2c/i2c.C12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/usr/i2c/i2c.C b/src/usr/i2c/i2c.C
index 835d9ea48..38924975b 100755
--- a/src/usr/i2c/i2c.C
+++ b/src/usr/i2c/i2c.C
@@ -3854,9 +3854,6 @@ void getDeviceInfo( TARGETING::Target* i_i2cMaster,
case EEPROM::VPD_BACKUP:
l_currentDI.devicePurpose =
TARGETING::HDAT_I2C_DEVICE_PURPOSE_MODULE_VPD;
- //TODO RTC:165485 this isn't currently right. we'll need
- //to add the changes in the enum and possibly the other
- //struct/attribute.
break;
case EEPROM::SBE_PRIMARY:
case EEPROM::SBE_BACKUP:
@@ -3941,8 +3938,8 @@ void getDeviceInfo( TARGETING::Target* i_i2cMaster,
TARGETING::ATTR_HDAT_I2C_MASTER_PORT_type l_i2cMasterPort;
(*childItr)->tryGetAttr<TARGETING::ATTR_HDAT_I2C_MASTER_PORT>(
l_i2cMasterPort);
- TARGETING::ATTR_HDAT_I2C_DEVTYPE_type l_i2cDevType;
- (*childItr)->tryGetAttr<TARGETING::ATTR_HDAT_I2C_DEVTYPE>(
+ TARGETING::ATTR_HDAT_I2C_DEVICE_TYPE_type l_i2cDevType;
+ (*childItr)->tryGetAttr<TARGETING::ATTR_HDAT_I2C_DEVICE_TYPE>(
l_i2cDevType);
TARGETING::ATTR_HDAT_I2C_ADDR_type l_i2cAddr;
(*childItr)->tryGetAttr<TARGETING::ATTR_HDAT_I2C_ADDR>(l_i2cAddr);
@@ -3952,8 +3949,8 @@ void getDeviceInfo( TARGETING::Target* i_i2cMaster,
TARGETING::ATTR_HDAT_I2C_BUS_FREQ_type l_i2cBusFreq;
(*childItr)->tryGetAttr<TARGETING::ATTR_HDAT_I2C_BUS_FREQ>(
l_i2cBusFreq);
- TARGETING::ATTR_HDAT_I2C_DEV_PURPOSE_type l_i2cDevPurpose;
- (*childItr)->tryGetAttr<TARGETING::ATTR_HDAT_I2C_DEV_PURPOSE>(
+ TARGETING::ATTR_HDAT_I2C_DEVICE_PURPOSE_type l_i2cDevPurpose;
+ (*childItr)->tryGetAttr<TARGETING::ATTR_HDAT_I2C_DEVICE_PURPOSE>(
l_i2cDevPurpose);
uint8_t l_arrayLength =
@@ -3969,6 +3966,7 @@ void getDeviceInfo( TARGETING::Target* i_i2cMaster,
l_idx++)
{
DeviceInfo_t l_currentDevice;
+ l_currentDevice.masterChip = (*childItr);
l_currentDevice.engine = l_i2cEngine[l_idx];
l_currentDevice.masterPort = l_i2cMasterPort[l_idx];
l_currentDevice.addr = l_i2cAddr[l_idx];
OpenPOWER on IntegriCloud