| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * omap-secure.h: OMAP Secure infrastructure header. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2011 Texas Instruments, Inc. |
|---|
| 5 | 6 | * Santosh Shilimkar <santosh.shilimkar@ti.com> |
|---|
| 6 | 7 | * 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> |
|---|
| 12 | 9 | */ |
|---|
| 13 | 10 | #ifndef OMAP_ARCH_OMAP_SECURE_H |
|---|
| 14 | 11 | #define OMAP_ARCH_OMAP_SECURE_H |
|---|
| 12 | + |
|---|
| 13 | +#include <linux/types.h> |
|---|
| 15 | 14 | |
|---|
| 16 | 15 | /* Monitor error code */ |
|---|
| 17 | 16 | #define API_HAL_RET_VALUE_NS2S_CONVERSION_ERROR 0xFFFFFFFE |
|---|
| .. | .. |
|---|
| 51 | 50 | #define OMAP5_DRA7_MON_SET_ACR_INDEX 0x107 |
|---|
| 52 | 51 | |
|---|
| 53 | 52 | /* Secure PPA(Primary Protected Application) APIs */ |
|---|
| 53 | +#define OMAP4_PPA_SERVICE_0 0x21 |
|---|
| 54 | 54 | #define OMAP4_PPA_L2_POR_INDEX 0x23 |
|---|
| 55 | 55 | #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 |
|---|
| 56 | 59 | |
|---|
| 57 | 60 | /* Secure RX-51 PPA (Primary Protected Application) APIs */ |
|---|
| 58 | 61 | #define RX51_PPA_HWRNG 29 |
|---|
| .. | .. |
|---|
| 63 | 66 | |
|---|
| 64 | 67 | extern u32 omap_secure_dispatcher(u32 idx, u32 flag, u32 nargs, |
|---|
| 65 | 68 | 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); |
|---|
| 66 | 71 | extern u32 omap_smc2(u32 id, u32 falg, u32 pargs); |
|---|
| 67 | 72 | extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs); |
|---|
| 68 | 73 | extern phys_addr_t omap_secure_ram_mempool_base(void); |
|---|
| .. | .. |
|---|
| 75 | 80 | extern u32 rx51_secure_update_aux_cr(u32 set_bits, u32 clear_bits); |
|---|
| 76 | 81 | extern u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag); |
|---|
| 77 | 82 | |
|---|
| 83 | +extern bool optee_available; |
|---|
| 84 | +void omap_secure_init(void); |
|---|
| 85 | + |
|---|
| 78 | 86 | #ifdef CONFIG_SOC_HAS_REALTIME_COUNTER |
|---|
| 79 | 87 | void set_cntfreq(void); |
|---|
| 80 | 88 | #else |
|---|