From patchwork Sat May 1 15:43: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: 96280 X-Patchwork-Delegate: khilman@deeprootsystems.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 o41FhaqX001334 for ; Sat, 1 May 2010 15:43:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755751Ab0EAPnW (ORCPT ); Sat, 1 May 2010 11:43:22 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:55945 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755727Ab0EAPnV (ORCPT ); Sat, 1 May 2010 11:43:21 -0400 Received: by gyg13 with SMTP id 13so563129gyg.19 for ; Sat, 01 May 2010 08:43:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer; bh=4gyIbTOazOzKQ0uuyfppVhO7aeOp5jhY65qY5l+lagA=; b=AnZKvhCggXLSF2puPR09UDMYYHFsf1HvOi9QBAISHyCo/WlHvEOjHlbm/uzBIvF09A mDyHaY4hx/Sln+BjF29bjRpabi8y/N3066joqvwil8O6ovdfgEH/n2whGyRaTNilZt5i 7SSchEIiD2jdVzGBucU8EcWg6S1vWINHBmnDU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=EUd3oWxdIGik3CPTQ1Jq19PQi0eykYKS11WMza8dBuBv325eogpKZcSSqNw8es3JTL iAjA9D9Imph9Sfdp+yHgK8n/aqdC/SGtXhCnR6OMt+cs2AkQIX0OLClwW6YyzbAK2zIT PP2Mos7hE71XQ26j8X0X1cdTCWaq5VZ+6liPo= Received: by 10.150.128.22 with SMTP id a22mr5566472ybd.54.1272728598777; Sat, 01 May 2010 08:43:18 -0700 (PDT) Received: from localhost (cpe-76-184-240-29.tx.res.rr.com [76.184.240.29]) by mx.google.com with ESMTPS id 13sm1650902gxk.4.2010.05.01.08.43.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 01 May 2010 08:43:18 -0700 (PDT) From: Nishanth Menon To: linux-omap Cc: Nishanth Menon , Peter Tseng , Kevin Hilman Subject: [PATCH] OMAP3: PM: quickly hack fix up init_opp Date: Sat, 1 May 2010 10:43:09 -0500 Message-Id: <1272728589-5313-1-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.0.4 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, 01 May 2010 15:43:37 +0000 (UTC) diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c index c6cce8b..ae8bd09 100644 --- a/arch/arm/mach-omap2/resource34xx.c +++ b/arch/arm/mach-omap2/resource34xx.c @@ -226,14 +226,36 @@ void init_opp(struct shared_resource *resp) dpll1_clk = clk_get(NULL, "dpll1_ck"); dpll2_clk = clk_get(NULL, "dpll2_ck"); ret = freq_to_opp(&opp_id, OPP_MPU, dpll1_clk->rate); - BUG_ON(ret); /* TBD Cleanup handling */ + if (ret) { + pr_err("%s: initializing %s failed! !match for %ld\n", + __func__, resp->name, dpll1_clk->rate); + if (dpll1_clk) + clk_put(dpll1_clk); + if (dpll2_clk) + clk_put(dpll2_clk); + dpll1_clk = NULL; + dpll2_clk = NULL; + vdd1_resp = NULL; + return; + } curr_vdd1_opp = opp_id; } else if (strcmp(resp->name, "vdd2_opp") == 0) { vdd2_resp = resp; dpll3_clk = clk_get(NULL, "dpll3_m2_ck"); l3_clk = clk_get(NULL, "l3_ick"); ret = freq_to_opp(&opp_id, OPP_L3, l3_clk->rate); - BUG_ON(ret); /* TBD Cleanup handling */ + if (ret) { + pr_err("%s: initializing %s failed! !match for %ld\n", + __func__, resp->name, l3_clk->rate); + if (l3_clk) + clk_put(l3_clk); + if (dpll3_clk) + clk_put(dpll3_clk); + l3_clk = NULL; + dpll3_clk = NULL; + vdd2_resp = NULL; + return; + } curr_vdd2_opp = opp_id; } resp->curr_level = opp_id;