From patchwork Mon Dec 17 16:35:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 1887961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 42532DF266 for ; Mon, 17 Dec 2012 16:39:35 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tkdg8-0003A3-Rt; Mon, 17 Dec 2012 16:36:32 +0000 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tkdft-00035r-08 for linux-arm-kernel@lists.infradead.org; Mon, 17 Dec 2012 16:36:19 +0000 Received: from mudshark.cambridge.arm.com (mudshark.cambridge.arm.com [10.1.79.58]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id qBHGa7ki000279; Mon, 17 Dec 2012 16:36:07 GMT Received: by mudshark.cambridge.arm.com (Postfix, from userid 1000) id B39BAC2B12; Mon, 17 Dec 2012 16:36:05 +0000 (GMT) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/6] ARM: psci: add devicetree binding for describing PSCI firmware Date: Mon, 17 Dec 2012 16:35:38 +0000 Message-Id: <1355762141-29616-4-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1355762141-29616-1-git-send-email-will.deacon@arm.com> References: <1355762141-29616-1-git-send-email-will.deacon@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121217_113617_337383_C9FD2161 X-CRM114-Status: GOOD ( 11.40 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.96.50 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: dave.martin@linaro.org, arnd@arndb.de, nico@fluxnic.net, Marc.Zyngier@arm.com, Will Deacon , xen-devel@lists.xen.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds a new devicetree binding for describing PSCI firmware to Linux. Signed-off-by: Will Deacon --- Documentation/devicetree/bindings/arm/psci.txt | 58 ++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/psci.txt diff --git a/Documentation/devicetree/bindings/arm/psci.txt b/Documentation/devicetree/bindings/arm/psci.txt new file mode 100644 index 0000000..904d0d3 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/psci.txt @@ -0,0 +1,58 @@ +* Power State Coordination Interface (PSCI) + +Firmware implementing the PSCI functions described in ARM document number +ARM DEN 0022A ("Power State Coordination Interface System Software on ARM +processors") can be used by Linux to initiate various CPU-centric power +operations. + +Issue A of the specification describes functions for CPU suspend, hotplug +and migration of secure software. + +Functions are invoked by trapping to the privilege level of the PSCI +firmware (specified as part of the binding below) and passing arguments +in a manner similar to that specified by AAPCS: + + r0 => 32-bit Function ID / return value + {r1 - r3} => Parameters + +Note that the immediate field of the trapping instruction must be set +to #0. + + +Main node required properties: + + - compatible : Must be "arm,psci" + + - method : The method of calling the PSCI firmware. Permitted + values are: + + "smc" : SMC #0, with the register assignments specified + in this binding. + + "hvc" : HVC #0, with the register assignments specified + in this binding. + + - function-base : The base ID from which the functions are offset. + +Main node optional properties: + + - cpu_suspend : Offset of CPU_SUSPEND ID from function-base + + - cpu_off : Offset of CPU_OFF ID from function-base + + - cpu_on : Offset of CPU_ON ID from function-base + + - migrate : Offset of MIGRATE ID from function-base + + +Example: + + psci { + compatible = "arm,psci"; + method = "smc"; + function-base = <0x95c1ba5e>; + cpu_suspend = <0>; + cpu_off = <1>; + cpu_on = <2>; + migrate = <3>; + };