summaryrefslogtreecommitdiffstats
path: root/src/usr/i2c/eepromdd.H
diff options
context:
space:
mode:
authorMike Baiocchi <baiocchi@us.ibm.com>2013-08-14 14:26:51 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-10-10 08:58:28 -0500
commit28d2cbbfe962284d1c43129adca2812e215abe71 (patch)
tree76bb37e17a07410b831412cf4b9e86990813cd41 /src/usr/i2c/eepromdd.H
parent84795d15ac8728b2787c67200662db8f2cb2c909 (diff)
downloadtalos-hostboot-28d2cbbfe962284d1c43129adca2812e215abe71.tar.gz
talos-hostboot-28d2cbbfe962284d1c43129adca2812e215abe71.zip
Add More Attribute Support for I2C and EEPROM Drivers
This commit adds more attribute fields to be used in the EEPROM device drivers. The I2C device driver is also being updated so that it can eventually get the desired bus speed from an attribute, as well. Change-Id: I6b609cafdd7ea3b015a4f62009297e0149ba5b84 RTC: 72715 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6116 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/i2c/eepromdd.H')
-rwxr-xr-xsrc/usr/i2c/eepromdd.H17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/usr/i2c/eepromdd.H b/src/usr/i2c/eepromdd.H
index 7464e1881..d30862b62 100755
--- a/src/usr/i2c/eepromdd.H
+++ b/src/usr/i2c/eepromdd.H
@@ -44,10 +44,11 @@ namespace EEPROM
*/
typedef enum
{
- TWO_BYTE_ADDR,
- ONE_BYTE_ADDR,
+ ZERO_BYTE_ADDR = 0,
+ ONE_BYTE_ADDR = 1,
+ TWO_BYTE_ADDR = 2,
LAST_DEVICE_TYPE
-} eeprom_device_t;
+} eeprom_addr_size_t;
/**
* @brief Structure of common parameters needed by different parts of
@@ -60,10 +61,10 @@ typedef struct
uint64_t devAddr;
int64_t chip;
uint64_t offset;
- eeprom_device_t deviceType;
+ eeprom_addr_size_t addrSize;
TARGETING::EntityPath i2cMasterPath;
uint64_t writePageSize; // in bytes
- eeprom_chip_types_t chipTypeEnum;
+ uint64_t devSize_KB; // in kilobytes
} eeprom_addr_t;
/**
@@ -156,8 +157,8 @@ errlHndl_t eepromWrite ( TARGETING::Target * i_target,
* existing buffer (for Writes), or as a separate write operation
* (for Reads).
*
- * @param[out] o_buffer - The buffer to be written as a byte address to
- * the EEPROM device.
+ * @param[in/out] io_buffer - The buffer to be written as a byte address to
+ * the EEPROM device. Must be pre-allocated to MAX_BYTE_ADDR size.
*
* @param[out] o_bufSize - The size of the buffer to be written.
*
@@ -167,7 +168,7 @@ errlHndl_t eepromWrite ( TARGETING::Target * i_target,
* @return errlHndl_t - NULL if successful, otherwise a pointer to the
* error log.
*/
-errlHndl_t eepromPrepareAddress ( void * o_buffer,
+errlHndl_t eepromPrepareAddress ( void * io_buffer,
size_t & o_bufSize,
eeprom_addr_t i_i2cInfo );
OpenPOWER on IntegriCloud