bsps/xqspipsu: Use device information from the FCT

Instead of statically defining the device parameters, use the device
information available via the NOR device layer's Flash Configuration
Table.
This commit is contained in:
Kinsey Moore
2023-05-24 14:53:58 -05:00
committed by Joel Sherrill
parent 7a14c3df8b
commit 09fd5dd353
3 changed files with 46 additions and 6 deletions

View File

@@ -2258,3 +2258,19 @@ static int MultiDieReadEcc(
}
return 0;
}
u32 QspiPsu_NOR_Get_Sector_Size(XQspiPsu *QspiPsuPtr)
{
if(QspiPsuPtr->Config.ConnectionMode == XQSPIPSU_CONNECTION_MODE_PARALLEL) {
return Flash_Config_Table[FCTIndex].SectSize * 2;
}
return Flash_Config_Table[FCTIndex].SectSize;
}
u32 QspiPsu_NOR_Get_Device_Size(XQspiPsu *QspiPsuPtr)
{
if(QspiPsuPtr->Config.ConnectionMode == XQSPIPSU_CONNECTION_MODE_STACKED) {
return Flash_Config_Table[FCTIndex].FlashDeviceSize * 2;
}
return Flash_Config_Table[FCTIndex].FlashDeviceSize;
}