From patchwork Fri Dec 22 09:26:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 10129303 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 67FF960318 for ; Fri, 22 Dec 2017 09:26:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66D7329FF7 for ; Fri, 22 Dec 2017 09:26:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A05F2A023; Fri, 22 Dec 2017 09:26:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D9D2529FF7 for ; Fri, 22 Dec 2017 09:26:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=REWiOtYFpeBsKOCoTuJWSzKZxFXr3xv/kzrRp+WOgQE=; b=jFP0ihbd4n6Avh X7RW/SP968YLdiMT8oOlcyTJKw5f6QY1GSUzQGhn4Gx/LZP+dtYjtL8MRns1D/L+3FWDL/C6KhVME aLqcALCrqe2M3c8p3s5aE+72fcOLf3sZLaPjC+KNWbNNLzneXn9c3T5CeSDgASxGSSAH7seyvLQxV RWjtZUH9oRSNIMJIsyfYb8c2VmWGk8M2CRwYfhAB9xegRoJDawDH+fN2XZXsgRjAHQlwDWPdV88ZW Q0NtqiCH4ea91h7GJXB9ramUMTWNom6NHZpvzTfvPgm13VDltIJV3ICKzlHS2Fq5CQuGT4Y4dzmPD +cy818w6ATc8t1LO9HmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eSJb2-0000uR-IU; Fri, 22 Dec 2017 09:26:28 +0000 Received: from lelnx193.ext.ti.com ([198.47.27.77]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eSJay-0000tA-S5 for linux-arm-kernel@lists.infradead.org; Fri, 22 Dec 2017 09:26:26 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id vBM9Q9CX011389; Fri, 22 Dec 2017 03:26:09 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1513934769; bh=6eaz3v+15HF7lZIE7u8QQzPsnPNAFqBuYhFvdvVUvfY=; h=From:To:CC:Subject:Date; b=olSKsZ27qI1TVfgBK8DPFOmOWUFadZ7ose9q0CjVpSq1ySEtrq+uJs0Ug98O1q+o0 jeY21dVgRgIb8o32UAqoIPDDv69ckqCsykbVp7M+HT371q3/HG185rKcaumuqG1ylk 8FsN3edG9ETzTlhn4kIbZGUFGSa3xlkHyTGVZx+o= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBM9Q957006472; Fri, 22 Dec 2017 03:26:09 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Fri, 22 Dec 2017 03:26:09 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Fri, 22 Dec 2017 03:26:09 -0600 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBM9Q7XN010392; Fri, 22 Dec 2017 03:26:08 -0600 From: Tero Kristo To: , , Subject: [PATCH] ARM: OMAP2+: hwmod_core: enable optional clocks before main clock Date: Fri, 22 Dec 2017 11:26:03 +0200 Message-ID: <1513934763-23966-1-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171222_012625_043360_3783C0CD X-CRM114-Status: UNSURE ( 8.09 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The optional clocks must be enabled before the main clock after the transition to clkctrl controlled clocks is done. Otherwise the module we attempt to enable might be stuck in transition. Reported-by: Keerthy Signed-off-by: Tero Kristo Tested-by: Keerthy --- Hi Tony, This patch fixes a regression seen in linux-next, where certain peripherals fail to enable after the clkctrl changes are in. The case seen has been with mcasp3, where it fails to transition to enabled during the audio driver probe. Not sure where you want to pick this up, maybe as early rc fixes if its too late to push this to linux-next? arch/arm/mach-omap2/omap_hwmod.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 7324048..340d05c 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -976,6 +976,9 @@ static int _enable_clocks(struct omap_hwmod *oh) pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name); + if (oh->flags & HWMOD_OPT_CLKS_NEEDED) + _enable_optional_clocks(oh); + if (oh->_clk) clk_enable(oh->_clk); @@ -984,9 +987,6 @@ static int _enable_clocks(struct omap_hwmod *oh) clk_enable(os->_clk); } - if (oh->flags & HWMOD_OPT_CLKS_NEEDED) - _enable_optional_clocks(oh); - /* The opt clocks are controlled by the device driver. */ return 0;