From patchwork Wed Apr 23 06:11:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 4038931 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC0F39F1F4 for ; Wed, 23 Apr 2014 06:13:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B88DB201BB for ; Wed, 23 Apr 2014 06:13:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83854201F7 for ; Wed, 23 Apr 2014 06:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753393AbaDWGNA (ORCPT ); Wed, 23 Apr 2014 02:13:00 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:60829 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753866AbaDWGM6 (ORCPT ); Wed, 23 Apr 2014 02:12:58 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s3N6CYYr011869; Wed, 23 Apr 2014 01:12:34 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3N6CXEZ012243; Wed, 23 Apr 2014 01:12:33 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Wed, 23 Apr 2014 01:12:33 -0500 Received: from ula0131687.apr.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3N6CQxo017603; Wed, 23 Apr 2014 01:12:31 -0500 From: Rajendra Nayak To: , CC: , , Rajendra Nayak , Benoit Cousson Subject: [PATCH 2/2] ARM: OMAP2+: hwmod: Don't leave the optional clocks in clk_prepare()ed state Date: Wed, 23 Apr 2014 11:41:04 +0530 Message-ID: <1398233465-8845-3-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398233465-8845-1-git-send-email-rnayak@ti.com> References: <1398233465-8845-1-git-send-email-rnayak@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP At hwmod init, theres no reason why optional clocks should be left in clk_prepare()ed state as these are actually directly controlled by the drivers themselves. Let the drivers prepare/unprepare as well as enable/ disable them. Signed-off-by: Rajendra Nayak Cc: Benoit Cousson --- arch/arm/mach-omap2/omap_hwmod.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 1f33f5d..9e3afc9 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -857,15 +857,6 @@ static int _init_opt_clks(struct omap_hwmod *oh) continue; } oc->_clk = c; - /* - * HACK: This needs a re-visit once clk_prepare() is implemented - * to do something meaningful. Today its just a no-op. - * If clk_prepare() is used at some point to do things like - * voltage scaling etc, then this would have to be moved to - * some point where subsystems like i2c and pmic become - * available. - */ - clk_prepare(oc->_clk); } return ret; @@ -945,7 +936,7 @@ static void _enable_optional_clocks(struct omap_hwmod *oh) if (oc->_clk) { pr_debug("omap_hwmod: enable %s:%s\n", oc->role, __clk_get_name(oc->_clk)); - clk_enable(oc->_clk); + clk_prepare_enable(oc->_clk); } } @@ -960,7 +951,7 @@ static void _disable_optional_clocks(struct omap_hwmod *oh) if (oc->_clk) { pr_debug("omap_hwmod: disable %s:%s\n", oc->role, __clk_get_name(oc->_clk)); - clk_disable(oc->_clk); + clk_disable_unprepare(oc->_clk); } }