Changeset 09fd5dd3 in rtems
- Timestamp:
- 05/24/23 19:53:58 (4 months ago)
- 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)
- Location:
- bsps
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
bsps/aarch64/xilinx-zynqmp/jffs2_xqspipsu.c
r7a14c3df r09fd5dd3 39 39 } flash_control; 40 40 41 /* From the N25Q512A datasheet */42 #define BLOCK_SIZE (64UL * 1024UL)43 #define FLASH_SIZE (1024UL * BLOCK_SIZE)44 41 #define FLASH_DEVICE_ID 0xbb20 /* Type: 0xbb, Capacity: 0x20 */ 45 42 … … 118 115 QspiPsuPtr, 119 116 offset, 120 BLOCK_SIZE117 super->block_size 121 118 ); 122 119 if ( Status != XST_SUCCESS ) { … … 140 137 static flash_control flash_instance = { 141 138 .super = { 142 .block_size = BLOCK_SIZE,143 .flash_size = FLASH_SIZE,144 139 .read = do_read, 145 140 .write = do_write, … … 172 167 } 173 168 169 uint32_t sect_size = QspiPsu_NOR_Get_Sector_Size(qspipsu_ptr); 170 uint32_t flash_size = QspiPsu_NOR_Get_Device_Size(qspipsu_ptr); 171 flash_instance.super.flash_size = flash_size; 172 flash_instance.super.block_size = sect_size; 173 174 174 rv = mount( 175 175 NULL, -
bsps/include/dev/spi/xqspipsu-flash-helper.h
r7a14c3df r09fd5dd3 132 132 u8 *ReadBfrPtr 133 133 ); 134 135 /*****************************************************************************/ 136 /** 137 * 138 * This function returns the size of attached flash parts. 139 * 140 * @param QspiPsuPtr is a pointer to the QSPIPSU driver component to use. 141 * 142 * @return The size of attached flash in bytes. 143 * 144 ******************************************************************************/ 145 u32 QspiPsu_NOR_Get_Device_Size(XQspiPsu *QspiPsuPtr); 146 147 /*****************************************************************************/ 148 /** 149 * 150 * This function returns the sector size of attached flash parts. 151 * 152 * @param QspiPsuPtr is a pointer to the QSPIPSU driver component to use. 153 * 154 * @return The sector size of attached flash in bytes. 155 * 156 ******************************************************************************/ 157 u32 QspiPsu_NOR_Get_Sector_Size(XQspiPsu *QspiPsuPtr); -
bsps/shared/dev/spi/xqspipsu-flash-helper.c
r7a14c3df r09fd5dd3 2259 2259 return 0; 2260 2260 } 2261 2262 u32 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 2270 u32 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.