summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/devicefw/devfwreasoncodes.H1
-rw-r--r--src/include/usr/devicefw/driverif.H1
-rw-r--r--src/include/usr/devicefw/userif.H6
-rw-r--r--src/include/usr/fsi/fsi_reasoncodes.H8
-rw-r--r--src/include/usr/fsi/fsiif.H46
-rw-r--r--src/include/usr/pnor/pnor_reasoncodes.H3
-rw-r--r--src/include/usr/targeting/entitypath.H16
7 files changed, 50 insertions, 31 deletions
diff --git a/src/include/usr/devicefw/devfwreasoncodes.H b/src/include/usr/devicefw/devfwreasoncodes.H
index 29cfce28e..2f471eeb5 100644
--- a/src/include/usr/devicefw/devfwreasoncodes.H
+++ b/src/include/usr/devicefw/devfwreasoncodes.H
@@ -36,6 +36,7 @@ namespace DeviceFW
{
DEVFW_RC_INVALID_REGISTRATION = DEVFW_COMP_ID | 0x01,
DEVFW_RC_NO_ROUTE_FOUND = DEVFW_COMP_ID | 0x02,
+ DEVFW_RC_NULL_TARGET = DEVFW_COMP_ID | 0x03,
};
};
diff --git a/src/include/usr/devicefw/driverif.H b/src/include/usr/devicefw/driverif.H
index dd8cd8ae8..4b721cb63 100644
--- a/src/include/usr/devicefw/driverif.H
+++ b/src/include/usr/devicefw/driverif.H
@@ -83,6 +83,7 @@ namespace DeviceFW
#define DEVICE_I2C_ADDRESS( i_address )\
DeviceFW::I2C, 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/devicefw/userif.H b/src/include/usr/devicefw/userif.H
index 0e9955898..836e468ca 100644
--- a/src/include/usr/devicefw/userif.H
+++ b/src/include/usr/devicefw/userif.H
@@ -79,6 +79,12 @@ namespace DeviceFW
#define DEVICE_PNOR_ADDRESS( i_chip, i_addr ) \
DeviceFW::PNOR, ((static_cast<uint64_t>(i_chip)<<32)|static_cast<uint64_t>(i_addr))
+ /** 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))
+
/**
* @brief Perform a hardware read operation.
diff --git a/src/include/usr/fsi/fsi_reasoncodes.H b/src/include/usr/fsi/fsi_reasoncodes.H
index 24442062e..80539c691 100644
--- a/src/include/usr/fsi/fsi_reasoncodes.H
+++ b/src/include/usr/fsi/fsi_reasoncodes.H
@@ -34,10 +34,9 @@ namespace FSI
MOD_FSIDD_READ = 0x02, /**< fsidd.C : FsiDD::read */
MOD_FSIDD_VERIFYADDRESSRANGE = 0x03, /**< fsidd.C : FsiDD::verifyAddressRange */
MOD_FSIDD_HANDLEOPBERRORS = 0x04, /**< fsidd.C : FsiDD::handleOpbErrors */
- MOD_FSIDD_DDREAD = 0x05, /**< fsidd.C : ddRead */
- MOD_FSIDD_DDWRITE = 0x06, /**< fsidd.C : ddWrite */
+ MOD_FSIDD_DDOP = 0x05, /**< fsidd.C : ddOp */
+ MOD_FSIDD_POLLFORCOMPLETE = 0x06, /**< fsidd.C : FsiDD::pollForComplete */
MOD_FSIDD_INITPORT = 0x07, /**< fsidd.C : FsiDD::initPort */
- MOD_FSIDD_POLLFORCOMPLETE = 0x08, /**< fsidd.C : FsiDD::pollForComplete */
};
enum FSIReasonCode
@@ -49,6 +48,9 @@ namespace FSI
RC_INVALID_TARGET = FSI_COMP_ID | 0x05,
RC_OPB_NO_READ_VALID = FSI_COMP_ID | 0x06,
RC_ERROR_ENABLING_SLAVE = FSI_COMP_ID | 0x07,
+ RC_INVALID_OPERATION = FSI_COMP_ID | 0x08,
+ RC_NULL_TARGET = FSI_COMP_ID | 0x09,
+ RC_MASTER_TARGET = FSI_COMP_ID | 0x0A,
};
};
diff --git a/src/include/usr/fsi/fsiif.H b/src/include/usr/fsi/fsiif.H
index 3c366fd9d..183267249 100644
--- a/src/include/usr/fsi/fsiif.H
+++ b/src/include/usr/fsi/fsiif.H
@@ -32,41 +32,33 @@ namespace FSI
{
/**
- * Master or Cascaded Master
+ * @brief Initialize the FSI hardware
+ *
+ * @return errlHndl_t NULL on success
*/
-enum MasterType {
- MFSI_TYPE = 0,
- CMFSI_TYPE = 1,
- NO_MASTER = 2
-};
+errlHndl_t initializeHardware();
-//@todo - move this into attributes
/**
- * @brief Structure which defines info necessary to access a chip via FSI
- *
- * Structure which defines info necessary for FSI access. Only applicable
- * for chip targets. Structure is read-only. Each chip will have 2 copies
- * of this data, depending on which chip we boot from.
+ * FSI Slave Registers for P8
+ * These registers are repeated for every master+port+cascade combo
*/
-struct FsiChipInfo_t
+enum SlaveRegistersP8
{
- TARGETING::Target* master; ///< FSI Master @fixme - convert to EntityPath
- MasterType type; ///< Master or Cascaded Master
- uint8_t port; ///< Which port is this chip hanging off of
- uint8_t cascade; ///< Slave cascade position
- uint64_t attributes; ///< Reserved for any special flags we might need
+ // Local FSI Space
+ SLAVE_CFG_TABLE = 0x000000, /**< Configuration Table of CFAM */
+ SLAVE_PEEK_TABLE = 0x000400, /**< Peek Table */
+
+ SLAVE_REGS = 0x000800, /**< FSI Slave Register */
+ SLAVE_MODE_00 = SLAVE_REGS|0x00,
+
+ FSI_SHIFT_ENGINE = 0x000C00, /**< FSI Shift Engine (SCAN) */
+ FSI2PIB_ENGINE = 0x001000, /**< FSI2PIB Engine (SCOM) */
+ FSI_SCRATCHPAD = 0x001400, /**< FSI Scratchpad */
+ FSI_I2C_MASTER = 0x001800, /**< FSI I2C-Master */
+ FSI_GEMINI_MBOX = 0x002800, /**< FSI Gemini Mailbox with FSI GPx Registers */
};
-/**
- * @brief Initialize the FSI hardware
- *
- * @param[out] o_numPorts Number of FSI ports that were
- * successfully initialized
- *
- * @return errlHndl_t NULL on success
- */
-errlHndl_t initializeHardware( uint64_t& o_numPorts );
}
diff --git a/src/include/usr/pnor/pnor_reasoncodes.H b/src/include/usr/pnor/pnor_reasoncodes.H
index 3aa558821..d16c6d7f1 100644
--- a/src/include/usr/pnor/pnor_reasoncodes.H
+++ b/src/include/usr/pnor/pnor_reasoncodes.H
@@ -43,11 +43,12 @@ namespace PNOR
enum PNORReasonCode
{
- RC_INVALID_MESSAGE = PNOR_COMP_ID | 0x01,
+ RC_INVALID_MESSAGE_TYPE = PNOR_COMP_ID | 0x01,
RC_INVALID_ADDRESS = PNOR_COMP_ID | 0x02,
RC_INVALID_SECTION = PNOR_COMP_ID | 0x03,
RC_EXTERNAL_ERROR = PNOR_COMP_ID | 0x04,
RC_STARTUP_FAIL = PNOR_COMP_ID | 0x05,
+ RC_INVALID_ASYNC_MESSAGE = PNOR_COMP_ID | 0x06,
};
};
diff --git a/src/include/usr/targeting/entitypath.H b/src/include/usr/targeting/entitypath.H
index 4efad5e1f..52d9dce35 100644
--- a/src/include/usr/targeting/entitypath.H
+++ b/src/include/usr/targeting/entitypath.H
@@ -305,6 +305,22 @@ class EntityPath
uint32_t i_index) const;
/**
+ * @brief Returns the first path element of the given type
+ *
+ * Returns the first occurrence of a path element that matches the
+ * selected type. Will return a PathElement with type=TYPE_NA if
+ * no match is found.
+ *
+ * @param[in] i_type Element type to return
+ *
+ * @pre N/A
+ *
+ * @return PathElement of the given type else invalid PathElement
+ */
+ const PathElement pathElementOfType(
+ const TYPE i_type) const;
+
+ /**
* @brief Returns the number of path elements
*
* Returns the number of path elements for the entity path.
OpenPOWER on IntegriCloud