From patchwork Wed Jul 22 13:04:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 51349 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 4CACB20323 for ; Wed, 22 Jul 2015 13:07:12 +0000 (UTC) Received: by laah7 with SMTP id h7sf31493759laa.2 for ; Wed, 22 Jul 2015 06:07:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=gawfrr2Cw5E2B/LjW4ne0Zz+aGaTEJapz6U7up216LU=; b=djtuezkka96NDt370yZZVaW8QUBw/5DH4Op9dkNTU3wb7LDpO3s6cUNWTNaxz13dQi m7/08kRUqjxaxA/lixq/bnd591eEjDVwsf7LuJ1WkxHbfddvR9Dw+vbW1madv8zi1Opg 9kpsCL5/fGmTLSIfqpeIEMeQL+Qi5hmAEm7cQp9/o5lK7GMG+SlyPt2d5CFhXF2ITvUF ioTDAZGUxN4qTAdwoXgEaW7lkzQySOB9h5ShaInwNOBs01izPELNeVN7ewR/iZofHKAi RzpER2wmuPEcvVhvRYXwpWL0iEZUgdW3Fl3uZTUWLTUdJdMZLKstsV9vfMdwj5DxBvBb tFXA== X-Gm-Message-State: ALoCoQmwGJ2t1uIkzDNEx8+GjgduwoNa1oop2VMsD5STuAcb3k0z4NRK3vOLXX32nqxfd6m7phk0 X-Received: by 10.180.97.9 with SMTP id dw9mr1650382wib.2.1437570431230; Wed, 22 Jul 2015 06:07:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.101 with SMTP id z5ls77029laz.65.gmail; Wed, 22 Jul 2015 06:07:11 -0700 (PDT) X-Received: by 10.152.10.72 with SMTP id g8mr2231165lab.97.1437570431057; Wed, 22 Jul 2015 06:07:11 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id f10si1172771laf.15.2015.07.22.06.07.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 06:07:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lahh5 with SMTP id h5so137628021lah.2 for ; Wed, 22 Jul 2015 06:07:11 -0700 (PDT) X-Received: by 10.152.36.102 with SMTP id p6mr2278744laj.19.1437570430880; Wed, 22 Jul 2015 06:07:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp2106235lba; Wed, 22 Jul 2015 06:07:09 -0700 (PDT) X-Received: by 10.66.119.136 with SMTP id ku8mr5831755pab.26.1437570429127; Wed, 22 Jul 2015 06:07:09 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ku8si3798967pab.80.2015.07.22.06.07.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jul 2015 06:07:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZHtia-00085g-7I; Wed, 22 Jul 2015 13:05:52 +0000 Received: from mail-wi0-f181.google.com ([209.85.212.181]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZHthX-0006Qb-IA for linux-arm-kernel@lists.infradead.org; Wed, 22 Jul 2015 13:04:48 +0000 Received: by wicmv11 with SMTP id mv11so80735480wic.0 for ; Wed, 22 Jul 2015 06:04:27 -0700 (PDT) X-Received: by 10.180.10.200 with SMTP id k8mr6471650wib.5.1437570267226; Wed, 22 Jul 2015 06:04:27 -0700 (PDT) Received: from localhost.localdomain (host81-129-173-55.range81-129.btcentralplus.com. [81.129.173.55]) by smtp.gmail.com with ESMTPSA id qq1sm2359327wjc.0.2015.07.22.06.04.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Jul 2015 06:04:26 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 5/5] clk: dt: Introduce binding for critical clock support Date: Wed, 22 Jul 2015 14:04:15 +0100 Message-Id: <1437570255-21049-6-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1437570255-21049-1-git-send-email-lee.jones@linaro.org> References: <1437570255-21049-1-git-send-email-lee.jones@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150722_060447_780379_E0D50D4D X-CRM114-Status: GOOD ( 14.04 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.181 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.181 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: devicetree@vger.kernel.org, mturquette@linaro.org, kernel@stlinux.com, s.hauer@pengutronix.de, sboyd@codeaurora.org, geert@linux-m68k.org, maxime.ripard@free-electrons.com, Lee Jones MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Lee Jones --- .../devicetree/bindings/clock/clock-bindings.txt | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt index 06fc6d5..4137034 100644 --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt @@ -44,6 +44,45 @@ For example: clocks by index. The names should reflect the clock output signal names for the device. +critical-clock: Some hardware contains bunches of clocks which, in normal + circumstances, must never be turned off. If drivers a) fail to + obtain a reference to any of these or b) give up a previously + obtained reference during suspend, it is possible that some + Operating Systems might attempt to disable them to save power. + If this happens a platform can fail irrecoverably as a result. + Usually the only way to recover from these failures is to + reboot. + + To avoid either of these two scenarios from catastrophically + disabling an otherwise perfectly healthy running system, + clocks can be identified as 'critical' using this property from + inside a clocksource's node. + + This property is not to be abused. It is only to be used to + protect platforms from being crippled by gated clocks, NOT as a + convenience function to avoid using the framework correctly + inside device drivers. + + Expected values are hardware clock indices. If the + clock-indices property (see below) is used, then supplied + values must correspond to one of the listed identifiers. + Using the clock-indices example below, hardware clock <2> + is missing, therefore it is considered invalid to then + list clock <2> as a critical clock. + +For example: + + oscillator { + #clock-cells = <1>; + clock-output-names = "ckil", "ckih"; + critical-clock = <0>, <1>; + }; + +- this node defines a device with two clock outputs, just as in the + example above. The only difference being that 'ckil' and 'ckih' + are now identified as an critical clocks, so an OS will know to + never attempt to gate them. + clock-indices: If the identifying number for the clocks in the node is not linear from zero, then this allows the mapping of identifiers into the clock-output-names array.