diff options
Diffstat (limited to 'src/include/usr')
-rw-r--r-- | src/include/usr/devicefw/driverif.H | 19 | ||||
-rw-r--r-- | src/include/usr/hbotcompid.H | 8 | ||||
-rw-r--r-- | src/include/usr/i2c/eepromddreasoncodes.H | 77 | ||||
-rw-r--r-- | src/include/usr/i2c/i2creasoncodes.H | 19 | ||||
-rw-r--r-- | src/include/usr/initservice/initsvcreasoncodes.H | 1 |
5 files changed, 104 insertions, 20 deletions
diff --git a/src/include/usr/devicefw/driverif.H b/src/include/usr/devicefw/driverif.H index 0c5f874b6..939190459 100644 --- a/src/include/usr/devicefw/driverif.H +++ b/src/include/usr/devicefw/driverif.H @@ -46,6 +46,7 @@ namespace DeviceFW XSCOM = LAST_ACCESS_TYPE, I2C, FSISCOM, + EEPROM, LAST_DRIVER_ACCESS_TYPE }; @@ -85,17 +86,23 @@ namespace DeviceFW /** * Construct the device addressing parameters for the I2C device ops. - * @param[in] i_address - I2C address to access on slave device. * @param[in] i_port - Which port to use from the I2C master. * @param[in] i_engine - Which I2C master engine to use. * @param[in] i_devAddr - The device address on a given engine/port. */ - #define DEVICE_I2C_ADDRESS( i_address, i_port, i_engine, i_devAddr )\ - DeviceFW::I2C, static_cast<uint64_t>(( i_address )),\ - static_cast<uint64_t>(( i_port )),\ - static_cast<uint64_t>(( i_engine )),\ - static_cast<uint64_t>(( i_devAddr )) + #define DEVICE_I2C_ADDRESS( i_port, i_engine, i_devAddr )\ + DeviceFW::I2C, static_cast<uint64_t>(( i_port )),\ + static_cast<uint64_t>(( i_engine )),\ + static_cast<uint64_t>(( i_devAddr )) + /** + * Construct the device addressing parameters for the EEPROM device ops. + * @param[in] i_address - The address of the I2C slave device. + * @param[in] i_chip - The chip number of the EEPROM to access. + */ + #define DEVICE_EEPROM_ADDRESS( i_address, i_chip )\ + DeviceFW::EEPROM, static_cast<uint64_t>(( i_address )),\ + static_cast<uint64_t>(( i_chip )) /** @class InvalidParameterType * @brief Unused type to cause compiler fails for invalid template types. diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H index bc742e230..48d6c71c5 100644 --- a/src/include/usr/hbotcompid.H +++ b/src/include/usr/hbotcompid.H @@ -164,6 +164,14 @@ const compId_t FSISCOM_COMP_ID = 0x0D00; const char FSISCOM_COMP_NAME[] = "fsiscom"; //@} +/** @name EEPROM + * EEPROM device driver component + */ +//@{ +const compId_t EEPROM_COMP_ID = 0x0E00; +const char EEPROM_COMP_NAME[] = "eeprom"; +//@} + // ---------------------------------------------------------- // CXXTEST Unit Test, reserve compid near the end... /** @name CXXTEST diff --git a/src/include/usr/i2c/eepromddreasoncodes.H b/src/include/usr/i2c/eepromddreasoncodes.H new file mode 100644 index 000000000..092f0c5bc --- /dev/null +++ b/src/include/usr/i2c/eepromddreasoncodes.H @@ -0,0 +1,77 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/include/usr/i2c/eepromddreasoncodes.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2011 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END +/** + * @file eepromddreasoncodes.H + * + * @brief Reason codes and module ids for the EEPROM device driver + * + */ +#ifndef __EEPROMDDREASONCODES_H +#define __EEPROMDDREASONCODES_H +// ----------------------------------------------- +// Includes +// ----------------------------------------------- +#include <hbotcompid.H> + +namespace EEPROM +{ + +/** +* @enum eepromModuleid +* +* @brief Module Ids used in created errorlogs. Indicates which +* functions an error log was created in. +* +*/ +enum eepromModuleId +{ + EEPROM_INVALID_MODULE = 0x00, // Invalid Module Id + EEPROM_PERFORM_OP = 0x01, + EEPROM_READ = 0x02, + EEPROM_WRITE = 0x03, + EEPROM_PREPAREADDRESS = 0x04, + EEPROM_READATTRIBUTES = 0x05, + EEPROM_GETI2CMASTERTARGET = 0x06, +}; + +/** + * @enum eepromReasonCode + * + * @brief Reasoncodes used to describe what errors are being indicated. + * + */ +enum eepromReasonCode +{ + EEPROM_INVALID_REASONCODE = EEPROM_COMP_ID | 0x00, // Invalid Reasoncode + EEPROM_INVALID_OPERATION = EEPROM_COMP_ID | 0x01, + EEPROM_INVALID_DEVICE_TYPE = EEPROM_COMP_ID | 0x02, + EEPROM_ADDR_INFO0_NOT_FOUND = EEPROM_COMP_ID | 0x03, + EEPROM_ADDR_INFO1_NOT_FOUND = EEPROM_COMP_ID | 0x04, + EEPROM_INVALID_CHIP = EEPROM_COMP_ID | 0x05, + EEPROM_DIMM_I2C_MASTER_PATH_ERROR = EEPROM_COMP_ID | 0x06, + EEPROM_TARGET_NULL = EEPROM_COMP_ID | 0x07, +}; + +}; // end EEPROM + +#endif diff --git a/src/include/usr/i2c/i2creasoncodes.H b/src/include/usr/i2c/i2creasoncodes.H index 52b65770e..ce2af7327 100644 --- a/src/include/usr/i2c/i2creasoncodes.H +++ b/src/include/usr/i2c/i2creasoncodes.H @@ -66,20 +66,11 @@ enum i2cReasonCode I2C_INVALID_REASONCODE = I2C_COMP_ID | 0x00, // Invalid Reasoncode I2C_INVALID_DATA_BUFFER = I2C_COMP_ID | 0x01, // Invalid Data Buffer pointer I2C_INVALID_OP_TYPE = I2C_COMP_ID | 0x02, // Invalid Operation type - I2C_INVALID_COMMAND = I2C_COMP_ID | 0x03, // Invalid Command Status - I2C_LBUS_PARITY_ERROR = I2C_COMP_ID | 0x04, // Local Bus Parity Error - I2C_BACKEND_OVERRUN_ERROR = I2C_COMP_ID | 0x05, // Backend overrun Error - I2C_BACKEND_ACCESS_ERROR = I2C_COMP_ID | 0x06, // Backend access Error - I2C_ARBITRATION_LOST_ERROR = I2C_COMP_ID | 0x07, // Arbitration lost - I2C_NACK_RECEIVED = I2C_COMP_ID | 0x08, // NACK Received - I2C_DATA_REQUEST = I2C_COMP_ID | 0x09, // Data Request - I2C_STOP_ERROR = I2C_COMP_ID | 0x0A, // Stop Error - I2C_INTERRUPT = I2C_COMP_ID | 0x0B, // Interrupt Present - TODO - more to be added when bad machine path code is added. - I2C_FIFO_TIMEOUT = I2C_COMP_ID | 0x0C, // Timed out waiting on FIFO - I2C_BUS_NOT_READY = I2C_COMP_ID | 0x0D, // Bus Not ready - I2C_CMD_COMP_TIMEOUT = I2C_COMP_ID | 0x0E, // Timeout waiting for Cmd Complete - I2C_HW_ERROR_FOUND = I2C_COMP_ID | 0x0F, // Error found in Status register - I2C_MASTER_SENTINEL_TARGET = I2C_COMP_ID | 0x10, // Master Sentinel used as target + I2C_FIFO_TIMEOUT = I2C_COMP_ID | 0x03, // Timed out waiting on FIFO + I2C_BUS_NOT_READY = I2C_COMP_ID | 0x04, // Bus Not ready + I2C_CMD_COMP_TIMEOUT = I2C_COMP_ID | 0x05, // Timeout waiting for Cmd Complete + I2C_HW_ERROR_FOUND = I2C_COMP_ID | 0x06, // Error found in Status register + I2C_MASTER_SENTINEL_TARGET = I2C_COMP_ID | 0x07, // Master Sentinel used as target }; }; // end I2C diff --git a/src/include/usr/initservice/initsvcreasoncodes.H b/src/include/usr/initservice/initsvcreasoncodes.H index d3ccc37fb..2f61cd460 100644 --- a/src/include/usr/initservice/initsvcreasoncodes.H +++ b/src/include/usr/initservice/initsvcreasoncodes.H @@ -62,6 +62,7 @@ enum InitServiceModuleID START_FSIDD_ERRL_ID = 0x16, START_FSISCOM_ERRL_ID = 0x17, START_TARGETING_ERRL_ID = 0x18, + START_I2C_ERRL_ID = 0x19, // Internal InitService codes |