[PATCH 10/13] staging: ti dspbridge: access deh directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 drivers/staging/tidspbridge/core/tiomap3430.c      |    5 --
 .../tidspbridge/include/dspbridge/dspdefs.h        |   56 --------------------
 drivers/staging/tidspbridge/pmgr/dev.c             |   15 +----
 drivers/staging/tidspbridge/rmgr/node.c            |    5 +-
 drivers/staging/tidspbridge/rmgr/proc.c            |   18 +++----
 5 files changed, 14 insertions(+), 85 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index ef4abb4..60fca91 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -194,11 +194,6 @@ static struct bridge_drv_interface drv_interface_fxns = {
 	bridge_chnl_get_mgr_info,
 	bridge_chnl_idle,
 	bridge_chnl_register_notify,
-	/* The following DEH functions are provided by tihelen_ue_deh.c */
-	bridge_deh_create,
-	bridge_deh_destroy,
-	bridge_deh_notify,
-	bridge_deh_register_notify,
 	/* The following IO functions are provided by chnl_io.lib: */
 	bridge_io_create,
 	bridge_io_destroy,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
index 49842a2..536816b 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dspdefs.h
@@ -724,57 +724,6 @@ typedef int(*fxn_dev_ctrl) (struct bridge_dev_context *hDevContext,
 typedef int(*fxn_dev_destroy) (struct bridge_dev_context *hDevContext);
 
 /*
- *  ======== bridge_deh_create ========
- *  Purpose:
- *      Create an object that manages DSP exceptions from the GPP.
- *  Parameters:
- *      phDehMgr:       Location to store DEH manager on output.
- *      hdev_obj:     Handle to DEV object.
- *  Returns:
- *      0:        Success.
- *      -ENOMEM:    Memory allocation failure.
- *      -EPERM:      Creation failed.
- *  Requires:
- *      hdev_obj != NULL;
- *      phDehMgr != NULL;
- *  Ensures:
- */
-typedef int(*fxn_deh_create) (OUT struct deh_mgr
-				     **phDehMgr, struct dev_object *hdev_obj);
-
-/*
- *  ======== bridge_deh_destroy ========
- *  Purpose:
- *      Destroy the DEH object.
- *  Parameters:
- *      hdeh_mgr:        Handle to DEH manager object.
- *  Returns:
- *      0:        Success.
- *      -EPERM:      Destroy failed.
- *  Requires:
- *      hdeh_mgr != NULL;
- *  Ensures:
- */
-typedef int(*fxn_deh_destroy) (struct deh_mgr *hdeh_mgr);
-
-/*
- *  ======== bridge_deh_register_notify ========
- *  Purpose:
- *      Register for DEH event notification.
- *  Parameters:
- *      hdeh_mgr:        Handle to DEH manager object.
- *  Returns:
- *      0:        Success.
- *      -EPERM:      Destroy failed.
- *  Requires:
- *      hdeh_mgr != NULL;
- *  Ensures:
- */
-typedef int(*fxn_deh_registernotify)
- (struct deh_mgr *hdeh_mgr,
-  u32 event_mask, u32 notify_type, struct dsp_notification *hnotification);
-
-/*
  *  ======== bridge_io_create ========
  *  Purpose:
  *      Create an object that manages I/O between CHNL and msg_ctrl.
@@ -1059,11 +1008,6 @@ struct bridge_drv_interface {
 	fxn_chnl_idle pfn_chnl_idle;	/* Idle the channel */
 	/* Register for notif. */
 	fxn_chnl_registernotify pfn_chnl_register_notify;
-	fxn_deh_create pfn_deh_create;	/* Create DEH manager */
-	fxn_deh_destroy pfn_deh_destroy;	/* Destroy DEH manager */
-	fxn_deh_notify pfn_deh_notify;	/* Notify of DSP error */
-	/* register for deh notif. */
-	fxn_deh_registernotify pfn_deh_register_notify;
 	fxn_io_create pfn_io_create;	/* Create IO manager */
 	fxn_io_destroy pfn_io_destroy;	/* Destroy IO manager */
 	fxn_io_onloaded pfn_io_on_loaded;	/* Notify of program loaded */
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 353b81a..2c31f31 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -48,6 +48,7 @@
 #include <dspbridge/io.h>
 #include <dspbridge/msg.h>
 #include <dspbridge/cmm.h>
+#include <dspbridge/dspdeh.h>
 
 /*  ----------------------------------- This */
 #include <dspbridge/dev.h>
@@ -237,8 +238,7 @@ int dev_create_device(OUT struct dev_object **phDevObject,
 		/* Only create DEH manager if we have an IO manager */
 		if (DSP_SUCCEEDED(status)) {
 			/* Instantiate the DEH module */
-			status = (*dev_obj->bridge_interface.pfn_deh_create)
-			    (&dev_obj->hdeh_mgr, dev_obj);
+			status = bridge_deh_create(&dev_obj->hdeh_mgr, dev_obj);
 		}
 		/* Create DMM mgr . */
 		status = dmm_create(&dev_obj->dmm_mgr,
@@ -373,8 +373,7 @@ int dev_destroy_device(struct dev_object *hdev_obj)
 
 		if (dev_obj->hdeh_mgr) {
 			/* Uninitialize DEH module. */
-			(*dev_obj->bridge_interface.pfn_deh_destroy)
-			    (dev_obj->hdeh_mgr);
+			bridge_deh_destroy(dev_obj->hdeh_mgr);
 			dev_obj->hdeh_mgr = NULL;
 		}
 		if (dev_obj->hcmm_mgr) {
@@ -1115,10 +1114,6 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
 		STORE_FXN(fxn_chnl_getmgrinfo, pfn_chnl_get_mgr_info);
 		STORE_FXN(fxn_chnl_idle, pfn_chnl_idle);
 		STORE_FXN(fxn_chnl_registernotify, pfn_chnl_register_notify);
-		STORE_FXN(fxn_deh_create, pfn_deh_create);
-		STORE_FXN(fxn_deh_destroy, pfn_deh_destroy);
-		STORE_FXN(fxn_deh_notify, pfn_deh_notify);
-		STORE_FXN(fxn_deh_registernotify, pfn_deh_register_notify);
 		STORE_FXN(fxn_io_create, pfn_io_create);
 		STORE_FXN(fxn_io_destroy, pfn_io_destroy);
 		STORE_FXN(fxn_io_onloaded, pfn_io_on_loaded);
@@ -1155,10 +1150,6 @@ static void store_interface_fxns(struct bridge_drv_interface *drv_fxns,
 	DBC_ENSURE(intf_fxns->pfn_chnl_get_mgr_info != NULL);
 	DBC_ENSURE(intf_fxns->pfn_chnl_idle != NULL);
 	DBC_ENSURE(intf_fxns->pfn_chnl_register_notify != NULL);
-	DBC_ENSURE(intf_fxns->pfn_deh_create != NULL);
-	DBC_ENSURE(intf_fxns->pfn_deh_destroy != NULL);
-	DBC_ENSURE(intf_fxns->pfn_deh_notify != NULL);
-	DBC_ENSURE(intf_fxns->pfn_deh_register_notify != NULL);
 	DBC_ENSURE(intf_fxns->pfn_io_create != NULL);
 	DBC_ENSURE(intf_fxns->pfn_io_destroy != NULL);
 	DBC_ENSURE(intf_fxns->pfn_io_on_loaded != NULL);
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 3d2cf96..b5c99dc 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -68,6 +68,8 @@
 #include <dspbridge/resourcecleanup.h>
 #include <_tiomap.h>
 
+#include <dspbridge/dspdeh.h>
+
 #define HOSTPREFIX	  "/host"
 #define PIPEPREFIX	  "/dbpipe"
 
@@ -2472,8 +2474,7 @@ int node_terminate(struct node_object *hnode, OUT int *pstatus)
 			if (!hdeh_mgr)
 				goto func_cont;
 
-			(*intf_fxns->pfn_deh_notify)(hdeh_mgr, DSP_SYSERROR,
-							DSP_EXCEPTIONABORT);
+			bridge_deh_notify(hdeh_mgr, DSP_SYSERROR, DSP_EXCEPTIONABORT);
 		}
 	}
 func_cont:
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index c31f8b8..084f7b9 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -1458,22 +1458,20 @@ int proc_register_notify(void *hprocessor, u32 event_mask,
 				status =
 				    dev_get_deh_mgr(p_proc_object->hdev_obj,
 						    &hdeh_mgr);
-				DBC_ASSERT(p_proc_object->
-					   intf_fxns->pfn_deh_register_notify);
 				status =
-				    (*p_proc_object->
-				     intf_fxns->pfn_deh_register_notify)
-				    (hdeh_mgr, event_mask, notify_type,
-				     hnotification);
+					bridge_deh_register_notify(hdeh_mgr,
+							event_mask,
+							notify_type,
+							hnotification);
 			}
 		} else {
 			status = dev_get_deh_mgr(p_proc_object->hdev_obj,
 						 &hdeh_mgr);
-			DBC_ASSERT(p_proc_object->
-				   intf_fxns->pfn_deh_register_notify);
 			status =
-			    (*p_proc_object->intf_fxns->pfn_deh_register_notify)
-			    (hdeh_mgr, event_mask, notify_type, hnotification);
+			    bridge_deh_register_notify(hdeh_mgr,
+					    event_mask,
+					    notify_type,
+					    hnotification);
 
 		}
 	}
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux