From patchwork Fri Feb 27 21:14:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 45266 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 09764204BC for ; Fri, 27 Feb 2015 21:23:16 +0000 (UTC) Received: by wghl18 with SMTP id l18sf15940922wgh.3 for ; Fri, 27 Feb 2015 13:23:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=f6fUBfqGaWuWDQTNcxl1akCBBay7LdQFLyAOrcN7INE=; b=dr+C42MN3RmNT1F45verxkTTaxWiTsxhLN86PPGemdkmlvEdbLB0lBNYsFmBVXuriG KGMYafkySrNlhAP2vptqrELAK27FJiUzT3UiIBIrjNi4ZSgaEe6FciMRNNlKuLHxeyMv z3kdS9rMhSkvaMwI33qh08Z8htgvq76I70CIoYtycqFXUSYrVt2DMAiZlCRIOQ4xyp/d 1IOpHP4IUwLqln1oN1ympxms1TkxmZNlJWIpGI3ChVco2Zphy/2ZqTQhsFscxDoKrDw6 fiRoDRYXRoO+WiuHJVYr+TYO5JvqswP4m5TBc7a1Zuvy3Si3AdPb698eKjJGCfX6q88k b2Pg== X-Gm-Message-State: ALoCoQmer8iehJQtzx2nD9eBHijio+3AlFuLFY+nnPI3Hy9vfeTJhmAToLQ1se+/whYX7gKqiVZC X-Received: by 10.180.8.67 with SMTP id p3mr765628wia.7.1425072195281; Fri, 27 Feb 2015 13:23:15 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.225.132 with SMTP id rk4ls238137lac.79.gmail; Fri, 27 Feb 2015 13:23:15 -0800 (PST) X-Received: by 10.152.120.225 with SMTP id lf1mr14707822lab.20.1425072195087; Fri, 27 Feb 2015 13:23:15 -0800 (PST) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id ki19si3782357lbb.89.2015.02.27.13.23.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 13:23:14 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbvn10 with SMTP id n10so19735352lbv.6 for ; Fri, 27 Feb 2015 13:23:14 -0800 (PST) X-Received: by 10.152.22.67 with SMTP id b3mr14209093laf.117.1425072194807; Fri, 27 Feb 2015 13:23:14 -0800 (PST) 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.35.133 with SMTP id h5csp4163878lbj; Fri, 27 Feb 2015 13:23:14 -0800 (PST) X-Received: by 10.68.204.3 with SMTP id ku3mr27637002pbc.148.1425072192680; Fri, 27 Feb 2015 13:23:12 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fj14si375587pac.128.2015.02.27.13.23.11; Fri, 27 Feb 2015 13:23:12 -0800 (PST) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755169AbbB0VXA (ORCPT + 5 others); Fri, 27 Feb 2015 16:23:00 -0500 Received: from mail-wi0-f173.google.com ([209.85.212.173]:35064 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755394AbbB0VWy (ORCPT ); Fri, 27 Feb 2015 16:22:54 -0500 Received: by wibbs8 with SMTP id bs8so3140489wib.0 for ; Fri, 27 Feb 2015 13:22:52 -0800 (PST) X-Received: by 10.181.13.14 with SMTP id eu14mr10608064wid.2.1425072172851; Fri, 27 Feb 2015 13:22:52 -0800 (PST) Received: from localhost.localdomain ([31.91.229.167]) by mx.google.com with ESMTPSA id hs7sm4477856wib.4.2015.02.27.13.22.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Feb 2015 13:22:50 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: lee.jones@linaro.org, kernel@stlinux.com, mturquette@linaro.org, sboyd@codeaurora.org, devicetree@vger.kernel.org Subject: [PATCH 4/4] clk: dt: Introduce binding for always-on clock support Date: Fri, 27 Feb 2015 21:14:34 +0000 Message-Id: <1425071674-16995-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1425071674-16995-1-git-send-email-lee.jones@linaro.org> References: <1425071674-16995-1-git-send-email-lee.jones@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.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.217.181 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Lee Jones --- .../devicetree/bindings/clock/clock-bindings.txt | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt index 06fc6d5..ad17121 100644 --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt @@ -44,6 +44,40 @@ For example: clocks by index. The names should reflect the clock output signal names for the device. +clock-always-on: Some hardware contains bunches of clocks which 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, the common clk framework will attempt to + disable them and 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 always-on using this property + from inside a clocksource's node. The CLK_IGNORE_UNUSED + flag will be applied to each clock instance named in this + property, thus preventing them from being shut down by the + framework. + + 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. + +For example: + + oscillator { + #clock-cells = <1>; + clock-output-names = "ckil", "ckih"; + clock-always-on = "ckil"; + }; + +- this node defines a device with two clock outputs, just as in the + example above. The only difference being that 'ckil' is now + identified as an always-on clock, so the framework will know to + never attempt to gate it. + 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.