XilinxProcessorIPLib/drivers/clockps/src/xclockps_divider.c
static void XClock_DivUpdateRate(u8 DivIndex)
{
	u8         ParentType;
	u8         ParentIdx;
	XClockRate ParentRate;
	XClockRate Rate;

	XCLOCK_VALIDATE_INDEX_WARN(DIVIDER, DivIndex);

	/* Fetch parent */
	ParentType = XCLOCK_FETCH_PARENT_TYPE(Dividers[DivIndex].Parent);
	ParentIdx = XCLOCK_FETCH_PARENT_INDEX(Dividers[DivIndex].Parent);
	XClock_UpdateRate((XClock_Types)ParentType, ParentIdx);

	/* Set rate */
	ParentRate = XClock_FetchRate((XClock_Types)ParentType, ParentIdx);
	if (XST_SUCCESS != XClock_DivRecalcRate(DivIndex, ParentRate, &Rate)) {
		return;
	}

	Dividers[DivIndex].Rate = Rate;
}
/*****************************************************************************/
/*
*
* The function updates the rate of divider node.
*
* @param	DivIndex is the database index of divider to update rate for.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
The function updates the rate of divider node.
The function updates the rate of divider node .
static void XClock_DivUpdateRate(u8 DivIndex)
{
	u8         ParentType;
	u8         ParentIdx;
	XClockRate ParentRate;
	XClockRate Rate;
	XCLOCK_VALIDATE_INDEX_WARN(DIVIDER, DivIndex);
	ParentType = XCLOCK_FETCH_PARENT_TYPE(Dividers[DivIndex].Parent);
	ParentIdx = XCLOCK_FETCH_PARENT_INDEX(Dividers[DivIndex].Parent);
	XClock_UpdateRate((XClock_Types)ParentType, ParentIdx);
	ParentRate = XClock_FetchRate((XClock_Types)ParentType, ParentIdx);
	if (XST_SUCCESS != XClock_DivRecalcRate(DivIndex, ParentRate, &Rate)) {
		return;
	}
	Dividers[DivIndex].Rate = Rate;
}
static void XClock_DivUpdateRate ( u8 DivIndex ) { u8 ParentType ; u8 ParentIdx ; XClockRate ParentRate ; XClockRate Rate ; XCLOCK_VALIDATE_INDEX_WARN ( DIVIDER , DivIndex ) ; ParentType = XCLOCK_FETCH_PARENT_TYPE ( Dividers [ DivIndex ] . Parent ) ; ParentIdx = XCLOCK_FETCH_PARENT_INDEX ( Dividers [ DivIndex ] . Parent ) ; XClock_UpdateRate ( ( XClock_Types ) ParentType , ParentIdx ) ; ParentRate = XClock_FetchRate ( ( XClock_Types ) ParentType , ParentIdx ) ; if ( XST_SUCCESS != XClock_DivRecalcRate ( DivIndex , ParentRate , & Rate ) ) { return ; } Dividers [ DivIndex ] . Rate = Rate ; }
The function updates the rate of divider node.
The function updates the rate of divider node .
/* Fetch parent */ /* Set rate */