Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751632AbdIRUuT (ORCPT ); Mon, 18 Sep 2017 16:50:19 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:23762 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751605AbdIRUuR (ORCPT ); Mon, 18 Sep 2017 16:50:17 -0400 From: "Andrew F. Davis" To: Rob Herring , Mark Rutland , Russell King , Jens Wiklander CC: , , , "Andrew F . Davis" Subject: [PATCH 2/2] tee: optee: allow selection of ti-smc as a calling method Date: Mon, 18 Sep 2017 15:50:05 -0500 Message-ID: <20170918205005.30235-2-afd@ti.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170918205005.30235-1-afd@ti.com> References: <20170918205005.30235-1-afd@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1486 Lines: 37 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 --- 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