diff options
Diffstat (limited to 'src/include/usr/i2c/eepromif.H')
-rw-r--r-- | src/include/usr/i2c/eepromif.H | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/src/include/usr/i2c/eepromif.H b/src/include/usr/i2c/eepromif.H index 7300ead04..d4d847777 100644 --- a/src/include/usr/i2c/eepromif.H +++ b/src/include/usr/i2c/eepromif.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -25,6 +25,8 @@ #ifndef __EEPROMIF_H #define __EEPROMIF_H +#include <list> + namespace EEPROM { @@ -38,7 +40,8 @@ typedef enum VPD_BACKUP = 1, SBE_PRIMARY = 2, SBE_BACKUP = 3, - LAST_CHIP_TYPE + LAST_CHIP_TYPE, + FIRST_CHIP_TYPE = VPD_PRIMARY } eeprom_chip_types_t; /** @@ -51,6 +54,34 @@ typedef enum */ bool eepromPresence ( TARGETING::Target * i_target ); +/** + * @brief Define a set of information about all EEPROMs in the + * system (primarily used to populate the devtree) + */ +struct EepromInfo_t +{ + TARGETING::Target* i2cMaster; //< I2C Master chip + uint64_t engine; //< I2C engine (relative to master chip) + uint64_t port; //< I2C port (relative to engine) + uint64_t busFreq; //< Bus speed in Hz + uint64_t devAddr; //< I2C device address (relative to port) + uint64_t sizeKB; //< Size in KB + uint64_t addrBytes; //< Number of bytes required for addressing + eeprom_chip_types_t device; //< Identifies role of eeprom + TARGETING::Target* assocTarg; //< Target associated with this device +}; + +/** + * @brief Return a set of information related to every unique + * EEPROM in the system + * + * @param[out] o_info - list of EEPROM Information + * + * @return errlHndl_t - Null if successful, otherwise a pointer to + * the error log. + */ +void getEEPROMs( std::list<EepromInfo_t>& o_info ); + }; // end namespace EEPROM |