-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path0054-optee-add-ACPI-support-for-Phytium.patch
53 lines (45 loc) · 1.49 KB
/
0054-optee-add-ACPI-support-for-Phytium.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From be4e4022df67f087182291a30d3ff30326f05bca Mon Sep 17 00:00:00 2001
From: Chen Baozi <[email protected]>
Date: Mon, 17 Jun 2024 19:33:04 +0800
Subject: [PATCH 054/150] optee: add ACPI support for Phytium
Add support for devices that expose the presence of OPTEE via device
object in the ACPI namespace.
Signed-off-by: Chen Baozi <[email protected]>
Change-Id: Ie585e39e1701083ad60ce77a9e8bf7034ebde4d3
Signed-off-by: Andrew Powers-Holmes <[email protected]>
---
drivers/tee/optee/smc_abi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
index d5b28fd35d66..7719674f65f6 100644
--- a/drivers/tee/optee/smc_abi.c
+++ b/drivers/tee/optee/smc_abi.c
@@ -6,6 +6,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/acpi.h>
#include <linux/arm-smccc.h>
#include <linux/cpuhotplug.h>
#include <linux/errno.h>
@@ -1820,6 +1821,14 @@ 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[] = {
+ { "PHYT8003" },
+ { }
+};
+MODULE_DEVICE_TABLE(acpi, optee_acpi_match);
+#endif
+
static struct platform_driver optee_driver = {
.probe = optee_probe,
.remove = optee_smc_remove,
@@ -1827,6 +1836,7 @@ static struct platform_driver optee_driver = {
.driver = {
.name = "optee",
.of_match_table = optee_dt_match,
+ .acpi_match_table = ACPI_PTR(optee_acpi_match),
},
};
--
2.47.0