XilinxProcessorIPLib/drivers/rfdc/src/xrfdc_clock.c
static u32 XRFdc_StartUpDist(XRFdc *InstancePtr, XRFdc_Distribution_Settings *DistributionSettingsPtr)
{
	u32 Status;
	u32 Type;
	u32 Tile;
	u8 PkgTileId;

	Status = XRFDC_SUCCESS;

	for (PkgTileId = DistributionSettingsPtr->Info.LowerBound;
	     PkgTileId <= DistributionSettingsPtr->Info.UpperBound; PkgTileId++) {
		XRFdc_DistTile2TypeTile(InstancePtr, PkgTileId, &Type, &Tile);
		XRFdc_ClrSetReg(InstancePtr, XRFDC_CTRL_STS_BASE(Type, Tile), XRFDC_RESTART_STATE_OFFSET,
				XRFDC_PWR_STATE_MASK, (XRFDC_SM_STATE1 << XRFDC_RSR_START_SHIFT) | XRFDC_SM_STATE15);
		/* Trigger restart */
		XRFdc_WriteReg(InstancePtr, XRFDC_CTRL_STS_BASE(Type, Tile), XRFDC_RESTART_OFFSET, XRFDC_RESTART_MASK);
	}
	/*Ensure source Tile reaches state where it is fit to distribute*/
	Status |= XRFdc_WaitForState(InstancePtr, DistributionSettingsPtr->SourceType,
				     DistributionSettingsPtr->SourceTileId, XRFDC_SM_STATE7);

	for (PkgTileId = DistributionSettingsPtr->Info.LowerBound;
	     PkgTileId <= DistributionSettingsPtr->Info.UpperBound; PkgTileId++) {
		XRFdc_DistTile2TypeTile(InstancePtr, PkgTileId, &Type, &Tile);
		Status |= XRFdc_WaitForState(InstancePtr, Type, Tile, XRFDC_SM_STATE15);
	}
	return Status;
}
/*****************************************************************************/
/**
*
* This function is used to start the distribution tiles
*
* @param        InstancePtr is a pointer to the XRfdc instance.
* @param        DistributionSettingsPtr pointer to the distribution settings struct
*
* @return
*           - XRFDC_SUCCESS if valid.
*           - XRFDC_FAILURE if not valid.
*
******************************************************************************/
This function is used to start the distribution tiles
This function is used to start the distribution tiles
static u32 XRFdc_StartUpDist(XRFdc *InstancePtr, XRFdc_Distribution_Settings *DistributionSettingsPtr)
{
	u32 Status;
	u32 Type;
	u32 Tile;
	u8 PkgTileId;
	Status = XRFDC_SUCCESS;
	for (PkgTileId = DistributionSettingsPtr->Info.LowerBound;
	     PkgTileId <= DistributionSettingsPtr->Info.UpperBound; PkgTileId++) {
		XRFdc_DistTile2TypeTile(InstancePtr, PkgTileId, &Type, &Tile);
		XRFdc_ClrSetReg(InstancePtr, XRFDC_CTRL_STS_BASE(Type, Tile), XRFDC_RESTART_STATE_OFFSET,
				XRFDC_PWR_STATE_MASK, (XRFDC_SM_STATE1 << XRFDC_RSR_START_SHIFT) | XRFDC_SM_STATE15);
		XRFdc_WriteReg(InstancePtr, XRFDC_CTRL_STS_BASE(Type, Tile), XRFDC_RESTART_OFFSET, XRFDC_RESTART_MASK);
	}
	Status |= XRFdc_WaitForState(InstancePtr, DistributionSettingsPtr->SourceType,
				     DistributionSettingsPtr->SourceTileId, XRFDC_SM_STATE7);
	for (PkgTileId = DistributionSettingsPtr->Info.LowerBound;
	     PkgTileId <= DistributionSettingsPtr->Info.UpperBound; PkgTileId++) {
		XRFdc_DistTile2TypeTile(InstancePtr, PkgTileId, &Type, &Tile);
		Status |= XRFdc_WaitForState(InstancePtr, Type, Tile, XRFDC_SM_STATE15);
	}
	return Status;
}
static u32 XRFdc_StartUpDist ( XRFdc * InstancePtr , XRFdc_Distribution_Settings * DistributionSettingsPtr ) { u32 Status ; u32 Type ; u32 Tile ; u8 PkgTileId ; Status = XRFDC_SUCCESS ; for ( PkgTileId = DistributionSettingsPtr -> Info . LowerBound ; PkgTileId <= DistributionSettingsPtr -> Info . UpperBound ; PkgTileId ++ ) { XRFdc_DistTile2TypeTile ( InstancePtr , PkgTileId , & Type , & Tile ) ; XRFdc_ClrSetReg ( InstancePtr , XRFDC_CTRL_STS_BASE ( Type , Tile ) , XRFDC_RESTART_STATE_OFFSET , XRFDC_PWR_STATE_MASK , ( XRFDC_SM_STATE1 << XRFDC_RSR_START_SHIFT ) | XRFDC_SM_STATE15 ) ; XRFdc_WriteReg ( InstancePtr , XRFDC_CTRL_STS_BASE ( Type , Tile ) , XRFDC_RESTART_OFFSET , XRFDC_RESTART_MASK ) ; } Status |= XRFdc_WaitForState ( InstancePtr , DistributionSettingsPtr -> SourceType , DistributionSettingsPtr -> SourceTileId , XRFDC_SM_STATE7 ) ; for ( PkgTileId = DistributionSettingsPtr -> Info . LowerBound ; PkgTileId <= DistributionSettingsPtr -> Info . UpperBound ; PkgTileId ++ ) { XRFdc_DistTile2TypeTile ( InstancePtr , PkgTileId , & Type , & Tile ) ; Status |= XRFdc_WaitForState ( InstancePtr , Type , Tile , XRFDC_SM_STATE15 ) ; } return Status ; }
This function is used to start the distribution tiles
This function is used to start the distribution tiles
/* Trigger restart */ /*Ensure source Tile reaches state where it is fit to distribute*/