public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Omar Ramirez Luna <omar.ramirez@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Cc: Ameya Palande <ameya.palande@nokia.com>,
	Hiroshi Doyu <Hiroshi.DOYU@nokia.com>,
	Felipe Contreras <felipe.contreras@nokia.com>,
	Nishanth Menon <nm@ti.com>,
	Omar Ramirez Luna <omar.ramirez@ti.com>
Subject: [PATCH 15/18] DSPBRIDGE: change critical error statements to pr_err in wmd
Date: Tue, 16 Feb 2010 02:42:25 -0600	[thread overview]
Message-ID: <1266309748-11714-16-git-send-email-omar.ramirez@ti.com> (raw)
In-Reply-To: <1266309748-11714-15-git-send-email-omar.ramirez@ti.com>

Print to console:
    - SHM critical size errors.
    - PM power transition errors.
    - lack of MSG frame issues.

This will help to quick diagnose most common bridge errors.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 drivers/dsp/bridge/wmd/io_sm.c          |   19 +++++++++----------
 drivers/dsp/bridge/wmd/tiomap3430.c     |    8 ++++----
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c |    6 +++---
 3 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
index ab7607f..3471ed5 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -497,9 +497,9 @@ DSP_STATUS WMD_IO_OnLoaded(struct IO_MGR *hIOMgr)
 
 		if ((ulSegSize + ulSeg1Size + ulPadSize) >
 		   hostRes.dwMemLength[1]) {
-			DBG_Trace(DBG_LEVEL7, "Insufficient SHM Reserved 0x%x. "
-				 "Required 0x%x\n", hostRes.dwMemLength[1],
-				 ulSegSize + ulSeg1Size + ulPadSize);
+			pr_err("%s: SHM Error, reserved 0x%x required 0x%x\n",
+					__func__, hostRes.dwMemLength[1],
+					ulSegSize + ulSeg1Size + ulPadSize);
 			status = DSP_EMEMORY;
 		}
 	}
@@ -905,10 +905,9 @@ static void IO_DispatchPM(struct work_struct *work)
 				 "command\n");
 			status = pIOMgr->pIntfFxns->pfnDevCntrl(pIOMgr->
 				 hWmdContext, WMDIOCTL_PWR_HIBERNATE, pArg);
-			if (DSP_FAILED(status)) {
-				DBG_Trace(DBG_LEVEL7, "IO_DispatchPM : "
-					 "Hibernation command failed\n");
-			}
+			if (DSP_FAILED(status))
+				pr_err("%s: hibernate cmd failed 0x%x\n",
+							__func__, status);
 		} else if (pArg[0] == MBX_PM_OPP_REQ) {
 			pArg[1] = pIOMgr->pSharedMem->oppRequest.rqstOppPt;
 			DBG_Trace(DBG_LEVEL7, "IO_DispatchPM : Value of OPP "
@@ -1355,9 +1354,9 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct MSG_MGR *hMsgMgr)
 						 * No free frame to copy the
 						 * message into.
 						 */
-						DBG_Trace(DBG_LEVEL7, "NO FREE "
-							"MSG FRAMES, DISCARDING"
-							" MESSAGE\n");
+						pr_err("%s: no free msg frames,"
+							" discarding msg\n",
+							__func__);
 					}
 				}
 				break;
diff --git a/drivers/dsp/bridge/wmd/tiomap3430.c b/drivers/dsp/bridge/wmd/tiomap3430.c
index a8dbbfe..4563ca4 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430.c
@@ -458,7 +458,7 @@ static DSP_STATUS WMD_BRD_Start(struct WMD_DEV_CONTEXT *hDevContext,
 	 /* Write a signature into the SHM base + offset; this will
 	 * get cleared when the DSP program starts.  */
 	if ((ulShmBaseVirt == 0) || (ulShmBase == 0)) {
-		DBG_Trace(DBG_LEVEL6, "WMD_BRD_Start: Illegal SM base\n");
+		pr_err("%s: Illegal SM base\n", __func__);
 		status = DSP_EFAIL;
 	} else
 		*((volatile u32 *)dwSyncAddr) = 0xffffffff;
@@ -1338,8 +1338,8 @@ static DSP_STATUS WMD_BRD_MemMap(struct WMD_DEV_CONTEXT *hDevContext,
 		       vma->vm_end, vma->vm_flags);
 	}
 	if (!vma) {
-		DBG_Trace(DBG_LEVEL7, "Failed to get the VMA region for "
-			  "MPU Buffer !!! \n");
+		pr_err("%s: Failed to get VMA region for 0x%x (%d)\n",
+					__func__, ulMpuAddr, ulNumBytes);
 		status = DSP_EINVALIDARG;
 		up_read(&mm->mmap_sem);
 		goto func_cont;
@@ -1923,7 +1923,7 @@ bool WaitForStart(struct WMD_DEV_CONTEXT *pDevContext, u32 dwSyncAddr)
 
 	/*  If timed out: return FALSE */
 	if (!timeout) {
-		DBG_Trace(DBG_LEVEL7, "Timed out Waiting for DSP to Start\n");
+		pr_err("%s: Timed out waiting DSP to Start\n", __func__);
 		return FALSE;
 	}
 	return TRUE;
diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
index 270655a..9469c5e 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
@@ -117,7 +117,7 @@ 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("%s: Timed out waiting for DSP off mode\n", __func__);
 		status = WMD_E_TIMEOUT;
 		return status;
 	} else {
@@ -232,8 +232,8 @@ 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("%s: Timed out waiting for DSP off mode, state %x\n",
+							__func__, pwrState);
 #ifdef CONFIG_BRIDGE_NTFY_PWRERR
 		DEV_GetDehMgr(pDevContext->hDevObject, &hDehMgr);
 		WMD_DEH_Notify(hDehMgr, DSP_PWRERROR, 0);
-- 
1.6.2.4


  reply	other threads:[~2010-02-16  8:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16  8:42 [PATCH 00/18] Custom debug cleanup Omar Ramirez Luna
2010-02-16  8:42 ` [PATCH 01/18] DSPBRIDGE: Remove entry point custom debug statements for rmgr Omar Ramirez Luna
2010-02-16  8:42   ` [PATCH 02/18] DSPBRIDGE: Remove entry point custom debug statements for wmd Omar Ramirez Luna
2010-02-16  8:42     ` [PATCH 03/18] DSPBRIDGE: Remove entry point custom debug statements for pmgr Omar Ramirez Luna
2010-02-16  8:42       ` [PATCH 04/18] DSPBRIDGE: Remove entry point custom debug statements for wmd Omar Ramirez Luna
2010-02-16  8:42         ` [PATCH 05/18] DSPBRIDGE: Remove debug statements for success in rmgr Omar Ramirez Luna
2010-02-16  8:42           ` [PATCH 06/18] DSPBRIDGE: Remove debug statements for success in wmd Omar Ramirez Luna
2010-02-16  8:42             ` [PATCH 07/18] DSPBRIDGE: Remove debug statements for success in pmgr Omar Ramirez Luna
2010-02-16  8:42               ` [PATCH 08/18] DSPBRIDGE: Remove debug statements for success in services Omar Ramirez Luna
2010-02-16  8:42                 ` [PATCH 09/18] DSPBRIDGE: Remove excessive debug statements for rmgr Omar Ramirez Luna
2010-02-16  8:42                   ` [PATCH 10/18] DSPBRIDGE: Remove excessive debug statements for wmd Omar Ramirez Luna
2010-02-16  8:42                     ` [PATCH 11/18] DSPBRIDGE: Remove excessive debug statements for pmgr Omar Ramirez Luna
2010-02-16  8:42                       ` [PATCH 12/18] DSPBRIDGE: Remove excessive debug statements for services Omar Ramirez Luna
2010-02-16  8:42                         ` [PATCH 13/18] DSPBRIDGE: change init statements to pr_info in rmgr Omar Ramirez Luna
2010-02-16  8:42                           ` [PATCH 14/18] DSPBRIDGE: change critical error statements to pr_err " Omar Ramirez Luna
2010-02-16  8:42                             ` Omar Ramirez Luna [this message]
2010-02-16  8:42                               ` [PATCH 16/18] DSPBRIDGE: print dsp trace buffer by default Omar Ramirez Luna
2010-02-16  8:42                                 ` [PATCH 17/18] DSPBRIDGE: change critical error statements to pr_err in pmgr Omar Ramirez Luna
2010-02-16  8:42                                   ` [PATCH 18/18] DSPBRIDGE: change critical error statements to pr_err in services Omar Ramirez Luna
2010-02-23 17:53 ` [PATCH 00/18] Custom debug cleanup Omar Ramirez Luna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1266309748-11714-16-git-send-email-omar.ramirez@ti.com \
    --to=omar.ramirez@ti.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=ameya.palande@nokia.com \
    --cc=felipe.contreras@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox