lib/sw_apps/zynqmp_fsbl/src/xfsbl_ddr_init.c
static void XFsbl_DdrCalcDdr4HifAddr(struct DdrcInitData *DdrDataPtr, u32 *HifAddr)
{
	XFsbl_DimmParams *PDimmPtr = &DdrDataPtr->PDimm;
	u32 Position = 0U;
	u32 Index;

	/* Define Column positions in HIF Addresses */
	for (Index = 0U; Index < PDimmPtr->NumColAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_COLUMN(Index);
		Position++;
	}

	/* Define Bank Group positions in HIF Addresses */
	for (Index = 0U; Index < PDimmPtr->NumBgAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_BG(Index);
		Position++;
	}

	/* Define Bank positions in HIF Addresses */
	for (Index = 0U; Index < PDimmPtr->NumBankAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_BANK(Index);
		Position++;
	}

	/* Define Row positions in HIF Addresses */
	for (Index = 0U; Index < PDimmPtr->NumRowAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_ROW(Index);
		Position++;
	}

	/* Define Rank positions in HIF Addresses */
	for (Index = 0U; Index < PDimmPtr->NumRankAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_RANK(Index);
		Position++;
	}
}
/*****************************************************************************/
/**
 * This function calculates the HIF Addresses for Non-DDR4 mode
 *
 * @param	DdrDataPtr is pointer to DDR Initialization Data Structure
 * @param	HifAddr is the pointer to the HIF Addresses Array
 *
 * @return	None
 *
 *****************************************************************************/
This function calculates the HIF Addresses for Non-DDR4 mode
@param       DdrDataPtr is pointer to DDR Initialization Data Structure
@param       HifAddr is the pointer to the HIF Addresses Array

@return      None
This function calculates the HIF Addresses for Non - DDR4 mode @param DdrDataPtr is pointer to DDR Initialization Data Structure @param HifAddr is the pointer to the HIF Addresses Array @return None
static void XFsbl_DdrCalcDdr4HifAddr(struct DdrcInitData *DdrDataPtr, u32 *HifAddr)
{
	XFsbl_DimmParams *PDimmPtr = &DdrDataPtr->PDimm;
	u32 Position = 0U;
	u32 Index;
	for (Index = 0U; Index < PDimmPtr->NumColAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_COLUMN(Index);
		Position++;
	}
	for (Index = 0U; Index < PDimmPtr->NumBgAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_BG(Index);
		Position++;
	}
	for (Index = 0U; Index < PDimmPtr->NumBankAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_BANK(Index);
		Position++;
	}
	for (Index = 0U; Index < PDimmPtr->NumRowAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_ROW(Index);
		Position++;
	}
	for (Index = 0U; Index < PDimmPtr->NumRankAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_RANK(Index);
		Position++;
	}
}
static void XFsbl_DdrCalcDdr4HifAddr ( struct DdrcInitData * DdrDataPtr , u32 * HifAddr ) { XFsbl_DimmParams * PDimmPtr = & DdrDataPtr -> PDimm ; u32 Position = 0U ; u32 Index ; for ( Index = 0U ; Index < PDimmPtr -> NumColAddr ; Index ++ ) { HifAddr [ Position ] = XFSBL_HIF_COLUMN ( Index ) ; Position ++ ; } for ( Index = 0U ; Index < PDimmPtr -> NumBgAddr ; Index ++ ) { HifAddr [ Position ] = XFSBL_HIF_BG ( Index ) ; Position ++ ; } for ( Index = 0U ; Index < PDimmPtr -> NumBankAddr ; Index ++ ) { HifAddr [ Position ] = XFSBL_HIF_BANK ( Index ) ; Position ++ ; } for ( Index = 0U ; Index < PDimmPtr -> NumRowAddr ; Index ++ ) { HifAddr [ Position ] = XFSBL_HIF_ROW ( Index ) ; Position ++ ; } for ( Index = 0U ; Index < PDimmPtr -> NumRankAddr ; Index ++ ) { HifAddr [ Position ] = XFSBL_HIF_RANK ( Index ) ; Position ++ ; } }
This function calculates the HIF Addresses for Non-DDR4 mode
 @param       DdrDataPtr is pointer to DDR Initialization Data Structure
 @param       HifAddr is the pointer to the HIF Addresses Array
This function calculates the HIF Addresses for Non - DDR4 mode @param DdrDataPtr is pointer to DDR Initialization Data Structure @param HifAddr is the pointer to the HIF Addresses Array
/* Define Column positions in HIF Addresses */ /* Define Bank Group positions in HIF Addresses */ /* Define Bank positions in HIF Addresses */ /* Define Row positions in HIF Addresses */ /* Define Rank positions in HIF Addresses */