From patchwork Mon Sep 18 20:50:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 815163 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="rU0Q+Sxp"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xwynh0SZ5z9s7m for ; Tue, 19 Sep 2017 06:50:32 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751612AbdIRUuS (ORCPT ); Mon, 18 Sep 2017 16:50:18 -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 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v8IKo5rF001286; Mon, 18 Sep 2017 15:50:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1505767805; bh=/iIz/0FOYSNnWj1hhXPh8s9Hit/H7O9+ocVhvspLpfI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rU0Q+Sxp5ULqutd+eom37GI/rTJdTL9WxGuXo+FXQmA442ZodDRsYr8WTjSWej6Bh asyys6jZigaK6Mibt2M8y14luDXzvZ5wYI68M7mE6yFfoGmBRY2WinMqZKtbze8vLs zwksgli1lo45rTNP6S6oP7xncgR7qlBHSZ3aeW9Y= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8IKo5UQ031872; Mon, 18 Sep 2017 15:50:05 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Mon, 18 Sep 2017 15:50:05 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Mon, 18 Sep 2017 15:50:05 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8IKo53H030524; Mon, 18 Sep 2017 15:50:05 -0500 Received: from localhost (uda0226330.dhcp.ti.com [128.247.58.165]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v8IKo5309619; Mon, 18 Sep 2017 15:50:05 -0500 (CDT) 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 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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);