xref: /optee_os/core/include/drivers/imx_snvs.h (revision 12fc37711783247b0d05fdc271ef007f4930767b)
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (C) 2020 Pengutronix
4  * Rouven Czerwinski <entwicklung@pengutronix.de>
5  * Copyright 2022 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 #else
17 static inline bool snvs_is_device_closed(void)
18 {
19 	return false;
20 }
21 
22 static inline TEE_Result imx_snvs_set_master_otpmk(void)
23 {
24 	return TEE_ERROR_NOT_IMPLEMENTED;
25 }
26 #endif
27 
28 #endif /* __DRIVERS_IMX_SNVS_H */
29