XilinxProcessorIPLib/drivers/clockps/src/xclockps_mux.c
static void XClock_AllocPeriphMuxParents(u16 *ParentGroup, u8 GroupType,
						u8 Par1, u8 Par2, u8 Par3)
{
	if (GroupType & BIT(0)) {
		ParentGroup[0] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_MUX,
									Par1);
	} else {
		ParentGroup[0] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_DIVIDER,
									Par1);
	}

	ParentGroup[1] = XCLOCK_INVALID_PARENT;

	if (GroupType & BIT(1)) {
		ParentGroup[2] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_MUX,
									Par2);
	} else {
		ParentGroup[2] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_DIVIDER,
									Par2);
	}

	if (GroupType & BIT(2)) {
		ParentGroup[3] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_MUX,
									Par3);
	} else {
		ParentGroup[3] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_DIVIDER,
									Par3);
	}
}
/*****************************************************************************/
/*
*
* This function allocates peripheral parents for the mux based on type of the
* parent.
*
* @param	ParentGroup is pointer to mux parent variable.
* @param	GroupType is the type of group parents belong to.
* @param	Par1 is the parent belonging to parent group.
* @param	Par2 is the parent belonging to parent group.
* @param	Par3 is the parent belonging to parent group.
*
* @return	None.
*
* @note		Here the bits in group type indicate the type of parent.
*		Specific bit corresponds to specific parent as in Bit 0
*		indicates type for parent 1, Bit 1 for parent 2 and Bit 2 for
*		parent 3. If the bit is set then the parent corresponds to
*		PLL, else the parent corresponds to divider.
*
******************************************************************************/
This function allocates peripheral parents for the mux based on type of the
parent.
This function allocates peripheral parents for the mux based on type of the parent .
static void XClock_AllocPeriphMuxParents(u16 *ParentGroup, u8 GroupType,
						u8 Par1, u8 Par2, u8 Par3)
{
	if (GroupType & BIT(0)) {
		ParentGroup[0] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_MUX,
									Par1);
	} else {
		ParentGroup[0] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_DIVIDER,
									Par1);
	}
	ParentGroup[1] = XCLOCK_INVALID_PARENT;
	if (GroupType & BIT(1)) {
		ParentGroup[2] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_MUX,
									Par2);
	} else {
		ParentGroup[2] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_DIVIDER,
									Par2);
	}
	if (GroupType & BIT(2)) {
		ParentGroup[3] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_MUX,
									Par3);
	} else {
		ParentGroup[3] = XCLOCK_GENERATE_PARENT_ID(XCLOCK_TYPE_DIVIDER,
									Par3);
	}
}
static void XClock_AllocPeriphMuxParents ( u16 * ParentGroup , u8 GroupType , u8 Par1 , u8 Par2 , u8 Par3 ) { if ( GroupType & BIT ( 0 ) ) { ParentGroup [ 0 ] = XCLOCK_GENERATE_PARENT_ID ( XCLOCK_TYPE_MUX , Par1 ) ; } else { ParentGroup [ 0 ] = XCLOCK_GENERATE_PARENT_ID ( XCLOCK_TYPE_DIVIDER , Par1 ) ; } ParentGroup [ 1 ] = XCLOCK_INVALID_PARENT ; if ( GroupType & BIT ( 1 ) ) { ParentGroup [ 2 ] = XCLOCK_GENERATE_PARENT_ID ( XCLOCK_TYPE_MUX , Par2 ) ; } else { ParentGroup [ 2 ] = XCLOCK_GENERATE_PARENT_ID ( XCLOCK_TYPE_DIVIDER , Par2 ) ; } if ( GroupType & BIT ( 2 ) ) { ParentGroup [ 3 ] = XCLOCK_GENERATE_PARENT_ID ( XCLOCK_TYPE_MUX , Par3 ) ; } else { ParentGroup [ 3 ] = XCLOCK_GENERATE_PARENT_ID ( XCLOCK_TYPE_DIVIDER , Par3 ) ; } }
This function allocates peripheral parents for the mux based on type of the
parent.
This function allocates peripheral parents for the mux based on type of the parent .