From patchwork Thu Mar 25 20:07:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hebbar, Shivananda" X-Patchwork-Id: 88334 X-Patchwork-Delegate: omar.ramirez@ti.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2PK6Q3l021290 for ; Thu, 25 Mar 2010 20:07:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754760Ab0CYUHm (ORCPT ); Thu, 25 Mar 2010 16:07:42 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:50165 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754702Ab0CYUHl convert rfc822-to-8bit (ORCPT ); Thu, 25 Mar 2010 16:07:41 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o2PK7GDK011366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Mar 2010 15:07:18 -0500 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id o2PK7F15027696; Fri, 26 Mar 2010 01:37:15 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde71.ent.ti.com ([172.24.170.149]) with mapi; Fri, 26 Mar 2010 01:37:15 +0530 From: "Hebbar, Shivananda" To: "linux-omap@vger.kernel.org" CC: "Ramirez Luna, Omar" , Felipe Contreras , "Palande Ameya (Nokia-D/Helsinki)" , "Menon, Nishanth" Date: Fri, 26 Mar 2010 01:37:13 +0530 Subject: [RFC][PATCH 19/19] DSPBRIDGE: Cleanup custom error code (WMD_E_TIMEOUT -> ETIMEDOUT) Thread-Topic: [RFC][PATCH 19/19] DSPBRIDGE: Cleanup custom error code (WMD_E_TIMEOUT -> ETIMEDOUT) Thread-Index: AcrMVsKVIEOEpY98QXi2k0O8BvVKSg== Message-ID: <19F8576C6E063C45BE387C64729E7394044DEBEB2F@dbde02.ent.ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 25 Mar 2010 20:07:42 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h b/arch/arm/plat-omap/include/dspbridge/errbase.h index 3524a33..a9ecb71 100644 --- a/arch/arm/plat-omap/include/dspbridge/errbase.h +++ b/arch/arm/plat-omap/include/dspbridge/errbase.h @@ -370,9 +370,6 @@ /* One or more configuration parameters violated WMD hardware assumptions. */ #define WMD_E_BADCONFIG (WMD_EBASE + 0x01) -/* Timeout occurred waiting for a response from the hardware. */ -#define WMD_E_TIMEOUT (WMD_EBASE + 0x02) - /* FAILURE Codes : REG */ #define REG_EBASE (DSP_COMP_EBASE + 0x800) diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h b/arch/arm/plat-omap/include/dspbridge/wmd.h index 7f339dd..ba98da8 100644 --- a/arch/arm/plat-omap/include/dspbridge/wmd.h +++ b/arch/arm/plat-omap/include/dspbridge/wmd.h @@ -59,7 +59,7 @@ struct wmd_dev_context; * Returns: * DSP_SOK: Success. * WMD_E_HARDWARE: A test of hardware assumptions/integrity failed. - * WMD_E_TIMEOUT: Timeout occured waiting for a response from hardware. + * ETIMEOUT: Timeout occured waiting for a response from hardware. * DSP_EFAIL: Other, unspecified error. * Requires: * hDevContext != NULL @@ -98,7 +98,7 @@ typedef dsp_status(*fxn_brd_setstate) (struct wmd_dev_context * dwDSPAddr: DSP address at which to start execution. * Returns: * DSP_SOK: Success. - * WMD_E_TIMEOUT: Timeout occured waiting for a response from hardware. + * ETIMEOUT: Timeout occured waiting for a response from hardware. * DSP_EFAIL: Other, unspecified error. * Requires: * hDevContext != NULL @@ -149,7 +149,7 @@ typedef dsp_status(*fxn_brd_memcopy) (struct wmd_dev_context * ulMemType: Memory space on DSP to which to transfer. * Returns: * DSP_SOK: Success. - * WMD_E_TIMEOUT: Timeout occured waiting for a response from hardware. + * ETIMEOUT: Timeout occured waiting for a response from hardware. * DSP_EFAIL: Other, unspecified error. * Requires: * hDevContext != NULL; @@ -211,7 +211,7 @@ typedef dsp_status(*fxn_brd_memunmap) (struct wmd_dev_context * hDevContext: Handle to mini-driver defined device context. * Returns: * DSP_SOK: Success. - * WMD_E_TIMEOUT: Timeout occured waiting for a response from hardware. + * ETIMEOUT: Timeout occured waiting for a response from hardware. * DSP_EFAIL: Other, unspecified error. * Requires: * hDevContext != NULL @@ -253,7 +253,7 @@ typedef dsp_status(*fxn_brd_status) (struct wmd_dev_context *hDevContext, * ulMemType: Memory space on DSP from which to transfer. * Returns: * DSP_SOK: Success. - * WMD_E_TIMEOUT: Timeout occured waiting for a response from hardware. + * ETIMEOUT: Timeout occured waiting for a response from hardware. * DSP_EFAIL: Other, unspecified error. * Requires: * hDevContext != NULL; @@ -279,7 +279,7 @@ typedef dsp_status(*fxn_brd_read) (struct wmd_dev_context *hDevContext, * ulMemType: Memory space on DSP to which to transfer. * Returns: * DSP_SOK: Success. - * WMD_E_TIMEOUT: Timeout occured waiting for a response from hardware. + * ETIMEOUT: Timeout occured waiting for a response from hardware. * DSP_EFAIL: Other, unspecified error. * Requires: * hDevContext != NULL; diff --git a/drivers/dsp/bridge/wmd/tiomap3430.c b/drivers/dsp/bridge/wmd/tiomap3430.c index 647643d..899df1a 100644 --- a/drivers/dsp/bridge/wmd/tiomap3430.c +++ b/drivers/dsp/bridge/wmd/tiomap3430.c @@ -722,7 +722,7 @@ static dsp_status bridge_brd_start(struct wmd_dev_context *hDevContext, /* Wait for DSP to clear word in shared memory */ /* Read the Location */ if (!wait_for_start(dev_context, dw_sync_addr)) - status = WMD_E_TIMEOUT; + status = ETIMEDOUT; status = dev_get_io_mgr(dev_context->hdev_obj, &hio_mgr); if (DSP_SUCCEEDED(status)) { diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c index 48dbeae..f515cae 100644 --- a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c +++ b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c @@ -115,7 +115,7 @@ dsp_status handle_hibernation_from_dsp(struct wmd_dev_context *dev_context) } if (timeout == 0) { pr_err("%s: Timed out waiting for DSP off mode\n", __func__); - status = WMD_E_TIMEOUT; + status = ETIMEDOUT; return status; } else { @@ -231,7 +231,7 @@ dsp_status sleep_dsp(struct wmd_dev_context *dev_context, IN u32 dw_cmd, dev_get_deh_mgr(dev_context->hdev_obj, &hdeh_mgr); bridge_deh_notify(hdeh_mgr, DSP_PWRERROR, 0); #endif /* CONFIG_BRIDGE_NTFY_PWRERR */ - return WMD_E_TIMEOUT; + return ETIMEDOUT; } else { /* Update the Bridger Driver state */ if (dsp_test_sleepstate == HW_PWR_STATE_OFF)