diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2016-09-28 09:39:55 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-10-16 21:45:43 -0400 |
commit | 560a3667e8a581005586f9c731bfa5c1fe0e911d (patch) | |
tree | 7eb981aa83d018bcfb41d2122e32b19825b55673 /src/include/usr/i2c | |
parent | af6a053e12c60b67a951b578275ce2e0968de344 (diff) | |
download | talos-hostboot-560a3667e8a581005586f9c731bfa5c1fe0e911d.tar.gz talos-hostboot-560a3667e8a581005586f9c731bfa5c1fe0e911d.zip |
Add interfaces for HDAT to fetch new data
New interfaces added:
I2C::getDeviceInfo()
IPMI::getBmcInfo()
CONSOLE::getUartInfo()
New attributes:
SYSTEM_FAMILY
SYSTEM_TYPE
Change-Id: I7d1a018c01067a19b8a66f853e11922c910fcc54
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30405
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Elizabeth K. Liner <eliner@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/i2c')
-rw-r--r-- | src/include/usr/i2c/i2cif.H | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/src/include/usr/i2c/i2cif.H b/src/include/usr/i2c/i2cif.H index ccedce873..e7f8cfac1 100644 --- a/src/include/usr/i2c/i2cif.H +++ b/src/include/usr/i2c/i2cif.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -203,6 +203,71 @@ errlHndl_t i2cDisableSensorCache( TARGETING::Target * i_target, errlHndl_t i2cEnableSensorCache( TARGETING::Target * i_target ); #endif //__HOSTBOOT_RUNTIME + +/** + * Enumeration that defines possible I2C device types + */ +enum DeviceType_t +{ + //@TODO-RTC:161649-Map these directly to some HDAT constants? + // Or something from MRW? + DEVTYPE_955x = 0x01, + DEVTYPE_SEEPROM = 0x02, + DEVTYPE_NUVOTON_TPM = 0x03, + DEVTYPE_MEX_FPGA = 0x04, + DEVTYPE_UCX90XX = 0x05, + DEVTYPE_UNKNOWN = 0xFF, +}; + +/** + * Enumeration that defines possible I2C device purposes + */ +enum DevicePurpose_t +{ + //@TODO-RTC:161649-Map these directly to some HDAT constants? + // Or something from MRW? + PURPOSE_CABLE_CARD_PRES = 0x01, + PURPOSE_CABLE_CARD_POWER_SENSE = 0x02, + PURPOSE_CABLE_CARD_POWER_CONTROL = 0x03, + PURPOSE_TPM = 0x04, + PURPOSE_MODULE_VPD = 0x05, + PURPOSE_DOMM_SPD = 0x06, + PURPOSE_PROC_MODULE_VPD = 0x07, + PURPOSE_SBE_SEEPROM = 0x08, + PURPOSE_PLANAR_VPD = 0x09, + PURPOSE_PCI_HOTPLUG = 0x0A, + PURPOSE_UNKNOWN = 0xFF, +}; + +/** + * Structure to return I2C information in + */ +struct DeviceInfo_t +{ + //@TODO-RTC:161649-Add more details/comments + TARGETING::Target* masterChip; + uint8_t engine; + uint8_t masterPort; + DeviceType_t deviceType; + uint8_t addr; //Is this left-shifted or not? + uint8_t slavePort; + uint8_t busFreqKhz; + DevicePurpose_t devicePurpose; +}; + +/** + * Retrieve some information about I2C devices that the Host + * needs to know about. + * + * @param[in] i_i2cMaster I2C master to query, pass in NULL + * to get a system-wide list + * @param[out] o_deviceInfo list of I2C device structures + * + * @return <none> + */ +void getDeviceInfo( TARGETING::Target* i_i2cMaster, + std::vector<DeviceInfo_t>& o_deviceInfo ); + }; // end namespace I2C #endif // end __I2CIF_H |