diff options
author | Elizabeth Liner <eliner@us.ibm.com> | 2017-04-26 17:50:38 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-06-30 10:18:06 -0400 |
commit | 3cce42179f9e5494ae832b00cd84dd10669d9029 (patch) | |
tree | 70bf138d46690c9905e0ad60a0842da18097a4b4 /src/usr/i2c/i2c.C | |
parent | addad359a11b8f624cf7503dbb830785788a06fd (diff) | |
download | talos-hostboot-3cce42179f9e5494ae832b00cd84dd10669d9029.tar.gz talos-hostboot-3cce42179f9e5494ae832b00cd84dd10669d9029.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: I378ef6520dc6d32ef623fd438e73881ce928b37d
RTC:165485
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42363
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/i2c/i2c.C')
-rwxr-xr-x | src/usr/i2c/i2c.C | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/usr/i2c/i2c.C b/src/usr/i2c/i2c.C index 0c9215387..e969bae78 100755 --- a/src/usr/i2c/i2c.C +++ b/src/usr/i2c/i2c.C @@ -3858,9 +3858,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: @@ -3946,8 +3943,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); @@ -3957,8 +3954,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 = @@ -3974,6 +3971,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]; |