From 9aaa63fc173bd26a06f15912e25effb13f8125fe Mon Sep 17 00:00:00 2001 From: Pritesh Raithatha Date: Tue, 22 May 2018 16:45:43 +0530 Subject: platform: tegra: add tegra_vpr and smc-calls from Kerenl 4.9 Add tegra specific files tegra_vpr.c, smc-calls.S, ote_protocol.h and smc-calls.h to nvidia repo that is removed from kernel-4.9. Bug 200415588 Change-Id: Ibaf02dfb7dad5df3169228c5655e20862b142312 Signed-off-by: Pritesh Raithatha Reviewed-on: https://git-master.nvidia.com/r/1727046 GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/linux/ote_protocol.h | 29 +++++++++++++++++++++++++++++ include/linux/smc-calls.h | 24 ++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 include/linux/ote_protocol.h create mode 100644 include/linux/smc-calls.h (limited to 'include/linux') diff --git a/include/linux/ote_protocol.h b/include/linux/ote_protocol.h new file mode 100644 index 000000000..ef71ac978 --- /dev/null +++ b/include/linux/ote_protocol.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2013-2018 NVIDIA Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __OTE_PROTOCOL_H__ +#define __OTE_PROTOCOL_H__ + +int tegra_set_vpr_params(void *vpr_base, size_t vpr_size); + +void trusty_restore_keyslots(void); +void tlk_restore_keyslots(void); + +int te_is_secos_dev_enabled(void); + +#endif diff --git a/include/linux/smc-calls.h b/include/linux/smc-calls.h new file mode 100644 index 000000000..249a2764a --- /dev/null +++ b/include/linux/smc-calls.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + */ + +#ifndef __LINUX_SMC_CALLS_H__ +#define __LINUX_SMC_CALLS_H__ + +/* SMC Definitions*/ +#define TE_SMC_PROGRAM_VPR 0x82000003 + +uint32_t invoke_smc(uint32_t arg0, uintptr_t arg1, uintptr_t arg2); + +#endif /* !__LINUX_SMC_CALLS_H__ */ -- cgit v1.2.2