Ignore:
Timestamp:
05/24/23 19:53:58 (6 months ago)
Author:
Kinsey Moore <kinsey.moore@…>
Branches:
master
Children:
ea27ada
Parents:
7a14c3df
git-author:
Kinsey Moore <kinsey.moore@…> (05/24/23 19:53:58)
git-committer:
Joel Sherrill <joel@…> (06/08/23 14:48:44)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/shared/dev/spi/xqspipsu-flash-helper.c

    r7a14c3df r09fd5dd3  
    22592259  return 0;
    22602260}
     2261
     2262u32 QspiPsu_NOR_Get_Sector_Size(XQspiPsu *QspiPsuPtr)
     2263{
     2264  if(QspiPsuPtr->Config.ConnectionMode == XQSPIPSU_CONNECTION_MODE_PARALLEL) {
     2265    return Flash_Config_Table[FCTIndex].SectSize * 2;
     2266  }
     2267  return Flash_Config_Table[FCTIndex].SectSize;
     2268}
     2269
     2270u32 QspiPsu_NOR_Get_Device_Size(XQspiPsu *QspiPsuPtr)
     2271{
     2272  if(QspiPsuPtr->Config.ConnectionMode == XQSPIPSU_CONNECTION_MODE_STACKED) {
     2273    return Flash_Config_Table[FCTIndex].FlashDeviceSize * 2;
     2274  }
     2275  return Flash_Config_Table[FCTIndex].FlashDeviceSize;
     2276}
Note: See TracChangeset for help on using the changeset viewer.