summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2011-08-11 08:52:25 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2011-09-06 12:31:55 -0500
commit11ea7375f50c8e426e85ebdb4c2d9b67b8ecbb27 (patch)
treec26b58eee2d836827e2371d2f8a4ab2ff2299159 /src/include/usr
parentf093b902e49a0ee46d232cd196ec48f88f801735 (diff)
downloadtalos-hostboot-11ea7375f50c8e426e85ebdb4c2d9b67b8ecbb27.tar.gz
talos-hostboot-11ea7375f50c8e426e85ebdb4c2d9b67b8ecbb27.zip
Implementing FSI driver
-Initial work for FSI Device Driver (Story 3334) -Read/Write interface (Story 3550) Code is capable of basic read and write operations provided that the Simics models are updated Note: contains early work for FSI Initialization that should be ignored for now Change-Id: I08e795422de127b62c2d1629d7a4e0f12b21e348 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/287 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/devicefw/driverif.H11
-rw-r--r--src/include/usr/fsi/fsi_reasoncodes.H51
-rw-r--r--src/include/usr/hbotcompid.H8
-rw-r--r--src/include/usr/targeting/attributeenums.H1
-rw-r--r--src/include/usr/targeting/attributestructs.H16
5 files changed, 85 insertions, 2 deletions
diff --git a/src/include/usr/devicefw/driverif.H b/src/include/usr/devicefw/driverif.H
index 8ad52e898..82125c014 100644
--- a/src/include/usr/devicefw/driverif.H
+++ b/src/include/usr/devicefw/driverif.H
@@ -43,9 +43,10 @@ namespace DeviceFW
*/
enum AccessType_DriverOnly
{
- XSCOM = LAST_ACCESS_TYPE,
- FSISCOM,
+ XSCOM = LAST_ACCESS_TYPE,
+ FSI,
I2C,
+ FSISCOM,
LAST_DRIVER_ACCESS_TYPE
};
@@ -83,6 +84,12 @@ namespace DeviceFW
#define DEVICE_I2C_ADDRESS( i_address )\
DeviceFW::I2C, static_cast<uint64_t>(( i_address ))
+ /** Construct the device addressing parameters for FSI device ops.
+ * @param[in] i_address - FSI address to operate on.
+ */
+ #define DEVICE_FSI_ADDRESS(i_address) \
+ DeviceFW::FSI, static_cast<uint64_t>((i_address))
+
/** @class InvalidParameterType
* @brief Unused type to cause compiler fails for invalid template types.
diff --git a/src/include/usr/fsi/fsi_reasoncodes.H b/src/include/usr/fsi/fsi_reasoncodes.H
new file mode 100644
index 000000000..a82da1133
--- /dev/null
+++ b/src/include/usr/fsi/fsi_reasoncodes.H
@@ -0,0 +1,51 @@
+// IBM_PROLOG_BEGIN_TAG
+// This is an automatically generated prolog.
+//
+// $Source: src/include/usr/fsi/fsi_reasoncodes.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
+#ifndef __FSI_REASONCODES_H
+#define __FSI_REASONCODES_H
+
+#include <hbotcompid.H>
+
+namespace FSI
+{
+ enum FSIModuleId
+ {
+ MOD_FSIDD_INVALID = 0x00, /**< Zero is an invalid module id */
+ MOD_FSIDD_WRITE = 0x01, /**< fsidd.C : FsiDD::write */
+ MOD_FSIDD_READ = 0x02, /**< fsidd.C : FsiDD::read */
+ MOD_FSIDD_VERIFYADDRESSRANGE = 0x03, /**< fsidd.C : verifyAddressRange */
+ MOD_FSIDD_HANDLEOPBERRORS = 0x04, /**< fsidd.C : handleOpbErrors */
+ MOD_FSIDD_DDREAD = 0x05, /**< fsidd.C : ddRead */
+ MOD_FSIDD_DDWRITE = 0x06, /**< fsidd.C : ddWrite */
+ };
+
+ enum FSIReasonCode
+ {
+ RC_INVALID_LENGTH = FSI_COMP_ID | 0x01,
+ RC_INVALID_ADDRESS = FSI_COMP_ID | 0x02,
+ RC_OPB_TIMEOUT = FSI_COMP_ID | 0x03,
+ RC_OPB_ERROR = FSI_COMP_ID | 0x04,
+ RC_INVALID_TARGET = FSI_COMP_ID | 0x05,
+ };
+};
+
+#endif
diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H
index 4776b0cac..ba18fbd12 100644
--- a/src/include/usr/hbotcompid.H
+++ b/src/include/usr/hbotcompid.H
@@ -122,4 +122,12 @@ const compId_t HWPF_COMP_ID = 0x0900;
const char HWPF_COMP_NAME[] = "hwpf";
//@}
+/** @name FSI
+ * FSI component
+ */
+//@{
+const compId_t FSI_COMP_ID = 0x0A00;
+const char FSI_COMP_NAME[] = "fsi";
+//@}
+
#endif
diff --git a/src/include/usr/targeting/attributeenums.H b/src/include/usr/targeting/attributeenums.H
index 7314b1da9..246f41061 100644
--- a/src/include/usr/targeting/attributeenums.H
+++ b/src/include/usr/targeting/attributeenums.H
@@ -70,6 +70,7 @@ enum ATTRIBUTE_ID
ATTR_INBAND_SCOM_CHIP_INFO = 0x0B,
ATTR_FSI_SCOM_CHIP_INFO = 0x0C,
ATTR_I2C_CHIP_INFO = 0x0D,
+ ATTR_FSI_MASTER_INFO = 0x0E,
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 04206db9b..c34c045e4 100644
--- a/src/include/usr/targeting/attributestructs.H
+++ b/src/include/usr/targeting/attributestructs.H
@@ -117,6 +117,22 @@ struct I2cChipInfo
uint8_t deviceMasterEng; // Master I2C engine slave is hung off of
} PACKED;
+//@todo - NOT READY YET
+/**
+ * @brief Structure which defines info necessary to setup a FSI master
+ *
+ * Structure which defines info necessary for a FSI master. Only applicable
+ * for chip targets which include MFSI of CMFSI logic. Structure is read-only.
+ */
+struct FsiMasterInfo
+{
+ uint64_t modebits; ///< TBD
+ uint16_t clockRatio0; ///< Clock Ratio 0
+ uint16_t clockRatio1; ///< Clock Ratio 1
+
+ uint8_t numPorts; ///< Number of possible FSI-slave ports
+} PACKED;
+
} // End namespace TARGETING
#endif // TARG_ATTRIBUTESTRUCTS_H
OpenPOWER on IntegriCloud