/* * Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2021. All rights reserved. * Description:OTP comon macro and API. * Author: Hisilicon * Create: 2019/06/20 */ #ifndef DRV_OTP_H #define DRV_OTP_H #include "osal_ext.h" #include "drv_otp_define.h" #ifdef __cplusplus #if __cplusplus extern "C" { #endif #endif /* end of #ifdef __cplusplus */ struct otp_mgmt { osal_mutex lock; td_void *io_base; struct dts_reg reg; }; #define EXT_PANDA_FW 0x10 #define EXT_OLD_FW 0x11 td_s32 otp_get_chip_type(td_void); struct otp_mgmt *priv_get_otp_mgmt(td_void); td_s32 drv_otp_init(td_void); td_void drv_otp_deinit(td_void); td_s32 otp_open_impl(td_void *private_data); td_s32 otp_release_impl(td_void *private_data); td_slong otp_ioctl_impl(struct file *file, unsigned int cmd, td_void *arg); #ifdef __cplusplus #if __cplusplus } #endif #endif /* end of #ifdef __cplusplus */ #endif /* end of #ifndef DRV_OTP_H */