Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2235647ybi; Thu, 20 Jun 2019 11:20:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsLFUKIbZFh0HSf/JlcHPgp3yinxBF500Ge528DdAdx5etHEpcNHI05Hvavt390Fm1ZQV6 X-Received: by 2002:aa7:9156:: with SMTP id 22mr14027232pfi.247.1561054852841; Thu, 20 Jun 2019 11:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561054852; cv=none; d=google.com; s=arc-20160816; b=C5oz2iXr4zMWKNgF97tRAu8gZpE5qLIkNGLC/daEkcEnMPYzlreuji5sR81Cf1yFml tUgDtqboAEV9lW07ZThthhXTkA/TVobez6W49f8J2toy/+/xCMHuDPZO6BtwwTw9xsxH o88wYaUM0jbkCPe9W0cd2D55boYgiqswksW88eqw8GmNzrD15L6mlLZp8blJvjEnmAL4 ZIEdiIZg7MFE/BBtLJqsJ4BBPVA+fcTiFDXYXeAfaf9CGR3RE6DBCH8lBKzSFDyD+gzT 4mqGAgz+lxnPuvUWDhC1DHdpGdjiZtxc1tGVJHs5xs8BJoRihJoX+8X/CD/JEWzBz5H0 lhbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4ZPPMqCnjMfhiT+XurfbUq7bQHS9z4BNkpUiCNl5VBY=; b=AoYuXc8qAJnHrQ6zqU8L2MW4S9xEqr/mib2jc/wvCzXdRxSU7vJM94NQrgsCjwhrTp 1DmAt01VF9qjrDLrblw6zbVGbsFZHz2OqDWnWQvtvZn//Nw1Dml9W+DWExnaC0QHrvJF IjexVg/lOkcZm7zCeOKFFjjslTqwPkCPR0pKlyoUP8pJA6UZtyhxRawnerldpDXow3v3 1Nfl99UWlTPVbHP/TtB1Kg0NHlO99mI4mOyH5HUtpqAJFuNElIqBvkNCdwxPxslNOxge eTjhdkRfGZo9niaSq01G2xXaG6q10y6oO/NbQtbxvtRlD4RdSE3nniky9q1I6g4uLdE4 GmMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="xgc5/T7n"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e39si351769plg.103.2019.06.20.11.20.37; Thu, 20 Jun 2019 11:20:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="xgc5/T7n"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729481AbfFTSTs (ORCPT + 99 others); Thu, 20 Jun 2019 14:19:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:43196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729483AbfFTSOp (ORCPT ); Thu, 20 Jun 2019 14:14:45 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B6B62082C; Thu, 20 Jun 2019 18:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561054484; bh=e3PgroTUILzkasNEozigCK7QrPNLM19zAiAv/mT3ZVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xgc5/T7n5w69lmKVtXF6AnZRzxKf0myajWAlyLnCUjbPhnJ4yaP0agpihbdj92UFY xlLcHhzuCfj0hA0xxGosvOjUkwaHb+928Vqr/X7DZSdwntAOkkajjgDqptMStjDjOS LXInK7u3NONrcBNfjyDR+XAdqZuqJG4mB3eWdWg8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tony Lindgren , Stephen Boyd , Sasha Levin Subject: [PATCH 5.1 43/98] clk: ti: clkctrl: Fix clkdm_clk handling Date: Thu, 20 Jun 2019 19:57:10 +0200 Message-Id: <20190620174351.089052435@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190620174349.443386789@linuxfoundation.org> References: <20190620174349.443386789@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 1cc54078d104f5b4d7e9f8d55362efa5a8daffdb ] We need to always call clkdm_clk_enable() and clkdm_clk_disable() even the clkctrl clock(s) enabled for the domain do not have any gate register bits. Otherwise clockdomains may never get enabled except when devices get probed with the legacy "ti,hwmods" devicetree property. Fixes: 88a172526c32 ("clk: ti: add support for clkctrl clocks") Signed-off-by: Tony Lindgren Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/ti/clkctrl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c index 639f515e08f0..3325ee43bcc1 100644 --- a/drivers/clk/ti/clkctrl.c +++ b/drivers/clk/ti/clkctrl.c @@ -137,9 +137,6 @@ static int _omap4_clkctrl_clk_enable(struct clk_hw *hw) int ret; union omap4_timeout timeout = { 0 }; - if (!clk->enable_bit) - return 0; - if (clk->clkdm) { ret = ti_clk_ll_ops->clkdm_clk_enable(clk->clkdm, hw->clk); if (ret) { @@ -151,6 +148,9 @@ static int _omap4_clkctrl_clk_enable(struct clk_hw *hw) } } + if (!clk->enable_bit) + return 0; + val = ti_clk_ll_ops->clk_readl(&clk->enable_reg); val &= ~OMAP4_MODULEMODE_MASK; @@ -179,7 +179,7 @@ static void _omap4_clkctrl_clk_disable(struct clk_hw *hw) union omap4_timeout timeout = { 0 }; if (!clk->enable_bit) - return; + goto exit; val = ti_clk_ll_ops->clk_readl(&clk->enable_reg); -- 2.20.1