diff mbox

[13/14] DSPBRIDGE: Stop and reset DSP before removing constraints

Message ID 1242795740-21535-13-git-send-email-x00omar@ti.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ramirez Luna, Omar May 20, 2009, 5:02 a.m. UTC
From: Omar Ramirez Luna <omar.ramirez@ti.com>

This patch implements the DSP Reset procedure to be made
on bridge exit before unregistering the constraints set by dsp.

Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 drivers/dsp/bridge/rmgr/drv_interface.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c b/drivers/dsp/bridge/rmgr/drv_interface.c
index d17d3cf..d14e663 100644
--- a/drivers/dsp/bridge/rmgr/drv_interface.c
+++ b/drivers/dsp/bridge/rmgr/drv_interface.c
@@ -469,6 +469,14 @@  static int __devexit omap34xx_bridge_remove(struct platform_device *pdev)
 		pCtxtclosed = pTmp;
 	}
 func_cont:
+	if (driverContext) {
+		/* Put the DSP in reset state */
+		ret = DSP_Deinit(driverContext);
+		driverContext = 0;
+		DBC_Assert(ret == true);
+	}
+	SERVICES_Exit();
+	GT_exit();
 	/* unregister the clock notifier */
 #ifdef CONFIG_BRIDGE_DVFS
 	if (!clk_notifier_unregister(clk_handle, &iva_clk_notifier)) {
@@ -483,15 +491,6 @@  func_cont:
 	clk_handle = NULL;
 #endif /* #ifdef CONFIG_BRIDGE_DVFS */
 
-	if (driverContext) {
-		ret = DSP_Deinit(driverContext);
-		driverContext = 0;
-
-		DBC_Assert(ret == true);
-	}
-	SERVICES_Exit();
-	GT_exit();
-
 	devno = MKDEV(driver_major, driver_minor);
 	if (bridge_device) {
 		cdev_del(&bridge_device->cdev);