1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (C) 2020 Pengutronix 4 * Rouven Czerwinski <entwicklung@pengutronix.de> 5 * Copyright 2022-2023 NXP 6 */ 7 #ifndef __DRIVERS_IMX_SNVS_H 8 #define __DRIVERS_IMX_SNVS_H 9 10 #include <tee_api_types.h> 11 12 /* Set the OTPMK Key as Master key */ 13 #ifdef CFG_IMX_SNVS 14 TEE_Result imx_snvs_set_master_otpmk(void); 15 bool snvs_is_device_closed(void); 16 void imx_snvs_shutdown(void); 17 #else 18 static inline bool snvs_is_device_closed(void) 19 { 20 return false; 21 } 22 23 static inline TEE_Result imx_snvs_set_master_otpmk(void) 24 { 25 return TEE_ERROR_NOT_IMPLEMENTED; 26 } 27 28 static inline void imx_snvs_shutdown(void) {} 29 #endif 30 31 #endif /* __DRIVERS_IMX_SNVS_H */ 32