summaryrefslogtreecommitdiffstats
path: root/bsps
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2024-02-12 11:13:23 -0600
committerJoel Sherrill <joel@rtems.org>2024-02-19 09:26:04 -0600
commit8f8f04323488c802033ebb0cc4d2888e6774f999 (patch)
treeee33b8b75717466beae02230daea46ddde2b0578 /bsps
parentdoxygen: Fix link format (diff)
downloadrtems-8f8f04323488c802033ebb0cc4d2888e6774f999.tar.bz2
bsps/qspipsu: Calculate correct parallel mode size
Stacked mode doubles the number of sectors and device size while parallel mode doubles the sector size and the device size. Make sure that this is accounted for in the device size accessor.
Diffstat (limited to 'bsps')
-rw-r--r--bsps/shared/dev/spi/xqspipsu-flash-helper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bsps/shared/dev/spi/xqspipsu-flash-helper.c b/bsps/shared/dev/spi/xqspipsu-flash-helper.c
index 69c4035e6a..10e1066173 100644
--- a/bsps/shared/dev/spi/xqspipsu-flash-helper.c
+++ b/bsps/shared/dev/spi/xqspipsu-flash-helper.c
@@ -2333,7 +2333,8 @@ u32 QspiPsu_NOR_Get_Sector_Size(XQspiPsu *QspiPsuPtr)
u32 QspiPsu_NOR_Get_Device_Size(XQspiPsu *QspiPsuPtr)
{
- if(QspiPsuPtr->Config.ConnectionMode == XQSPIPSU_CONNECTION_MODE_STACKED) {
+ if(QspiPsuPtr->Config.ConnectionMode == XQSPIPSU_CONNECTION_MODE_STACKED
+ || QspiPsuPtr->Config.ConnectionMode == XQSPIPSU_CONNECTION_MODE_PARALLEL) {
return Flash_Config_Table[FCTIndex].FlashDeviceSize * 2;
}
return Flash_Config_Table[FCTIndex].FlashDeviceSize;