aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91/sam_secure.h
diff options
context:
space:
mode:
authorClément Léger <clement.leger@bootlin.com>2022-05-02 17:22:18 +0200
committerClaudiu Beznea <claudiu.beznea@microchip.com>2022-05-12 14:50:20 +0300
commit0c9fd821175a5634e00aa391f5f202f8ed4c9223 (patch)
treec5c79e57277dbd4346389a39ba54e805f5f3a070 /arch/arm/mach-at91/sam_secure.h
parentf611af4c3bfa26fc827b8074d288a3ce686916f2 (diff)
ARM: at91: add code to handle secure calls
Since OP-TEE now has a more complete support for sama5d2, add necessary code to perform SMC calls. The detection of OP-TEE is based on a specific device-tree node path (/firmware/optee) such has done by some other SoC. A check is added to avoid doing SMC calls without having OP-TEE. Signed-off-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Diffstat (limited to 'arch/arm/mach-at91/sam_secure.h')
-rw-r--r--arch/arm/mach-at91/sam_secure.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/sam_secure.h b/arch/arm/mach-at91/sam_secure.h
new file mode 100644
index 000000000000..360036672f52
--- /dev/null
+++ b/arch/arm/mach-at91/sam_secure.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2022, Microchip
+ */
+
+#ifndef SAM_SECURE_H
+#define SAM_SECURE_H
+
+#include <linux/arm-smccc.h>
+
+void __init sam_secure_init(void);
+struct arm_smccc_res sam_smccc_call(u32 fn, u32 arg0, u32 arg1);
+
+#endif /* SAM_SECURE_H */