forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/arch/arm/mach-omap2/omap-secure.h
....@@ -1,17 +1,16 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * omap-secure.h: OMAP Secure infrastructure header.
34 *
45 * Copyright (C) 2011 Texas Instruments, Inc.
56 * Santosh Shilimkar <santosh.shilimkar@ti.com>
67 * Copyright (C) 2012 Ivaylo Dimitrov <freemangordon@abv.bg>
7
- * Copyright (C) 2013 Pali Rohár <pali.rohar@gmail.com>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2 as
11
- * published by the Free Software Foundation.
8
+ * Copyright (C) 2013 Pali Rohár <pali@kernel.org>
129 */
1310 #ifndef OMAP_ARCH_OMAP_SECURE_H
1411 #define OMAP_ARCH_OMAP_SECURE_H
12
+
13
+#include <linux/types.h>
1514
1615 /* Monitor error code */
1716 #define API_HAL_RET_VALUE_NS2S_CONVERSION_ERROR 0xFFFFFFFE
....@@ -51,8 +50,12 @@
5150 #define OMAP5_DRA7_MON_SET_ACR_INDEX 0x107
5251
5352 /* Secure PPA(Primary Protected Application) APIs */
53
+#define OMAP4_PPA_SERVICE_0 0x21
5454 #define OMAP4_PPA_L2_POR_INDEX 0x23
5555 #define OMAP4_PPA_CPU_ACTRL_SMP_INDEX 0x25
56
+
57
+#define AM43xx_PPA_SVC_PM_SUSPEND 0x71
58
+#define AM43xx_PPA_SVC_PM_RESUME 0x72
5659
5760 /* Secure RX-51 PPA (Primary Protected Application) APIs */
5861 #define RX51_PPA_HWRNG 29
....@@ -63,6 +66,8 @@
6366
6467 extern u32 omap_secure_dispatcher(u32 idx, u32 flag, u32 nargs,
6568 u32 arg1, u32 arg2, u32 arg3, u32 arg4);
69
+extern void omap_smccc_smc(u32 fn, u32 arg);
70
+extern void omap_smc1(u32 fn, u32 arg);
6671 extern u32 omap_smc2(u32 id, u32 falg, u32 pargs);
6772 extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs);
6873 extern phys_addr_t omap_secure_ram_mempool_base(void);
....@@ -75,6 +80,9 @@
7580 extern u32 rx51_secure_update_aux_cr(u32 set_bits, u32 clear_bits);
7681 extern u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag);
7782
83
+extern bool optee_available;
84
+void omap_secure_init(void);
85
+
7886 #ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
7987 void set_cntfreq(void);
8088 #else