lib/sw_services/xilnvm/examples/xilnvm_efuse_versal_client_example.c
static int XilNvm_EfuseInitSecMisc1Ctrl(XNvm_EfuseDataAddr *WriteEfuse,
	XNvm_EfuseSecMisc1Bits *SecMisc1Bits)
{
	SecMisc1Bits->LpdMbistEn = XNVM_EFUSE_LPD_MBIST_EN;
	SecMisc1Bits->PmcMbistEn = XNVM_EFUSE_PMC_MBIST_EN;
	SecMisc1Bits->LpdNocScEn = XNVM_EFUSE_LPD_NOC_SC_EN;
	SecMisc1Bits->SysmonVoltMonEn = XNVM_EFUSE_SYSMON_VOLT_MON_EN;
	SecMisc1Bits->SysmonTempMonEn = XNVM_EFUSE_SYSMON_TEMP_MON_EN;

	if ((SecMisc1Bits->LpdMbistEn == TRUE) ||
		(SecMisc1Bits->PmcMbistEn == TRUE) ||
		(SecMisc1Bits->LpdNocScEn == TRUE) ||
		(SecMisc1Bits->SysmonVoltMonEn == TRUE)||
		(SecMisc1Bits->SysmonTempMonEn == TRUE)) {
		Xil_DCacheFlushRange((UINTPTR)SecMisc1Bits,
			sizeof(XNvm_EfuseSecMisc1Bits));
		WriteEfuse->Misc1CtrlAddr = (UINTPTR)SecMisc1Bits;
	}

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
 * This function is used to initialize XNvm_EfuseSecMisc1Bits structure with
 * user provided data and assign the same to global structure XNvm_EfuseDataAddr
 * to program XNvm_EfuseSecMisc1Bits eFuses.
 *
 *typedef struct {
 *	u8 LpdMbistEn;
 *	u8 PmcMbistEn;
 *	u8 LpdNocScEn;
 *	u8 SysmonVoltMonEn;
 *	u8 SysmonTempMonEn;
 *}XNvm_EfuseSecMisc1Bits;

 * @param	WriteEfuse	Pointer to XNvm_EfuseDataAddr structure
 *
 * @param 	SecMisc1Bits	Pointer to XNvm_EfuseSecMisc1Bits structure
 *
 * @return
 *		- XST_SUCCESS - If the initialization XNvm_EfuseSecMisc1Bits
 *				structure is successful
 *		- Error Code - On Failure.
 *
 ******************************************************************************/
This function is used to initialize XNvm_EfuseSecMisc1Bits structure with
user provided data and assign the same to global structure XNvm_EfuseDataAddr
to program XNvm_EfuseSecMisc1Bits eFuses.







@return
- XST_SUCCESS - If the initialization XNvm_EfuseSecMisc1Bits
structure is successful
- Error Code - On Failure.
This function is used to initialize XNvm_EfuseSecMisc1Bits structure with user provided data and assign the same to global structure XNvm_EfuseDataAddr to program XNvm_EfuseSecMisc1Bits eFuses . @return - XST_SUCCESS - If the initialization XNvm_EfuseSecMisc1Bits structure is successful - Error Code - On Failure .
static int XilNvm_EfuseInitSecMisc1Ctrl(XNvm_EfuseDataAddr *WriteEfuse,
	XNvm_EfuseSecMisc1Bits *SecMisc1Bits)
{
	SecMisc1Bits->LpdMbistEn = XNVM_EFUSE_LPD_MBIST_EN;
	SecMisc1Bits->PmcMbistEn = XNVM_EFUSE_PMC_MBIST_EN;
	SecMisc1Bits->LpdNocScEn = XNVM_EFUSE_LPD_NOC_SC_EN;
	SecMisc1Bits->SysmonVoltMonEn = XNVM_EFUSE_SYSMON_VOLT_MON_EN;
	SecMisc1Bits->SysmonTempMonEn = XNVM_EFUSE_SYSMON_TEMP_MON_EN;
	if ((SecMisc1Bits->LpdMbistEn == TRUE) ||
		(SecMisc1Bits->PmcMbistEn == TRUE) ||
		(SecMisc1Bits->LpdNocScEn == TRUE) ||
		(SecMisc1Bits->SysmonVoltMonEn == TRUE)||
		(SecMisc1Bits->SysmonTempMonEn == TRUE)) {
		Xil_DCacheFlushRange((UINTPTR)SecMisc1Bits,
			sizeof(XNvm_EfuseSecMisc1Bits));
		WriteEfuse->Misc1CtrlAddr = (UINTPTR)SecMisc1Bits;
	}
	return XST_SUCCESS;
}
static int XilNvm_EfuseInitSecMisc1Ctrl ( XNvm_EfuseDataAddr * WriteEfuse , XNvm_EfuseSecMisc1Bits * SecMisc1Bits ) { SecMisc1Bits -> LpdMbistEn = XNVM_EFUSE_LPD_MBIST_EN ; SecMisc1Bits -> PmcMbistEn = XNVM_EFUSE_PMC_MBIST_EN ; SecMisc1Bits -> LpdNocScEn = XNVM_EFUSE_LPD_NOC_SC_EN ; SecMisc1Bits -> SysmonVoltMonEn = XNVM_EFUSE_SYSMON_VOLT_MON_EN ; SecMisc1Bits -> SysmonTempMonEn = XNVM_EFUSE_SYSMON_TEMP_MON_EN ; if ( ( SecMisc1Bits -> LpdMbistEn == TRUE ) || ( SecMisc1Bits -> PmcMbistEn == TRUE ) || ( SecMisc1Bits -> LpdNocScEn == TRUE ) || ( SecMisc1Bits -> SysmonVoltMonEn == TRUE ) || ( SecMisc1Bits -> SysmonTempMonEn == TRUE ) ) { Xil_DCacheFlushRange ( ( UINTPTR ) SecMisc1Bits , sizeof ( XNvm_EfuseSecMisc1Bits ) ) ; WriteEfuse -> Misc1CtrlAddr = ( UINTPTR ) SecMisc1Bits ; } return XST_SUCCESS ; }
This function is used to initialize XNvm_EfuseSecMisc1Bits structure with
 user provided data and assign the same to global structure XNvm_EfuseDataAddr
 to program XNvm_EfuseSecMisc1Bits eFuses.
This function is used to initialize XNvm_EfuseSecMisc1Bits structure with user provided data and assign the same to global structure XNvm_EfuseDataAddr to program XNvm_EfuseSecMisc1Bits eFuses .