From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755386AbdCTO3m (ORCPT ); Mon, 20 Mar 2017 10:29:42 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:18676 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755318AbdCTO3i (ORCPT ); Mon, 20 Mar 2017 10:29:38 -0400 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 20 Mar 2017 07:29:32 -0700 Date: Mon, 20 Mar 2017 16:29:22 +0200 From: Peter De Schrijver To: Thierry Reding CC: Prashant Gaikwad , Michael Turquette , Stephen Boyd , "Stephen Warren" , Alexandre Courbot , , , Subject: Re: [PATCH] clk: tegra: fix disable unused for clocks sharing enable bit Message-ID: <20170320142922.GI21907@tbergstrom-lnx.Nvidia.com> References: <1489587055-23722-1-git-send-email-pdeschrijver@nvidia.com> <20170320132746.GK22463@ulmo.ba.sec> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170320132746.GK22463@ulmo.ba.sec> X-NVConfidentiality: public User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [10.21.24.170] X-ClientProxiedBy: DRUKMAIL102.nvidia.com (10.25.59.20) To UKMAIL101.nvidia.com (10.26.138.13) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 20, 2017 at 02:27:46PM +0100, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Wed, Mar 15, 2017 at 04:10:54PM +0200, Peter De Schrijver wrote: > > In case 2 clocks share an enable bit and one of them is enabled by a driver > > and the other one is not, CCF will think it's enabled because it will only > > look at the hw state. Therefor it will disable the clock and thus also > > disable the other clock which was enabled. Solve this by reading the > > initial state of the enable bit and incrementing the refcount if it's set. > > > > Signed-off-by: Peter De Schrijver > > --- > > drivers/clk/tegra/clk-periph-gate.c | 3 +++ > > 1 file changed, 3 insertions(+) > > I think you had already sent a version of this patch a couple of weeks > ago. I've applied the first version since I couldn't spot any delta > between them. Hmm. Could be. Cheers, Peter.