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

	/* First four HIF addresses are fixed for BRC Mapping */
	HifAddr[0U] = XFSBL_HIF_COLUMN(0U);
	HifAddr[1U] = XFSBL_HIF_COLUMN(1U);
	HifAddr[2U] = XFSBL_HIF_COLUMN(2U);
	HifAddr[3U] = XFSBL_HIF_BG(0U);

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

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

	/* Define Bank positions in HIF Addresses */
	for (Index = 0U; Index < PDimmPtr->NumBankAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_BANK(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 Bank-Row-Column mapping 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 Bank-Row-Column mapping 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 Bank - Row - Column mapping 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_DdrCalcHifAddrBrcMap(struct DdrcInitData *DdrDataPtr,
		u32 *HifAddr)
{
	u32 Position;
	u32 Index;
	XFsbl_DimmParams *PDimmPtr = &DdrDataPtr->PDimm;
	HifAddr[0U] = XFSBL_HIF_COLUMN(0U);
	HifAddr[1U] = XFSBL_HIF_COLUMN(1U);
	HifAddr[2U] = XFSBL_HIF_COLUMN(2U);
	HifAddr[3U] = XFSBL_HIF_BG(0U);
	Position = 4U;
	for (Index = 3U; Index < PDimmPtr->NumColAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_COLUMN(Index);
		Position++;
	}
	for (Index = 0U; Index < PDimmPtr->NumRowAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_ROW(Index);
		Position++;
	}
	for (Index = 0U; Index < PDimmPtr->NumBankAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_BANK(Index);
		Position++;
	}
	for (Index = 0U; Index < PDimmPtr->NumRankAddr; Index++) {
		HifAddr[Position] = XFSBL_HIF_RANK(Index);
		Position++;
	}
}
static void XFsbl_DdrCalcHifAddrBrcMap ( struct DdrcInitData * DdrDataPtr , u32 * HifAddr ) { u32 Position ; u32 Index ; XFsbl_DimmParams * PDimmPtr = & DdrDataPtr -> PDimm ; HifAddr [ 0U ] = XFSBL_HIF_COLUMN ( 0U ) ; HifAddr [ 1U ] = XFSBL_HIF_COLUMN ( 1U ) ; HifAddr [ 2U ] = XFSBL_HIF_COLUMN ( 2U ) ; HifAddr [ 3U ] = XFSBL_HIF_BG ( 0U ) ; Position = 4U ; for ( Index = 3U ; Index < PDimmPtr -> NumColAddr ; Index ++ ) { HifAddr [ Position ] = XFSBL_HIF_COLUMN ( Index ) ; Position ++ ; } for ( Index = 0U ; Index < PDimmPtr -> NumRowAddr ; Index ++ ) { HifAddr [ Position ] = XFSBL_HIF_ROW ( Index ) ; Position ++ ; } for ( Index = 0U ; Index < PDimmPtr -> NumBankAddr ; Index ++ ) { HifAddr [ Position ] = XFSBL_HIF_BANK ( Index ) ; Position ++ ; } for ( Index = 0U ; Index < PDimmPtr -> NumRankAddr ; Index ++ ) { HifAddr [ Position ] = XFSBL_HIF_RANK ( Index ) ; Position ++ ; } }
This function calculates the HIF Addresses for Bank-Row-Column mapping 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 Bank - Row - Column mapping mode @param DdrDataPtr is pointer to DDR Initialization Data Structure @param HifAddr is the pointer to the HIF Addresses Array
/* First four HIF addresses are fixed for BRC Mapping */ /* Define Column positions in HIF Addresses */ /* Define Row positions in HIF Addresses */ /* Define Bank positions in HIF Addresses */ /* Define Rank positions in HIF Addresses */