diff mbox

[3/6] DSPBRIDGE: Report and print errors during OFF

Message ID B852767254C5C94EBB1040EE0EFA0600849F9522@dlee01.ent.ti.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ramos Falcon, Ernesto Nov. 3, 2009, 11:20 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
index 2eb379f..da7d4f3 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
@@ -114,6 +114,9 @@  DSP_STATUS handle_hibernation_fromDSP(struct WMD_DEV_CONTEXT *pDevContext)
 #ifdef CONFIG_PM
 	u16 timeout = PWRSTST_TIMEOUT / 10;
 	enum HW_PwrState_t pwrState;
+#ifdef BRIDGE_NTFY_PWRERR
+	struct DEH_MGR *hDehMgr;
+#endif /* #ifdef BRIDGE_NTFY_PWRERR */
 #ifdef CONFIG_BRIDGE_DVFS
 	u32 opplevel;
 	struct IO_MGR *hIOMgr;
@@ -133,9 +136,12 @@  DSP_STATUS handle_hibernation_fromDSP(struct WMD_DEV_CONTEXT *pDevContext)
 				    &pwrState);
 	}
 	if (timeout == 0) {
-		DBG_Trace(DBG_LEVEL7, "Timed out Waiting for DSP Off mode \n");
+		pr_err("Timed out waiting for DSP self hibernation\n");
+#ifdef BRIDGE_NTFY_PWRERR
+		DEV_GetDehMgr(pDevContext->hDevObject, &hDehMgr);
+		WMD_DEH_Notify(hDehMgr, DSP_PWRERROR, 0);
+#endif /* #ifdef BRIDGE_NTFY_PWRERR */
 		status = WMD_E_TIMEOUT;
-		return status;
 	} else {
 		/* Save mailbox settings */
 		status = HW_MBOX_saveSettings(pDevContext->dwMailBoxBase);
@@ -258,8 +264,7 @@  DSP_STATUS SleepDSP(struct WMD_DEV_CONTEXT *pDevContext, IN u32 dwCmd,
 	}
 
 	if (!timeout) {
-		DBG_Trace(DBG_LEVEL7, "SleepDSP: Timed out Waiting for DSP"
-			 " STANDBY %x \n", pwrState);
+		pr_err("Timed out waiting for DSP suspend %x\n", pwrState);
 #ifdef CONFIG_BRIDGE_NTFY_PWRERR
 		DEV_GetDehMgr(pDevContext->hDevObject, &hDehMgr);
 		WMD_DEH_Notify(hDehMgr, DSP_PWRERROR, 0);