From patchwork Wed Apr 1 12:28:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 46621 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 41723216D1 for ; Wed, 1 Apr 2015 12:29:49 +0000 (UTC) Received: by lajy8 with SMTP id y8sf10586479laj.3 for ; Wed, 01 Apr 2015 05:29:48 -0700 (PDT) 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=2K5hCzekOTXWQlR1jagYyyr03ONFv9Dzr1cNQSDJc9s=; b=eC6TEAR9GcKmajPSh7H9NAhBOVLGgW7Fo+NVgVyYpLRigP2UdO9Tsontt8Edm7es/S sXEwOke2sHjF7EfgDvA/31k5URHiH6ZcZoEzN8fyMn12PnuMuPRzmG5+v/Pj9NvIbiQG yiGxLrzSPUghvm+IsebH0GIL6SHg9iBhbYkd3/dFhn/M20HnGLV5vlac8fr4JU+EPlGZ 72GMwwPWFCz47Uv91mjAJwmYgEEKvpHpCmXO7XKUG8LjvOCXmx06wrKASN5G3ot27r/9 nWPZxgqto6eB7BUvJD4DZZtKOMpfJ3XKxm8qysHFvGMp0CSSivYGB3kpiMAE4EcgTa7V TMdQ== X-Gm-Message-State: ALoCoQkxMFJA4mnBjgKiIloaYrTVepzgkRCJ/uHwZbw+g33uV66B+Hi1QTOcL3E+wkvpIs8ywxmx X-Received: by 10.180.9.228 with SMTP id d4mr1740389wib.1.1427891388207; Wed, 01 Apr 2015 05:29:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.163 with SMTP id az3ls61648lab.64.gmail; Wed, 01 Apr 2015 05:29:48 -0700 (PDT) X-Received: by 10.112.132.35 with SMTP id or3mr23538623lbb.85.1427891388013; Wed, 01 Apr 2015 05:29:48 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id s17si1481572lal.30.2015.04.01.05.29.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Apr 2015 05:29:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by lbbzk7 with SMTP id zk7so18584073lbb.0 for ; Wed, 01 Apr 2015 05:29:47 -0700 (PDT) X-Received: by 10.112.8.101 with SMTP id q5mr35742318lba.19.1427891387508; Wed, 01 Apr 2015 05:29:47 -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.57.201 with SMTP id k9csp629963lbq; Wed, 1 Apr 2015 05:29:46 -0700 (PDT) X-Received: by 10.70.133.66 with SMTP id pa2mr5401614pdb.164.1427891385473; Wed, 01 Apr 2015 05:29:45 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2si2669235pdk.246.2015.04.01.05.29.44; Wed, 01 Apr 2015 05:29:45 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-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 S932088AbbDAM3i (ORCPT + 27 others); Wed, 1 Apr 2015 08:29:38 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:36511 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753343AbbDAM2i (ORCPT ); Wed, 1 Apr 2015 08:28:38 -0400 Received: by wgra20 with SMTP id a20so51501866wgr.3 for ; Wed, 01 Apr 2015 05:28:37 -0700 (PDT) X-Received: by 10.194.20.67 with SMTP id l3mr81838201wje.94.1427891317037; Wed, 01 Apr 2015 05:28:37 -0700 (PDT) Received: from localhost.localdomain ([81.134.86.156]) by mx.google.com with ESMTPSA id lg18sm25254076wic.23.2015.04.01.05.28.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Apr 2015 05:28:36 -0700 (PDT) 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 v5 4/4] clk: dt: Introduce binding for always-on clock support Date: Wed, 1 Apr 2015 13:28:24 +0100 Message-Id: <1427891304-20160-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427891304-20160-1-git-send-email-lee.jones@linaro.org> References: <1427891304-20160-1-git-send-email-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.176 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 | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt index 06fc6d5..94cdda2 100644 --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt @@ -44,6 +44,37 @@ 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. + + 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 = <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 always-on clocks, so the framework 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.