Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp189246ybe; Thu, 5 Sep 2019 20:17:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqymo5iEz148cRUFOutluHyCleQp9yq6CrCu1W3Aeo7tuYD3KyE+4l83FNZ7SKo1dmLaxhMU X-Received: by 2002:a63:a302:: with SMTP id s2mr6138105pge.125.1567739828979; Thu, 05 Sep 2019 20:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567739828; cv=none; d=google.com; s=arc-20160816; b=ucTJZB8Ce4jERCe/ZqnFfGs43mm1OvGF9QrgqtRXaFbY8SsIwm8aN7M3RIzKUDSf46 oAuDwuqtaL3bhBTvuYBqVE2rEB8ZUJhi57budBIOJvo4pdrXyFVvhF6fzg5DKAaBmrZN y2VN3oO4U/ILA/W/zmOCyy05kgXTBQ82yANVu/1IOw6sOYV5aOa8zpiFw4FyUs1u2tiC ij5PHPEKMvsaPxZ96Y3cCWwpy0MqB6wEiMtkdep7mvTFUP59v0qo9Vjkoh6onT3KdaY3 3LubLNZUCjCjE9HfbV8l1U6RTB2Ld4DesjxfMQbbaO7LZIvAr1k17rb7dSazYA8+RI02 j4kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:from:to :subject:cc:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=KMCg4BnWWE/5WYxMle5+q+OVPUFJUnN8yGfxlfY02Sk=; b=mIaADUkXJ0dO2EsWDo4VhlRG0m5pd132SLQfZZPTCTtNlwMsu4JP9dXDTDrcgtc1cu WbjbwcurhXVVdKS8cyfIUhU0dCnyM9DfepBMCzQOK9DnaDQhh+0uqxTAJ4y1VxdGNj92 yUxWdJGTq/Mf1Ttr+X9cR6yU/I8zIqHjULwDNPPySXqYR/DVGKTbUhm9Zj43tTD8i3LF XWnp2/35+K+yUVS29iX/tfrnEgZoPGu5duGHcuJeh2yxallla5uolK3uw4qWEHzfcD+i C2bySC+nxWEddU5GLS7n6P6Hf+x8tkp/D4ZR14jMfhir1Oz/Q2lx2azbesUjp5WnoZfV jg+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IlowzJdJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u190si3688755pfb.189.2019.09.05.20.16.53; Thu, 05 Sep 2019 20:17:08 -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=IlowzJdJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732456AbfIES4F (ORCPT + 99 others); Thu, 5 Sep 2019 14:56:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:57202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729782AbfIES4F (ORCPT ); Thu, 5 Sep 2019 14:56:05 -0400 Received: from kernel.org (unknown [104.132.0.74]) (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 9203A206BA; Thu, 5 Sep 2019 18:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567709765; bh=KMCg4BnWWE/5WYxMle5+q+OVPUFJUnN8yGfxlfY02Sk=; h=In-Reply-To:References:Cc:Subject:To:From:Date:From; b=IlowzJdJmOcAs6mWH/op88mTjNUcbnSETmgyVsDNE23bZIDo3c3f32+znlVqH4Coh J0Vt+e99G49iLLZd/KtYgeCxi9PvYc/w1uZoihrpH2el+xvTa8Yf64ixBms+zDIRxj Y0kO1Kz/BL6qPLZDx3y8LQhtWaPdcOxMVnMXb8hk= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190821122436.k3s7srhraphfnvgp@flea> References: <20190820032311.6506-1-samuel@sholland.org> <20190820032311.6506-3-samuel@sholland.org> <20190820071142.2bgfsnt75xfeyusp@flea> <3b67534a-eb1b-c1e8-b5e8-e0a74ae85792@sholland.org> <20190821122436.k3s7srhraphfnvgp@flea> Cc: Chen-Yu Tsai , Jassi Brar , Michael Turquette , Rob Herring , Mark Rutland , Corentin Labbe , Vasily Khoruzhick , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v4 02/10] clk: sunxi-ng: Mark AR100 clocks as critical To: Maxime Ripard , Samuel Holland From: Stephen Boyd User-Agent: alot/0.8.1 Date: Thu, 05 Sep 2019 11:56:03 -0700 Message-Id: <20190905185605.9203A206BA@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Maxime Ripard (2019-08-21 05:24:36) > On Tue, Aug 20, 2019 at 08:02:55AM -0500, Samuel Holland wrote: > > On 8/20/19 2:11 AM, Maxime Ripard wrote: > > > So I'm not really sure that we should do it statically this way, and > > > that we should do it at all. > > > > Do you have a better way to model "firmware uses this clock behind the = scenes, > > so Linux please don't touch it"? It's unfortunate that we have Linux and > > firmware fighting over the R_CCU, but since we didn't have firmware (e.= g. SCPI > > clocks) in the beginning, it's where we are today. > > > > The AR100 clock doesn't actually have a gate, and it generally has depe= ndencies > > like R_INTC in use. So as I mentioned in the commit message, the clock = will > > normally be on anyway. The goal was to model the fact that there are us= ers of > > this clock that Linux doesn't/can't know about. >=20 > Like I said, if that's an option, I'd prefer to have protected-clocks > work for everyone / for sunxi. >=20 Yes. Use protected-clocks to indicate what shouldn't be touched by the kernel. It's not super easy to make it "generic" right now, but I suppose we can work the flag into the core framework more so that we still register the clks but otherwise make the 'clk_get()' operation fail on them somehow and the disable unused operation skip them. I just took the easy way out for qcom for the time being and didn't register them from the driver.