From patchwork Thu Jan 21 05:45:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 74204 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.2) with ESMTP id o0L5jQae006446 for ; Thu, 21 Jan 2010 05:45:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752073Ab0AUFpY (ORCPT ); Thu, 21 Jan 2010 00:45:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752000Ab0AUFpY (ORCPT ); Thu, 21 Jan 2010 00:45:24 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:38492 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751526Ab0AUFpW (ORCPT ); Thu, 21 Jan 2010 00:45:22 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o0L5jIHo012422 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Jan 2010 23:45:18 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o0L5jHTv028429; Wed, 20 Jan 2010 23:45:17 -0600 (CST) Received: from senorita (senorita.am.dhcp.ti.com [128.247.75.1]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o0L5jHZ17688; Wed, 20 Jan 2010 23:45:17 -0600 (CST) Received: by senorita (Postfix, from userid 1000) id 00B45C1FB; Wed, 20 Jan 2010 23:45:16 -0600 (CST) From: Nishanth Menon To: linux-omap Cc: Nishanth Menon , Ameya Palande , Deepak Chitriki , Felipe Contreras , Hiroshi Doyu , Omar Ramirez Luna Subject: [PATCH 1/2] DSPBRIDGE: improve constraint_value handling Date: Wed, 20 Jan 2010 23:45:09 -0600 Message-Id: <1264052710-30337-2-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1264052710-30337-1-git-send-email-nm@ti.com> References: <[PATCH 1/2] DSPBRIDGE: remove dependency of mpu freq> <1264052710-30337-1-git-send-email-nm@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c index 084f406..5dfbef8 100644 --- a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c +++ b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c @@ -66,18 +66,20 @@ DSP_STATUS handle_constraints_set(struct WMD_DEV_CONTEXT *pDevContext, IN void *pArgs) { #ifdef CONFIG_BRIDGE_DVFS - u32 *pConstraintVal; + u32 opp_idx; struct dspbridge_platform_data *pdata = omap_dspbridge_dev->dev.platform_data; - pConstraintVal = (u32 *)(pArgs); + /* pick up the opp index */ + opp_idx = *(((u32 *)(pArgs)) + 1); + /* Read the target value requested by DSP */ DBG_Trace(DBG_LEVEL7, "handle_constraints_set:" - "opp requested = 0x%x\n", (u32)*(pConstraintVal+1)); + "opp requested = 0x%x\n", opp_idx); /* Set the new opp value */ if (pdata->dsp_set_min_opp) - (*pdata->dsp_set_min_opp)((u32)*(pConstraintVal+1)); + (*pdata->dsp_set_min_opp)(opp_idx); #endif /* #ifdef CONFIG_BRIDGE_DVFS */ return DSP_SOK; }