diff mbox

[07/13] DSPBRIDGE: flush_all() bumps VDD1_OPP to 2 if it is at 1

Message ID 1247669795-23895-8-git-send-email-ameya.palande@nokia.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ameya Palande July 15, 2009, 2:56 p.m. UTC
[Hiroshi DOYU: split the original to logical ones]

Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
Acked-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 drivers/dsp/bridge/wmd/tiomap3430.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/drivers/dsp/bridge/wmd/tiomap3430.c b/drivers/dsp/bridge/wmd/tiomap3430.c
index fd4c11c..54c53b6 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430.c
@@ -291,8 +291,20 @@  static inline void flush_all(struct WMD_DEV_CONTEXT *pDevContext)
 		WakeDSP(pDevContext, NULL);
 		tlb_flush_all(pDevContext->dwDSPMmuBase);
 		CLK_Disable(SERVICESCLK_iva2_ck);
-	} else
+	} else {
+#ifdef CONFIG_BRIDGE_DVFS
+		struct dspbridge_platform_data *pdata =
+			omap_dspbridge_dev->dev.platform_data;
+		u32 opplevel = 0;
+		if (pdata->dsp_get_opp)
+			opplevel = (*pdata->dsp_get_opp)();
+		if (opplevel == VDD1_OPP1) {
+			if (pdata->dsp_set_min_opp)
+				(*pdata->dsp_set_min_opp)(VDD1_OPP2);
+		}
+#endif
 		tlb_flush_all(pDevContext->dwDSPMmuBase);
+	}
 }
 
 static void bad_page_dump(u32 pa, struct page *pg)