1 /* 2 * drivers/char/sunxi_sys_info/sunxi-smc.c 3 * 4 * Copyright(c) 2015-2016 Allwinnertech Co., Ltd. 5 * http://www.allwinnertech.com 6 * 7 * Author: sunny <superm@allwinnertech.com> 8 * 9 * allwinner sunxi soc chip version and chip id manager. 10 * 11 * This program is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License as published by 13 * the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 */ 16 17 #ifndef __SUNXI_SMC_H 18 #define __SUNXI_SMC_H 19 20 #define SUNXI_OPTEE_SMC_OFFSET (0x200) 21 22 extern int invoke_smc_fn(u32 function_id, u64 arg0, u64 arg1, u64 arg2); 23 extern u32 sunxi_smc_readl(phys_addr_t addr); 24 extern int sunxi_smc_writel(u32 value, phys_addr_t addr); 25 extern int arm_svc_efuse_read(phys_addr_t key_buf, phys_addr_t read_buf); 26 extern int arm_svc_efuse_write(phys_addr_t key_buf); 27 extern int sunxi_smc_probe_secure(void); 28 extern int sunxi_soc_is_secure(void); 29 extern int sunxi_smc_copy_arisc_paras(phys_addr_t dest, phys_addr_t src, u32 len); 30 extern int sunxi_smc_call_offset(void); 31 extern int optee_probe_drm_configure(unsigned long *drm_base, 32 size_t *drm_size, unsigned long *tee_base); 33 34 #endif /* __SUNXI_SMC_H */ 35