From patchwork Thu Jul 14 23:24:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunter, Jon" X-Patchwork-Id: 976872 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6ENOjPN001940 for ; Thu, 14 Jul 2011 23:24:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932602Ab1GNXYv (ORCPT ); Thu, 14 Jul 2011 19:24:51 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:55766 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932590Ab1GNXYv (ORCPT ); Thu, 14 Jul 2011 19:24:51 -0400 Received: from dlep34.itg.ti.com ([157.170.170.115]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id p6ENOonV006925 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Jul 2011 18:24:50 -0500 Received: from dlep26.itg.ti.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep34.itg.ti.com (8.13.7/8.13.8) with ESMTP id p6ENOons001272; Thu, 14 Jul 2011 18:24:50 -0500 (CDT) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p6ENOorx015184; Thu, 14 Jul 2011 18:24:50 -0500 (CDT) Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE73.ent.ti.com (157.170.170.88) with Microsoft SMTP Server id 8.3.106.1; Thu, 14 Jul 2011 18:24:49 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id p6ENOnG9014117; Thu, 14 Jul 2011 18:24:49 -0500 Received: from localhost (h1-7.vpn.ti.com [172.24.1.7]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id p6ENOnf08274; Thu, 14 Jul 2011 18:24:49 -0500 (CDT) From: Jon Hunter To: Paul Walmsley CC: linux-omap , Jon Hunter Subject: [PATCH 4/6] OMAP3+: use DPLLs recalc function instead of omap2_get_dpll_rate Date: Thu, 14 Jul 2011 18:24:48 -0500 Message-ID: <1310685888-3360-1-git-send-email-jon-hunter@ti.com> X-Mailer: git-send-email 1.7.4.1 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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 14 Jul 2011 23:24:52 +0000 (UTC) From: Jon Hunter This is a continuation of Mike Turquette's patch "OMAP3+: use DPLL's round_rate when setting rate". omap3_noncore_dpll_set_rate() and omap3_noncore_dpll_enable() call omap2_get_dpll_rate() explicitly. It may be necessary for some DPLLs to use a different function and so use the DPLLs recalc() function pointer instead. An example is the DPLL_ABE on OMAP4 which can have a 4X multiplier in addition to the usual MN multipler and dividers and therefore uses a different round_rate and recalc function. Signed-off-by: Jon Hunter --- arch/arm/mach-omap2/dpll3xxx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c index 73a1595..7916f66 100644 --- a/arch/arm/mach-omap2/dpll3xxx.c +++ b/arch/arm/mach-omap2/dpll3xxx.c @@ -390,7 +390,7 @@ int omap3_noncore_dpll_enable(struct clk *clk) * propagating? */ if (!r) - clk->rate = omap2_get_dpll_rate(clk); + clk->rate = clk->recalc(clk); return r; } @@ -435,7 +435,7 @@ int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate) if (!dd) return -EINVAL; - if (rate == omap2_get_dpll_rate(clk)) + if (rate == clk->recalc(clk)) return 0; /*