summaryrefslogtreecommitdiffstats
path: root/src/include/usr/i2c/eepromif.H
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2015-01-12 10:26:06 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-02-11 12:27:46 -0600
commit52561adeaa1c8d846e363d8386ca99a1ad89196b (patch)
treed4df89c98939044536f0262bd08ae8fa4c0dbb0d /src/include/usr/i2c/eepromif.H
parent35019a5b9b1916840c5551acd758bcded0596dc9 (diff)
downloadtalos-hostboot-52561adeaa1c8d846e363d8386ca99a1ad89196b.tar.gz
talos-hostboot-52561adeaa1c8d846e363d8386ca99a1ad89196b.zip
Report I2C devices in devtree
Report all I2C masters, busses and end devices in the devtree. Current support includes the following devices: -Processor module vpd (primary and backup) -Processor SBE SEEPROM (x2) -Memory buffer VPD -DIMM SPD Change-Id: Ic0e08c208331ce9701de27111cc2e9f54a81fcf7 RTC: 117996 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15203 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/i2c/eepromif.H')
-rw-r--r--src/include/usr/i2c/eepromif.H35
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
OpenPOWER on IntegriCloud