Patchworkβ [5/6] DSPBRIDGE: Set vdd1 to OPP3 always in DSP wake up

login
register
about
Submitter Guzman Lugo, Fernando
Date 2009-11-03 23:06:31
Message ID <496565EC904933469F292DDA3F1663E602A6921175@dlee06.ent.ti.com>
Download mbox | patch
Permalink /patch/57397/
State Not Applicable, archived
Headers show

Comments

Guzman Lugo, Fernando - 2009-11-03 23:06:31
From 424104463b418172a2c7c66c0b9ace83681b1fb9 Mon Sep 17 00:00:00 2001
From: Fernando Guzman <x0095840@ti.com>
Date: Thu, 15 Oct 2009 20:09:36 -0500
Subject: [PATCH 5/6] DSPBRIDGE: Set vdd1 to OPP3 always in DSP wake up

This patch set the vdd1 to OPP3 always in DSP wake up.
Signed-off-by: Fernando Guzman <x0095840@ti.com>
---
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

Patch

diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
index e793ad3..34e5a74 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
@@ -797,24 +797,24 @@  void DSPClkWakeupEventCtrl(u32 ClkId, bool enable)
 DSP_STATUS tiomap3430_bump_dsp_opp_level(void)
 {
 #ifdef CONFIG_BRIDGE_DVFS
-	u32 opplevel;
-
+	struct WMD_DEV_CONTEXT *dwContext;
+	struct DEV_OBJECT *hDevObject = DRV_GetFirstDevObject();
 	struct dspbridge_platform_data *pdata =
 			omap_dspbridge_dev->dev.platform_data;
 
-	if (pdata->dsp_get_opp && pdata->dsp_set_min_opp)
-		opplevel = (*pdata->dsp_get_opp)();
+	if (DSP_FAILED(DEV_GetWMDContext(hDevObject, &dwContext)))
+		return DSP_EFAIL;
 
+	if (dwContext->dwBrdState == BRD_DSP_HIBERNATION ||
+	    dwContext->dwBrdState == BRD_HIBERNATION) {
 		/*
-		 * If OPP is at minimum level, increase it before waking
-		 * up the DSP.
+		 * Increase OPP before waking up the DSP.
 		 */
-		if (opplevel < min_active_opp) {
-			(*pdata->dsp_set_min_opp)(min_active_opp);
-			DBG_Trace(DBG_LEVEL7, "CHNLSM_InterruptDSP: Setting "
-				"the vdd1 constraint level to %d before "
-				"waking DSP \n", min_active_opp);
-		}
+		(*pdata->dsp_set_min_opp)(min_active_opp);
+		DBG_Trace(DBG_LEVEL7, "CHNLSM_InterruptDSP: Setting "
+			"the vdd1 constraint level to %d before "
+			"waking DSP \n", min_active_opp);
+	}
 #endif
 	return DSP_SOK;
 }