@@ -101,6 +101,7 @@
#define DSP_MMUFAULT 0x00000010
#define DSP_SYSERROR 0x00000020
#define DSP_EXCEPTIONABORT 0x00000300
+#define DSP_PWRERROR 0x00000080
/* IVA exception events (IVA MMU fault) */
#define IVA_MMUFAULT 0x00000040
@@ -174,7 +175,8 @@
DSP_STREAMDONE | \
DSP_STREAMIOCOMPLETION | \
DSP_MMUFAULT | \
- DSP_SYSERROR)) && \
+ DSP_SYSERROR | \
+ DSP_PWRERROR)) && \
!((x) & ~(DSP_PROCESSORSTATECHANGE | \
DSP_PROCESSORATTACH | \
DSP_PROCESSORDETACH | \
@@ -183,7 +185,8 @@
DSP_STREAMDONE | \
DSP_STREAMIOCOMPLETION | \
DSP_MMUFAULT | \
- DSP_SYSERROR))))
+ DSP_SYSERROR | \
+ DSP_PWRERROR))))
#define IsValidNodeEvent(x) (((x) == 0) || (((x) & (DSP_NODESTATECHANGE | \
DSP_NODEMESSAGEREADY)) && \
@@ -1499,7 +1499,7 @@ DSP_STATUS PROC_RegisterNotify(DSP_HPROCESSOR hProcessor, u32 uEventMask,
/* Check if event mask is a valid processor related event */
if (uEventMask & ~(DSP_PROCESSORSTATECHANGE | DSP_PROCESSORATTACH |
DSP_PROCESSORDETACH | DSP_PROCESSORRESTART | DSP_MMUFAULT |
- DSP_SYSERROR))
+ DSP_SYSERROR | DSP_PWRERROR))
status = DSP_EVALUE;
/* Check if notify type is valid */
@@ -1507,12 +1507,13 @@ DSP_STATUS PROC_RegisterNotify(DSP_HPROCESSOR hProcessor, u32 uEventMask,
status = DSP_EVALUE;
if (DSP_SUCCEEDED(status)) {
- /* * If event mask is not DSP_SYSERROR or DSP_MMUFAULT,
- * then register event immediately. */
- if (uEventMask & ~(DSP_SYSERROR | DSP_MMUFAULT)) {
+ /* If event mask is not DSP_SYSERROR, DSP_MMUFAULT,
+ * or DSP_PWRERROR then register event immediately. */
+ if (uEventMask &
+ ~(DSP_SYSERROR | DSP_MMUFAULT | DSP_PWRERROR)) {
status = NTFY_Register(pProcObject->hNtfy,
hNotification, uEventMask, uNotifyType);
- /* * Special case alert, special case alert!
+ /* Special case alert, special case alert!
* If we're trying to *deregister* (i.e. uEventMask
* is 0), a DSP_SYSERROR or DSP_MMUFAULT notification,
* we have to deregister with the DEH manager.
@@ -57,6 +57,9 @@
#include <dspbridge/pwr_sh.h>
+/* ----------------------------------- Mini Driver */
+#include <dspbridge/wmddeh.h>
+
/* ----------------------------------- specific to this file */
#include "_tiomap.h"
#include "_tiomap_pwr.h"
@@ -188,6 +191,7 @@ DSP_STATUS SleepDSP(struct WMD_DEV_CONTEXT *pDevContext, IN u32 dwCmd,
DSP_STATUS status = DSP_SOK;
#ifdef CONFIG_PM
struct CFG_HOSTRES resources;
+ struct DEH_MGR *hDehMgr;
u16 usCount = TIHELEN_ACKTIMEOUT;
enum HW_PwrState_t pwrState;
enum HW_PwrState_t targetPwrState;
@@ -257,6 +261,8 @@ DSP_STATUS SleepDSP(struct WMD_DEV_CONTEXT *pDevContext, IN u32 dwCmd,
if (usCount == 0) {
DBG_Trace(DBG_LEVEL7, "SleepDSP: Timed out Waiting for DSP"
" STANDBY %x \n", pwrState);
+ DEV_GetDehMgr(pDevContext->hDevObject, &hDehMgr);
+ WMD_DEH_Notify(hDehMgr, DSP_PWRERROR, 0);
return WMD_E_TIMEOUT;
} else {
DBG_Trace(DBG_LEVEL7, "SleepDSP: DSP STANDBY Pwr state %x \n",
@@ -281,6 +281,16 @@ DBG_Trace(DBG_LEVEL6, "WMD_DEH_Notify: DSP_MMUFAULT, "
HW_MMU_EventAck(resources.dwDmmuBase,
HW_MMU_TRANSLATION_FAULT);
break;
+ case DSP_PWRERROR:
+ /* reset errInfo structure before use */
+ pDehMgr->errInfo.dwErrMask = DSP_PWRERROR;
+ pDehMgr->errInfo.dwVal1 = 0L;
+ pDehMgr->errInfo.dwVal2 = 0L;
+ pDehMgr->errInfo.dwVal3 = 0L;
+ pDehMgr->errInfo.dwVal1 = dwErrInfo;
+ printk(KERN_ERR "WMD_DEH_Notify: DSP_PWRERROR, errInfo "
+ "= 0x%x\n", dwErrInfo);
+ break;
default:
DBG_Trace(DBG_LEVEL6,
"WMD_DEH_Notify: Unknown Error, errInfo = "