summaryrefslogtreecommitdiffstats
path: root/src/include/usr/devicefw
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-06-20 12:21:57 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-06-21 17:59:56 -0500
commit5611dd07de1fa342f487d49f57259639c2b0529a (patch)
tree163d0c0f88ce2238ebe9af5c34940b2e5bcef9da /src/include/usr/devicefw
parent91c0fe55a63a9d420e851534354f1058a9189743 (diff)
downloadtalos-hostboot-5611dd07de1fa342f487d49f57259639c2b0529a.tar.gz
talos-hostboot-5611dd07de1fa342f487d49f57259639c2b0529a.zip
Migrate device framework to use targeting.
Change-Id: I1ae855406e3061f10505eeccbcb2766a15581189 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/153 Tested-by: Jenkins Server Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Diffstat (limited to 'src/include/usr/devicefw')
-rw-r--r--src/include/usr/devicefw/driverif.H32
-rw-r--r--src/include/usr/devicefw/userif.H9
2 files changed, 15 insertions, 26 deletions
diff --git a/src/include/usr/devicefw/driverif.H b/src/include/usr/devicefw/driverif.H
index c7f094d8a..b4b2feee3 100644
--- a/src/include/usr/devicefw/driverif.H
+++ b/src/include/usr/devicefw/driverif.H
@@ -11,18 +11,10 @@
#include <devicefw/userif.H>
#include <stdarg.h>
#include <builtins.h>
+#include <targeting/targetservice.H>
namespace DeviceFW
{
- /** TODO: Update these to real target handle type once that piece of
- * code is complete */
- enum TargetType_t
- {
- PROCESSOR = 0,
-
- LAST_TARGET_TYPE
- };
-
/** @enum AccessType_DriverOnly
* @brief Access types to be used internally by drivers for routing
* requests to other drivers.
@@ -80,7 +72,7 @@ namespace DeviceFW
* @brief Function prototype for registered device-driver operations.
*/
typedef errlHndl_t(*deviceOp_t)(OperationType,
- TargetHandle_t,
+ TARGETING::Target*,
void*, size_t&,
int64_t, va_list);
@@ -105,13 +97,13 @@ namespace DeviceFW
* // High-level address manipulation routing function.
* deviceRegisterRoute(WILDCARD,
* SCOM,
- * MEMORY_CONTROLLER,
- * &scomAdjustMCAddresses);
+ * TYPE_CORE,
+ * &scomAdjustCoreAddresses);
*
* // Low-level (internal) XSCOM read operation.
* deviceRegisterRoute(READ,
* XSCOM,
- * PROCESSOR,
+ * TYPE_PROC,
* &xscomPerformRead);
* </PRE>
*
@@ -181,7 +173,7 @@ namespace DeviceFW
*/
template <typename AccType>
errlHndl_t deviceOp(OperationType i_opType,
- TargetHandle_t i_target,
+ TARGETING::Target* i_target,
void* io_buffer, size_t& io_buflen,
AccType i_accessType, ...)
{
@@ -199,12 +191,12 @@ namespace DeviceFW
template <>
void deviceRegisterRoute<>(OperationType i_opType,
AccessType i_accessType,
- TargetType_t i_targetType,
+ TARGETING::TYPE i_targetType,
deviceOp_t i_regRoute);
template <>
void deviceRegisterRoute<>(OperationType i_opType,
AccessType_DriverOnly i_accessType,
- TargetType_t i_targetType,
+ TARGETING::TYPE i_targetType,
deviceOp_t i_regRoute);
template <>
void deviceRegisterRoute<>(OperationType i_opType,
@@ -219,12 +211,12 @@ namespace DeviceFW
template <>
void deviceRegisterRoute<>(DriverSpecial i_opType,
AccessType i_accessType,
- TargetType_t i_targetType,
+ TARGETING::TYPE i_targetType,
deviceOp_t i_regRoute);
template <>
void deviceRegisterRoute<>(DriverSpecial i_opType,
AccessType_DriverOnly i_accessType,
- TargetType_t i_targetType,
+ TARGETING::TYPE i_targetType,
deviceOp_t i_regRoute);
template <>
void deviceRegisterRoute<>(DriverSpecial i_opType,
@@ -243,12 +235,12 @@ namespace DeviceFW
// AccType - AccessType, AccessType_DriverOnly (no WILDCARD).
template <>
errlHndl_t deviceOp<>(OperationType i_opType,
- TargetHandle_t i_target,
+ TARGETING::Target* i_target,
void* io_buffer, size_t& io_buflen,
AccessType i_accessType, ...);
template <>
errlHndl_t deviceOp<>(OperationType i_opType,
- TargetHandle_t i_target,
+ TARGETING::Target* i_target,
void* io_buffer, size_t& io_buflen,
AccessType_DriverOnly i_accessType, ...);
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H
index db9285a02..464ab570e 100644
--- a/src/include/usr/devicefw/userif.H
+++ b/src/include/usr/devicefw/userif.H
@@ -11,13 +11,10 @@
#include <stdint.h>
#include <errl/errltypes.H>
+#include <targeting/targetservice.H>
namespace DeviceFW
{
- /* TODO: Update these to real target handle type once that piece of code
- * is complete. */
- typedef int TargetHandle_t;
-
/** @enum AccessType
* @brief Access types for accessing a hardware device.
*/
@@ -68,7 +65,7 @@ namespace DeviceFW
* </PRE>
*
*/
- errlHndl_t deviceRead(TargetHandle_t i_target,
+ errlHndl_t deviceRead(TARGETING::Target* i_target,
void* o_buffer, size_t& io_buflen,
AccessType i_accessType, ...);
@@ -98,7 +95,7 @@ namespace DeviceFW
* </PRE>
*
*/
- errlHndl_t deviceWrite(TargetHandle_t i_target,
+ errlHndl_t deviceWrite(TARGETING::Target* i_target,
void* i_buffer, size_t& io_buflen,
AccessType i_accessType, ...);
OpenPOWER on IntegriCloud