lib/sw_apps/versal_plm/src/xplm_main.c
static void XPlm_PerformInternalPOR(void)
{
	u32 IdCode = XPlmi_In32(PMC_TAP_IDCODE) &
			PMC_TAP_IDCODE_SIREV_DVCD_MASK;
	u32 CrpResetReason = XPlmi_In32(CRP_RESET_REASON);
	u8 SlrType = (u8)(XPlmi_In32(PMC_TAP_SLR_TYPE) &
		PMC_TAP_SLR_TYPE_VAL_MASK);
	u32 DnaBit = XPlmi_In32(EFUSE_CACHE_DNA_1) &
			EFUSE_CACHE_DNA_1_BIT25_MASK;
	PdiSrc_t BootMode = XLoader_GetBootMode();

	if ((IdCode != PMC_TAP_IDCODE_ES1_VP1802) &&
		(IdCode != PMC_TAP_IDCODE_ES1_VP1502)) {
		/* Not a VP1802 Or VP1502 device */
		goto END;
	}

	if (SlrType != XLOADER_SSIT_MASTER_SLR) {
		/* Not a Master SLR */
		goto END;
	}

	if ((BootMode == XLOADER_PDI_SRC_JTAG) ||
		(BootMode == XLOADER_PDI_SRC_SMAP)) {
		/* Bootmode check failed for IPOR of VP1502/VP1802 device */
		goto END;
	}

	if (DnaBit == 0x00U) {
		/* Efuse DNA_57 bit should be non-zero for IPOR */
		goto END;
	}

	/* All the pre-conditions are met to do IPOR of VP1502/VP1802 device */
	if (CrpResetReason == CRP_RESET_REASON_EXT_POR_MASK) {
		usleep(PLM_VP1802_POR_SETTLE_TIME);
		XPlmi_PORHandler();
	}

END:
	return;
}
/*****************************************************************************/
/**
 * @brief	This function check conditions and perform internal POR
 * 		for VP1802 and VP1502 device if required.
 *
 * @return	None.
 *
 *****************************************************************************/
@brief       This function check conditions and perform internal POR
for VP1802 and VP1502 device if required.

@return      None.
@brief This function check conditions and perform internal POR for VP1802 and VP1502 device if required . @return None .
static void XPlm_PerformInternalPOR(void)
{
	u32 IdCode = XPlmi_In32(PMC_TAP_IDCODE) &
			PMC_TAP_IDCODE_SIREV_DVCD_MASK;
	u32 CrpResetReason = XPlmi_In32(CRP_RESET_REASON);
	u8 SlrType = (u8)(XPlmi_In32(PMC_TAP_SLR_TYPE) &
		PMC_TAP_SLR_TYPE_VAL_MASK);
	u32 DnaBit = XPlmi_In32(EFUSE_CACHE_DNA_1) &
			EFUSE_CACHE_DNA_1_BIT25_MASK;
	PdiSrc_t BootMode = XLoader_GetBootMode();
	if ((IdCode != PMC_TAP_IDCODE_ES1_VP1802) &&
		(IdCode != PMC_TAP_IDCODE_ES1_VP1502)) {
		goto END;
	}
	if (SlrType != XLOADER_SSIT_MASTER_SLR) {
		goto END;
	}
	if ((BootMode == XLOADER_PDI_SRC_JTAG) ||
		(BootMode == XLOADER_PDI_SRC_SMAP)) {
		goto END;
	}
	if (DnaBit == 0x00U) {
		goto END;
	}
	if (CrpResetReason == CRP_RESET_REASON_EXT_POR_MASK) {
		usleep(PLM_VP1802_POR_SETTLE_TIME);
		XPlmi_PORHandler();
	}
END:
	return;
}
static void XPlm_PerformInternalPOR ( void ) { u32 IdCode = XPlmi_In32 ( PMC_TAP_IDCODE ) & PMC_TAP_IDCODE_SIREV_DVCD_MASK ; u32 CrpResetReason = XPlmi_In32 ( CRP_RESET_REASON ) ; u8 SlrType = ( u8 ) ( XPlmi_In32 ( PMC_TAP_SLR_TYPE ) & PMC_TAP_SLR_TYPE_VAL_MASK ) ; u32 DnaBit = XPlmi_In32 ( EFUSE_CACHE_DNA_1 ) & EFUSE_CACHE_DNA_1_BIT25_MASK ; PdiSrc_t BootMode = XLoader_GetBootMode ( ) ; if ( ( IdCode != PMC_TAP_IDCODE_ES1_VP1802 ) && ( IdCode != PMC_TAP_IDCODE_ES1_VP1502 ) ) { goto END ; } if ( SlrType != XLOADER_SSIT_MASTER_SLR ) { goto END ; } if ( ( BootMode == XLOADER_PDI_SRC_JTAG ) || ( BootMode == XLOADER_PDI_SRC_SMAP ) ) { goto END ; } if ( DnaBit == 0x00U ) { goto END ; } if ( CrpResetReason == CRP_RESET_REASON_EXT_POR_MASK ) { usleep ( PLM_VP1802_POR_SETTLE_TIME ) ; XPlmi_PORHandler ( ) ; } END : return ; }
@brief       This function check conditions and perform internal POR
              for VP1802 and VP1502 device if required.
@brief This function check conditions and perform internal POR for VP1802 and VP1502 device if required .
/* Not a VP1802 Or VP1502 device */ /* Not a Master SLR */ /* Bootmode check failed for IPOR of VP1502/VP1802 device */ /* Efuse DNA_57 bit should be non-zero for IPOR */ /* All the pre-conditions are met to do IPOR of VP1502/VP1802 device */