From patchwork Sat Mar 27 02:30:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hebbar, Shivananda" X-Patchwork-Id: 88680 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 o2R2UdX3015532 for ; Sat, 27 Mar 2010 02:30:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752666Ab0C0Caj (ORCPT ); Fri, 26 Mar 2010 22:30:39 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:39596 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752636Ab0C0Cai convert rfc822-to-8bit (ORCPT ); Fri, 26 Mar 2010 22:30:38 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o2R2UCHe006404 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Mar 2010 21:30:15 -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 o2R2UCLa026899; Sat, 27 Mar 2010 08:00:12 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde71.ent.ti.com ([172.24.170.149]) with mapi; Sat, 27 Mar 2010 08:00:12 +0530 From: "Hebbar, Shivananda" To: "linux-omap@vger.kernel.org" CC: "Ramirez Luna, Omar" , Felipe Contreras , "Menon, Nishanth" Date: Sat, 27 Mar 2010 08:00:10 +0530 Subject: [RFC][PATCH v1 19/19] DSPBRIDGE: Cleanup custom error code (WMD_E_TIMEOUT -> -ETIMEDOUT) Thread-Topic: [RFC][PATCH v1 19/19] DSPBRIDGE: Cleanup custom error code (WMD_E_TIMEOUT -> -ETIMEDOUT) Thread-Index: AcrNVWxJ2EsuOmpyRMqoQdvX72cK+Q== Message-ID: <19F8576C6E063C45BE387C64729E7394044DEBEE19@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]); Sat, 27 Mar 2010 02:30:40 +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 856a737..540b568 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. + * -ETIMEDOUT: 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. + * -ETIMEDOUT: 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. + * -ETIMEDOUT: 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. + * -ETIMEDOUT: 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. + * -ETIMEDOUT: 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. + * -ETIMEDOUT: 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 b06b11d..16ce28d 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 17f4e7d..6c4911d 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)