lib/sw_services/xilplmi/src/xplmi_err.c
int XPlmi_EmDisable(u32 ErrorNodeId, u32 RegMask)
{
	int Status = XST_FAILURE;

	switch ((XPlmi_EventType)XPlmi_EventNodeType(ErrorNodeId)) {
	case XPLMI_NODETYPE_EVENT_PMC_ERR1:
		/* Disable POR, SRST, Interrupt and PS Error Out */
		XPlmi_Out32(PMC_GLOBAL_PMC_POR1_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_ERR_OUT1_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_IRQ1_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_SRST1_DIS, RegMask);
		Status = XST_SUCCESS;
		break;
	case XPLMI_NODETYPE_EVENT_PMC_ERR2:
		/* Disable POR, SRST, Interrupt and PS Error Out */
		XPlmi_Out32(PMC_GLOBAL_PMC_POR2_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_ERR_OUT2_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_IRQ2_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_SRST2_DIS, RegMask);
		Status = XST_SUCCESS;
		break;
	case XPLMI_NODETYPE_EVENT_PSM_ERR1:
		/* Disable CR / NCR to PMC, Interrupt */
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_CR_ERR1_DIS, RegMask);
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_NCR_ERR1_DIS, RegMask);
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_IRQ1_DIS, RegMask);
		Status = XST_SUCCESS;
		break;
	case XPLMI_NODETYPE_EVENT_PSM_ERR2:
		/* Disable CR / NCR to PMC, Interrupt */
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_CR_ERR2_DIS, RegMask);
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_NCR_ERR2_DIS, RegMask);
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_IRQ2_DIS, RegMask);
		Status = XST_SUCCESS;
		break;
	case XPLMI_NODETYPE_EVENT_SW_ERR:
		/* Do nothing */
		Status = XST_SUCCESS;
		break;
	default:
		/* Invalid Error Type */
		Status = XPLMI_INVALID_ERROR_TYPE;
		XPlmi_Printf(DEBUG_GENERAL,
			"Invalid ErrType 0x%x for Error Mask: 0x%0x\n\r",
			ErrorNodeId, RegMask);
		break;
	}

	return Status;
}
/*****************************************************************************/
/**
 * @brief	This function disables the responses for the given error.
 *
 * @param	ErrorNodeId is the node Id for the error event
 * @param	RegMask is the register mask of the error to be disabled
 *
 * @return	XST_SUCCESS on success and error code on failure
 *
 *****************************************************************************/
@brief       This function disables the responses for the given error.
@param       ErrorNodeId is the node Id for the error event
@param       RegMask is the register mask of the error to be disabled

@return      XST_SUCCESS on success and error code on failure
@brief This function disables the responses for the given error . @param ErrorNodeId is the node Id for the error event @param RegMask is the register mask of the error to be disabled @return XST_SUCCESS on success and error code on failure
int XPlmi_EmDisable(u32 ErrorNodeId, u32 RegMask)
{
	int Status = XST_FAILURE;
	switch ((XPlmi_EventType)XPlmi_EventNodeType(ErrorNodeId)) {
	case XPLMI_NODETYPE_EVENT_PMC_ERR1:
		XPlmi_Out32(PMC_GLOBAL_PMC_POR1_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_ERR_OUT1_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_IRQ1_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_SRST1_DIS, RegMask);
		Status = XST_SUCCESS;
		break;
	case XPLMI_NODETYPE_EVENT_PMC_ERR2:
		XPlmi_Out32(PMC_GLOBAL_PMC_POR2_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_ERR_OUT2_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_IRQ2_DIS, RegMask);
		XPlmi_Out32(PMC_GLOBAL_PMC_SRST2_DIS, RegMask);
		Status = XST_SUCCESS;
		break;
	case XPLMI_NODETYPE_EVENT_PSM_ERR1:
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_CR_ERR1_DIS, RegMask);
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_NCR_ERR1_DIS, RegMask);
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_IRQ1_DIS, RegMask);
		Status = XST_SUCCESS;
		break;
	case XPLMI_NODETYPE_EVENT_PSM_ERR2:
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_CR_ERR2_DIS, RegMask);
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_NCR_ERR2_DIS, RegMask);
		XPlmi_Out32(PSM_GLOBAL_REG_PSM_IRQ2_DIS, RegMask);
		Status = XST_SUCCESS;
		break;
	case XPLMI_NODETYPE_EVENT_SW_ERR:
		Status = XST_SUCCESS;
		break;
	default:
		Status = XPLMI_INVALID_ERROR_TYPE;
		XPlmi_Printf(DEBUG_GENERAL,
			"Invalid ErrType 0x%x for Error Mask: 0x%0x\n\r",
			ErrorNodeId, RegMask);
		break;
	}
	return Status;
}
int XPlmi_EmDisable ( u32 ErrorNodeId , u32 RegMask ) { int Status = XST_FAILURE ; switch ( ( XPlmi_EventType ) XPlmi_EventNodeType ( ErrorNodeId ) ) { case XPLMI_NODETYPE_EVENT_PMC_ERR1 : XPlmi_Out32 ( PMC_GLOBAL_PMC_POR1_DIS , RegMask ) ; XPlmi_Out32 ( PMC_GLOBAL_PMC_ERR_OUT1_DIS , RegMask ) ; XPlmi_Out32 ( PMC_GLOBAL_PMC_IRQ1_DIS , RegMask ) ; XPlmi_Out32 ( PMC_GLOBAL_PMC_SRST1_DIS , RegMask ) ; Status = XST_SUCCESS ; break ; case XPLMI_NODETYPE_EVENT_PMC_ERR2 : XPlmi_Out32 ( PMC_GLOBAL_PMC_POR2_DIS , RegMask ) ; XPlmi_Out32 ( PMC_GLOBAL_PMC_ERR_OUT2_DIS , RegMask ) ; XPlmi_Out32 ( PMC_GLOBAL_PMC_IRQ2_DIS , RegMask ) ; XPlmi_Out32 ( PMC_GLOBAL_PMC_SRST2_DIS , RegMask ) ; Status = XST_SUCCESS ; break ; case XPLMI_NODETYPE_EVENT_PSM_ERR1 : XPlmi_Out32 ( PSM_GLOBAL_REG_PSM_CR_ERR1_DIS , RegMask ) ; XPlmi_Out32 ( PSM_GLOBAL_REG_PSM_NCR_ERR1_DIS , RegMask ) ; XPlmi_Out32 ( PSM_GLOBAL_REG_PSM_IRQ1_DIS , RegMask ) ; Status = XST_SUCCESS ; break ; case XPLMI_NODETYPE_EVENT_PSM_ERR2 : XPlmi_Out32 ( PSM_GLOBAL_REG_PSM_CR_ERR2_DIS , RegMask ) ; XPlmi_Out32 ( PSM_GLOBAL_REG_PSM_NCR_ERR2_DIS , RegMask ) ; XPlmi_Out32 ( PSM_GLOBAL_REG_PSM_IRQ2_DIS , RegMask ) ; Status = XST_SUCCESS ; break ; case XPLMI_NODETYPE_EVENT_SW_ERR : Status = XST_SUCCESS ; break ; default : Status = XPLMI_INVALID_ERROR_TYPE ; XPlmi_Printf ( DEBUG_GENERAL , " \n \r " , ErrorNodeId , RegMask ) ; break ; } return Status ; }
@brief       This function disables the responses for the given error.
@brief This function disables the responses for the given error .
/* Disable POR, SRST, Interrupt and PS Error Out */ /* Disable POR, SRST, Interrupt and PS Error Out */ /* Disable CR / NCR to PMC, Interrupt */ /* Disable CR / NCR to PMC, Interrupt */ /* Do nothing */ /* Invalid Error Type */