From patchwork Thu Dec 27 19:01:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 154575 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7252140ljp; Thu, 27 Dec 2018 11:01:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN5mF0/N2/RH++U2xq65SKt5J6edG+NerRXmvopWRQhOmN0HYOB+1Ed2uKd45vDe3JExtb9F X-Received: by 2002:a63:6ecf:: with SMTP id j198mr24072796pgc.3.1545937305915; Thu, 27 Dec 2018 11:01:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545937305; cv=none; d=google.com; s=arc-20160816; b=vC8cTeRHEmj1keQGhnF1SVJ1aG/u0GpY69h9ZB14rZIvBpEaPSMiBISWQkL0nFTSy9 /2oBeLNgnV7lE+5lwPCfL3vgho/4FtZdtOm3AYiOmZ8+mwLRFl1+Fs0ev7oaPnIl5/ja sf9XtaALfwuYxcJ8/yypLbKoRGfcbFGqRkKFebakVrSNzkOfM+KgOFP49tOe4xlysuah U1/0sD2V0tWU8nLqmBvP4tCLq7YZ/UuAQpMp+VigI5+blGY1f2Afg85PZBktTRVvI18h RqqSPVRtOXSFr1tZItSrZ4B/Oh/+QOkQtlwmM7jgVAGapqi8UkLBUFB5QJir8Zlolkzl wsjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lELMYxGBq1wtuJWcpqHPQ/HdXwW1NxaQ8FdwNt6SqtQ=; b=VomWqTH0yUVNNPu6JKBje6TT3sLG1yuuozhJmbkjW5NRibPiDZl5iHR27aNuIUna9E tREg3Of3toWYEFcIcZQ8z5Bai64ICWkVevSU5lWLcq2khG3dO3/hSPblSlWdn9sS1Csu +lu8iiSUAXf8fsi714/tnwBLfI8fd+t5gwOCo/BzoWuSIdH+XFtzGLTG21BS+z05jXmK lVEpzkwFCgueH8ta/ODc2WAub11/GxnPmYkUzUzMeZLiMZVXz7LNvEwMJn+q8KNc54yT bIHbStOWrFhdFC9j2+m/PuX1uXm9hQhS+wjKzHivMoPGn8hpUjWxl9ASwvkrlOdlfb8Z slPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=THTBRY5V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si2957412plu.169.2018.12.27.11.01.45; Thu, 27 Dec 2018 11:01:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=THTBRY5V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728655AbeL0TBo (ORCPT + 31 others); Thu, 27 Dec 2018 14:01:44 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:40099 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726720AbeL0TBh (ORCPT ); Thu, 27 Dec 2018 14:01:37 -0500 Received: by mail-ed1-f67.google.com with SMTP id g22so15931568edr.7 for ; Thu, 27 Dec 2018 11:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lELMYxGBq1wtuJWcpqHPQ/HdXwW1NxaQ8FdwNt6SqtQ=; b=THTBRY5VIJFxdEBovHezMJXVb1V2sUUyVCFlLcR5L58BGTNcGGqowUhxJ45svP58Jq ASgENUBMus/b96vj56w8k03CG/6cjJ6LqX0C7z25S3lhUkgYWRHvdu9f1QOfA/0yg421 0qK1dcESMdiaopjlZF9fJJmZ/1SZsghcNhGQA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lELMYxGBq1wtuJWcpqHPQ/HdXwW1NxaQ8FdwNt6SqtQ=; b=ALFNkYSqKWgE0sVIi4ho1f/l/JF+y+Q9jc35Q9Zw7oHbcPy+B19cYzNIoob4wFiys3 g3nM2qB02Aiz0nqNKSYOwj2FuylmOIbuS4tbVx4OycGUJWvZ8Onq2cM4q8smVhPyOXjz mQp0WNP41Dm+tPMRaHvVVwfUnL4GeU8SlB6aNGJ+sAipK9iMgwaVwb/jCfcmcnrXGOLX WGWSrBSb5jYNTZsQJY3KI//iwR3/sMp4QRrYWMabpITsA5+aqLEyxYHySH96NB0Q3RWn Q15mnHWzmdPC0oWf/+aNYLkVA+ClXTk5g02A3czhObJgtb2aJ9QOXFmXG7LQ5mdbMpcb M7GQ== X-Gm-Message-State: AA+aEWbyOVhZ8SmSiFasLktBKqqnPMo2jnSy0HG0MWlzwIyy0jbONlcX QlWNavLQZ2SHeEoWuXFMBRy6yQ== X-Received: by 2002:a17:906:1604:: with SMTP id m4-v6mr16471470ejd.167.1545937295497; Thu, 27 Dec 2018 11:01:35 -0800 (PST) Received: from chuckie.home ([2a01:cb1d:112:6f00:6488:e12:eb9c:4813]) by smtp.gmail.com with ESMTPSA id v14sm11224376edq.74.2018.12.27.11.01.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Dec 2018 11:01:34 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel , Jens Wiklander , Sumit Garg , Graeme Gregory , Jerome Forissier Subject: [RFC PATCH 2/2] optee: add ACPI support Date: Thu, 27 Dec 2018 20:01:22 +0100 Message-Id: <20181227190122.23149-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181227190122.23149-1-ard.biesheuvel@linaro.org> References: <20181227190122.23149-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for devices that expose the presence of OPTEE via device object in the ACPI namespace. Signed-off-by: Ard Biesheuvel --- drivers/tee/optee/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.19.2 diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 61ea65cfaedd..94b2fd08b446 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -14,6 +14,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#include #include #include #include @@ -689,12 +690,21 @@ static const struct of_device_id optee_dt_match[] = { }; MODULE_DEVICE_TABLE(of, optee_dt_match); +#ifdef CONFIG_ACPI +static const struct acpi_device_id optee_acpi_match[] = { + { "LNRO0020" }, + { } +}; +MODULE_DEVICE_TABLE(acpi, optee_acpi_match); +#endif + static struct platform_driver optee_driver = { .probe = optee_probe, .remove = optee_remove, .driver = { .name = "optee", .of_match_table = optee_dt_match, + .acpi_match_table = ACPI_PTR(optee_acpi_match), }, }; module_platform_driver(optee_driver);