Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp102648imu; Wed, 7 Nov 2018 21:45:57 -0800 (PST) X-Google-Smtp-Source: AJdET5c6KLFJcagxBkUwc0HCq3Kd98ltulF6TVV0+LlouooHMD1qy/QbXBgVu1UJQWIeMT6jDav/ X-Received: by 2002:a62:ab05:: with SMTP id p5-v6mr3249752pff.211.1541655957906; Wed, 07 Nov 2018 21:45:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541655957; cv=none; d=google.com; s=arc-20160816; b=pwBNQiQ/ylnbVp1OkIzkjtQUlxANTfiI7+YOYhYxKm0MeAVmIEIDSBx+Xg22dLmuI0 V45gBO/EGmc0hGdknggzFX49euGRmi344AZxxojpHbZRFDO1LaOUX+2t+wOxv4rpVV0C 6JfGl6QlZYxM+thpyjZS7YqW9LRuEhLRDVuWQabAdG8PSqQJcjU+26W4yMsYW7wbP9HM 8CsBneINzy0XdArM8jUqaV7jKq8xPjNslz0jM62vlX0bijGEV95JGPtsJRhoiq47+zhm Ek/kr8Bh+MDY+fkvimqjiRRGZTYVFYp7VEOPz5s5uFY9pMKQWGhFwkXAFoXJULfi+0xY BkbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PipJVY5sFU16Qb6+h/dT5wHv56gIrPYtITAPBUsnwyY=; b=bS+ve2fqAlmIxAX7X9m1CrG4QSkfxIi2PAkbOdvNeVTFPgYV0dh5p3nk8dwTEsBpCP lafcBmHYiERicw9vjGo2tnB1/6a4JSyEY/PT09udW+Y3y8Sj8wJ6dnqbi8EEKRXs48uN dFq2pmQXeflTcpPNxD4NQfpfAJNJq+yPEtE/x+0tVoBgb2afsvmzCyldsVSxbYoZ8DOs Kw3lV9RtTdBtSNNKza2YiKCQkdUG+6/afLsme/sZMBUhLf+GnHLEP57lCnQPc7wD1k9g 37spt3BdwDB/SxK6kNvmeg/iZ0FOMkIRSVf3tXBdckaoCnFfn2fBq6kRi4KMcjV6vTps 4jtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R92vinCB; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4si2880984pgi.387.2018.11.07.21.45.29; Wed, 07 Nov 2018 21:45:57 -0800 (PST) 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=@linaro.org header.s=google header.b=R92vinCB; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726245AbeKHPSm (ORCPT + 99 others); Thu, 8 Nov 2018 10:18:42 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35538 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbeKHPSm (ORCPT ); Thu, 8 Nov 2018 10:18:42 -0500 Received: by mail-pg1-f194.google.com with SMTP id 32-v6so8383632pgu.2 for ; Wed, 07 Nov 2018 21:44:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PipJVY5sFU16Qb6+h/dT5wHv56gIrPYtITAPBUsnwyY=; b=R92vinCBec0veUAkmYgsV3/GSuERVmuaXKcrOjOgvspe6hA91dbk155Xj5Wx43yXfq Z1J56Gsw/+0JRHP27I9egv+ZF39k09rkScTnEgTIxRx9lH0G1s9juFPHAr1DiM3veOzA 3EdZj9OCDR7XA35+vYHCWOU5tVmeXUZakDEGY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PipJVY5sFU16Qb6+h/dT5wHv56gIrPYtITAPBUsnwyY=; b=lhYv1SYfK6Di5nnxldnpcoT1Tcr0cvlSgpJbEr9v0+wl3hfbpbTKy0/HWkkvbI3p+G Vmy9O+4+RE1F9W3lmfRpHZcu/JSA0q+/MS04QyiXotO5D2PuQ6BcHEf65ZkW6Y6AZEB+ OBEYJLxvFfQcAhdD4fQUV2K4SndFgQOIW9rkJjCEnZiDaLHm7pLlumUZg43J7Wd4DfzW 7P7m0VRePsoZ+v5CQLQ/WQ+YwYWwaQ6msUO6CcT8aB09u7f4BjnPS86F5hJB7ZR7oAFw NWZnnkBmiieLCMlImNJJOHpLsn9gv9GP2TfuyrukUJWOlq/nAJaifdl7/pr1H1O/vHQ8 FunQ== X-Gm-Message-State: AGRZ1gKvjy7Ug9aXERLmwFFM4cW/a4kgTWtxehXlyK4SRidDxvmJTHGD tWf+EFLqAz1sHLm3yErfAt904A== X-Received: by 2002:aa7:8348:: with SMTP id z8-v6mr3228077pfm.81.1541655895681; Wed, 07 Nov 2018 21:44:55 -0800 (PST) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id 3-v6sm3074259pfw.17.2018.11.07.21.44.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Nov 2018 21:44:54 -0800 (PST) Date: Wed, 7 Nov 2018 21:44:52 -0800 From: Bjorn Andersson To: Stephen Boyd Cc: Stephen Boyd , Michael Turquette , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Taniya Das Subject: Re: [PATCH 1/2] dt-bindings: clk: Introduce 'protected-clocks' property Message-ID: <20181108054452.GD2337@tuxbook-pro> References: <20181105194011.43770-1-swboyd@chromium.org> <20181105194011.43770-2-swboyd@chromium.org> <20181106010426.GX2523@minitux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181106010426.GX2523@minitux> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 05 Nov 17:04 PST 2018, Bjorn Andersson wrote: > On Mon 05 Nov 11:40 PST 2018, Stephen Boyd wrote: > > > Add a generic clk property for clks which are not intended to be used by > > the OS due to security restrictions put in place by firmware. For > > example, on some Qualcomm firmwares reading or writing certain clk > > registers causes the entire system to reboot, but on other firmwares > > reading and writing those same registers is required to make devices > > like QSPI work. Rather than adding one-off properties each time a new > > set of clks appears to be protected, let's add a generic clk property to > > describe any set of clks that shouldn't be touched by the OS. This way > > we never need to register the clks or use them in certain firmware > > configurations. > > > > Cc: Rob Herring > > Cc: Bjorn Andersson > > Reviewed-by: Bjorn Andersson > Gave this some additional thought. The way this is blacklisting protected clocks makes it impossible to be backwards compatible with an older DT while adding new protected clocks to an existing driver. I don't have better suggestion for handling this and the problem should primarily be isolated to the beginning of the upstream life of a platform, so perhaps we can just ignore this issue? Regards, Bjorn > Regards, > Bjorn > > > Cc: Taniya Das > > Signed-off-by: Stephen Boyd > > --- > > .../devicetree/bindings/clock/clock-bindings.txt | 16 ++++++++++++++++ > > 1 file changed, 16 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt > > index 2ec489eebe72..b646bbcf7f92 100644 > > --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt > > +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt > > @@ -168,3 +168,19 @@ a shared clock is forbidden. > > > > Configuration of common clocks, which affect multiple consumer devices can > > be similarly specified in the clock provider node. > > + > > +==Protected clocks== > > + > > +Some platforms or firmwares may not fully expose all the clocks to the OS, such > > +as in situations where those clks are used by drivers running in ARM secure > > +execution levels. Such a configuration can be specified in device tree with the > > +protected-clocks property in the form of a clock specifier list. This property should > > +only be specified in the node that is providing the clocks being protected: > > + > > + clock-controller@a000f000 { > > + compatible = "vendor,clk95; > > + reg = <0xa000f000 0x1000> > > + #clocks-cells = <1>; > > + ... > > + protected-clocks = , ; > > + }; > > -- > > Sent by a computer through tubes > >