mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-19 00:51:18 +08:00
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:
committed by
Joel Sherrill
parent
7a14c3df8b
commit
09fd5dd353
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user