From: "Andrew F. Davis" <afd@ti.com>
To: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Russell King <linux@armlinux.org.uk>,
Jens Wiklander <jens.wiklander@linaro.org>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, "Andrew F . Davis" <afd@ti.com>
Subject: [PATCH 2/2] tee: optee: allow selection of ti-smc as a calling method
Date: Mon, 18 Sep 2017 15:50:05 -0500 [thread overview]
Message-ID: <20170918205005.30235-2-afd@ti.com> (raw)
In-Reply-To: <20170918205005.30235-1-afd@ti.com>
On TI platforms OP-TEE must be called using a modified SMC call,
allow the selection of this though DT.
Signed-off-by: Andrew F. Davis <afd@ti.com>
---
Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt | 2 ++
drivers/tee/optee/core.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt
index d38834c67dff..a3275ecdf186 100644
--- a/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt
+++ b/Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt
@@ -20,6 +20,8 @@ the reference implementation maintained by Linaro.
"hvc" : HVC #0, with the register assignments specified
in drivers/tee/optee/optee_smc.h
+ "ti-smc" : Similar to "smc" with TI specific register
+ adjustments
Example:
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index 7952357df9c8..dfa9de590d98 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -441,6 +441,8 @@ static optee_invoke_fn *get_invoke_func(struct device_node *np)
return optee_smccc_hvc;
else if (!strcmp("smc", method))
return optee_smccc_smc;
+ else if (!strcmp("ti-smc", method))
+ return arm_ti_smccc_smc;
pr_warn("invalid \"method\" property: %s\n", method);
return ERR_PTR(-EINVAL);
--
2.14.1
next prev parent reply other threads:[~2017-09-18 20:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 20:50 [PATCH 1/2] ARM: smccc-call: Use r12 to route secure monitor calls on TI platforms Andrew F. Davis
2017-09-18 20:50 ` Andrew F. Davis [this message]
2017-09-19 13:36 ` [PATCH 2/2] tee: optee: allow selection of ti-smc as a calling method Rob Herring
[not found] ` <CAL_JsqJ00f3i3BQKjuVUXO8Rc_EC8BaycQi1Z_9OyRff7_kDpg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-19 15:54 ` Andrew F. Davis
[not found] ` <830b4d20-26e2-02ce-76db-b63c73967e39-l0cyMroinI0@public.gmane.org>
2017-09-19 21:10 ` Rob Herring
2017-09-19 14:09 ` Mark Rutland
[not found] ` <20170918205005.30235-2-afd-l0cyMroinI0@public.gmane.org>
2017-09-20 0:27 ` kbuild test robot
2017-09-20 0:44 ` kbuild test robot
2017-09-19 14:19 ` [PATCH 1/2] ARM: smccc-call: Use r12 to route secure monitor calls on TI platforms Mark Rutland
2017-09-19 15:07 ` Andrew F. Davis
[not found] ` <7390d268-5c72-b263-f153-fbf0d728e05e-l0cyMroinI0@public.gmane.org>
2017-09-21 14:47 ` Mark Rutland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170918205005.30235-2-afd@ti.com \
--to=afd@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=jens.wiklander@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).