XilinxProcessorIPLib/drivers/vphy/src/xvphy_selftest.c
u32 XVphy_SelfTest(XVphy *InstancePtr)
{
	u8 Index;
	u32 Val;

	/* Compare general usage registers with their default values. */
	for (Index = 0; Index < 1; Index++) {
		Val = XVphy_ReadReg(InstancePtr->Config.BaseAddr,
				ResetValues[Index][0]);
		/* Fail if register does not hold default value. */
		if (Val != ResetValues[Index][1]) {
			return XST_FAILURE;
		}
	}

	/* All tested registers hold their default reset values. */
	return XST_SUCCESS;
}
/******************************************************************************/
/**
 * This function runs a self-test on the XVphy driver/device. The sanity test
 * checks whether or not all tested registers hold their default reset values.
 *
 * @param	InstancePtr is a pointer to the XVphy instance.
 *
 * @return
 *		- XST_SUCCESS if the self-test passed - all tested registers
 *		  hold their default reset values.
 *		- XST_FAILURE otherwise.
 *
 * @note	None.
 *
*******************************************************************************/
This function runs a self-test on the XVphy driver/device. The sanity test
checks whether or not all tested registers hold their default reset values.

@param       InstancePtr is a pointer to the XVphy instance.

@return
- XST_SUCCESS if the self-test passed - all tested registers
hold their default reset values.

@note        None.
This function runs a self - test on the XVphy driver / device . The sanity test checks whether or not all tested registers hold their default reset values . @param InstancePtr is a pointer to the XVphy instance . @return - XST_SUCCESS if the self - test passed - all tested registers hold their default reset values . @note None .
u32 XVphy_SelfTest(XVphy *InstancePtr)
{
	u8 Index;
	u32 Val;
	for (Index = 0; Index < 1; Index++) {
		Val = XVphy_ReadReg(InstancePtr->Config.BaseAddr,
				ResetValues[Index][0]);
		if (Val != ResetValues[Index][1]) {
			return XST_FAILURE;
		}
	}
	return XST_SUCCESS;
}
u32 XVphy_SelfTest ( XVphy * InstancePtr ) { u8 Index ; u32 Val ; for ( Index = 0 ; Index < 1 ; Index ++ ) { Val = XVphy_ReadReg ( InstancePtr -> Config . BaseAddr , ResetValues [ Index ] [ 0 ] ) ; if ( Val != ResetValues [ Index ] [ 1 ] ) { return XST_FAILURE ; } } return XST_SUCCESS ; }
This function runs a self-test on the XVphy driver/device.
This function runs a self - test on the XVphy driver / device .
/* Compare general usage registers with their default values. */ /* Fail if register does not hold default value. */ /* All tested registers hold their default reset values. */