summaryrefslogtreecommitdiffstats
path: root/src/include/usr/targeting
diff options
context:
space:
mode:
authorTerry J. Opie <opiet@us.ibm.com>2011-08-05 08:51:38 -0500
committerTerry J. Opie <opiet@us.ibm.com>2011-08-15 13:57:29 -0500
commitfa0113e4599fcca0c2d4c938c88d445d288a952a (patch)
treeca797228d6c31b9dcd3ed617f7a82e77d9e27138 /src/include/usr/targeting
parentb0ceda93e7d5b6b06465a5fcc0b261a52dad987d (diff)
downloadtalos-hostboot-fa0113e4599fcca0c2d4c938c88d445d288a952a.tar.gz
talos-hostboot-fa0113e4599fcca0c2d4c938c88d445d288a952a.zip
I2C Device Driver Skeleton
Change-Id: I0b092ea67e5bb8789378041c8c3a6a3f5cf3025e Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/242 Reviewed-by: Terry J. Opie <opiet@us.ibm.com> Tested-by: Jenkins Server
Diffstat (limited to 'src/include/usr/targeting')
-rw-r--r--src/include/usr/targeting/attributeenums.H1
-rw-r--r--src/include/usr/targeting/attributestructs.H14
-rw-r--r--src/include/usr/targeting/attributetraits.H8
3 files changed, 23 insertions, 0 deletions
diff --git a/src/include/usr/targeting/attributeenums.H b/src/include/usr/targeting/attributeenums.H
index 643d6d230..c4cd5c28a 100644
--- a/src/include/usr/targeting/attributeenums.H
+++ b/src/include/usr/targeting/attributeenums.H
@@ -46,6 +46,7 @@ enum ATTRIBUTE_ID
ATTR_XSCOM_CHIP_INFO = 0x0A,
ATTR_INBAND_SCOM_CHIP_INFO = 0x0B,
ATTR_FSI_SCOM_CHIP_INFO = 0x0C,
+ ATTR_I2C_CHIP_INFO = 0x0D,
ATTR_DUMMY_WO = 0xFD,
ATTR_DUMMY_RO = 0xFE,
diff --git a/src/include/usr/targeting/attributestructs.H b/src/include/usr/targeting/attributestructs.H
index e24d5dc71..88e35add9 100644
--- a/src/include/usr/targeting/attributestructs.H
+++ b/src/include/usr/targeting/attributestructs.H
@@ -81,6 +81,20 @@ struct XscomChipInfo
} PACKED;
+/**
+ * @brief Structure which defines chip info necessary for I2C operations
+ *
+ * Structure which defines info necessary for I2C. Only applicable for
+ * chip targets which support I2C. Structure is read-only.
+ */
+struct I2cChipInfo
+{
+ uint32_t busSpeed; // Slave Device bus speed
+ uint16_t deviceAddr; // Slave Device address
+ uint8_t devicePort; // Slave Device Port location
+ uint8_t deviceMasterEng; // Master I2C engine slave is hung off of
+} PACKED;
+
} // End namespace TARGETING
#endif // TARG_ATTRIBUTESTRUCTS_H
diff --git a/src/include/usr/targeting/attributetraits.H b/src/include/usr/targeting/attributetraits.H
index b9931563a..75a4d14e5 100644
--- a/src/include/usr/targeting/attributetraits.H
+++ b/src/include/usr/targeting/attributetraits.H
@@ -155,6 +155,14 @@ class AttributeTraits<ATTR_XSCOM_CHIP_INFO>
typedef XscomChipInfo Type;
};
+template<>
+class AttributeTraits<ATTR_I2C_CHIP_INFO>
+{
+ public:
+ enum { readable };
+ typedef I2cChipInfo Type;
+};
+
} // End namespace TARGETING
#endif // TARG_ATTRIBUTETRAITS_H
OpenPOWER on IntegriCloud