From patchwork Wed May 20 05:02:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ramirez Luna, Omar" X-Patchwork-Id: 24838 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4K4wiex028775 for ; Wed, 20 May 2009 04:58:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753285AbZETE6v (ORCPT ); Wed, 20 May 2009 00:58:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752148AbZETE6v (ORCPT ); Wed, 20 May 2009 00:58:51 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:40808 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752459AbZETE6e (ORCPT ); Wed, 20 May 2009 00:58:34 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n4K4wS0u020744; Tue, 19 May 2009 23:58:33 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id n4K4wRgX011285; Tue, 19 May 2009 23:58:27 -0500 (CDT) Received: from Matrix (matrix.am.dhcp.ti.com [128.247.75.166]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id n4K4wR922445; Tue, 19 May 2009 23:58:27 -0500 (CDT) Received: by Matrix (Postfix, from userid 1003) id 7105C410443; Wed, 20 May 2009 00:02:21 -0500 (CDT) From: Omar Ramirez Luna To: linux-omap Cc: Hiroshi.DOYU@nokia.com, ameya.palande@nokia.com, Omar Ramirez Luna , Hari Kanigeri Subject: [PATCH 13/14] DSPBRIDGE: Stop and reset DSP before removing constraints Date: Wed, 20 May 2009 00:02:19 -0500 Message-Id: <1242795740-21535-13-git-send-email-x00omar@ti.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1242795740-21535-12-git-send-email-x00omar@ti.com> References: <1242795740-21535-1-git-send-email-x00omar@ti.com> <1242795740-21535-2-git-send-email-x00omar@ti.com> <1242795740-21535-3-git-send-email-x00omar@ti.com> <1242795740-21535-4-git-send-email-x00omar@ti.com> <1242795740-21535-5-git-send-email-x00omar@ti.com> <1242795740-21535-6-git-send-email-x00omar@ti.com> <1242795740-21535-7-git-send-email-x00omar@ti.com> <1242795740-21535-8-git-send-email-x00omar@ti.com> <1242795740-21535-9-git-send-email-x00omar@ti.com> <1242795740-21535-10-git-send-email-x00omar@ti.com> <1242795740-21535-11-git-send-email-x00omar@ti.com> <1242795740-21535-12-git-send-email-x00omar@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Omar Ramirez Luna 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 Signed-off-by: Omar Ramirez Luna --- drivers/dsp/bridge/rmgr/drv_interface.c | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) 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);