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

	/* Calculate Bank Addresses */
	for (BankBit = 0U; BankBit < XFSBL_MAX_BANKS; BankBit++) {
		if (BankBit < PDimmPtr->NumBankAddr) {
			Index = BankBit + 2U;

			while (HifAddr[Index] != XFSBL_HIF_BANK(BankBit)) {
				Index++;
			}

			DdrDataPtr->AddrMapBankBit[BankBit] = Index -
				(BankBit + 2U);
		} else {
			DdrDataPtr->AddrMapBankBit[BankBit] = 0x1FU;
		}
	}
}
/*****************************************************************************/
/**
 * This function calculates the Bank Address Map based on HIF Addresses
 *
 * @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 Bank Address Map based on HIF Addresses
@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 Bank Address Map based on HIF Addresses @param DdrDataPtr is pointer to DDR Initialization Data Structure @param HifAddr is the pointer to the HIF Addresses Array @return None
static void XFsbl_DdrCalcBankAddr(struct DdrcInitData *DdrDataPtr, u32 *HifAddr)
{
	u32 Index;
	u32 BankBit;
	XFsbl_DimmParams *PDimmPtr = &DdrDataPtr->PDimm;
	for (BankBit = 0U; BankBit < XFSBL_MAX_BANKS; BankBit++) {
		if (BankBit < PDimmPtr->NumBankAddr) {
			Index = BankBit + 2U;
			while (HifAddr[Index] != XFSBL_HIF_BANK(BankBit)) {
				Index++;
			}
			DdrDataPtr->AddrMapBankBit[BankBit] = Index -
				(BankBit + 2U);
		} else {
			DdrDataPtr->AddrMapBankBit[BankBit] = 0x1FU;
		}
	}
}
static void XFsbl_DdrCalcBankAddr ( struct DdrcInitData * DdrDataPtr , u32 * HifAddr ) { u32 Index ; u32 BankBit ; XFsbl_DimmParams * PDimmPtr = & DdrDataPtr -> PDimm ; for ( BankBit = 0U ; BankBit < XFSBL_MAX_BANKS ; BankBit ++ ) { if ( BankBit < PDimmPtr -> NumBankAddr ) { Index = BankBit + 2U ; while ( HifAddr [ Index ] != XFSBL_HIF_BANK ( BankBit ) ) { Index ++ ; } DdrDataPtr -> AddrMapBankBit [ BankBit ] = Index - ( BankBit + 2U ) ; } else { DdrDataPtr -> AddrMapBankBit [ BankBit ] = 0x1FU ; } } }
This function calculates the Bank Address Map based on HIF Addresses
 @param       DdrDataPtr is pointer to DDR Initialization Data Structure
 @param       HifAddr is the pointer to the HIF Addresses Array
This function calculates the Bank Address Map based on HIF Addresses @param DdrDataPtr is pointer to DDR Initialization Data Structure @param HifAddr is the pointer to the HIF Addresses Array
/* Calculate Bank Addresses */