bios: litespi: clear rx queue after write

clear rx queue at the end of spiflash_master_write().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
Fin Maaß 2024-10-24 15:10:37 +02:00
parent c1225736a8
commit 63fa4fda85
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View File

@ -111,6 +111,9 @@ static void spiflash_master_write(uint32_t val, size_t len, size_t width, uint32
spiflash_core_master_rxtx_write(val);
while (!spiflash_rx_ready());
/* Clear RX queue. */
spiflash_core_master_rxtx_read();
/* Clear CS. */
spiflash_core_master_cs_write(0);
}

View File

@ -97,6 +97,9 @@ static void spiram_master_write(uint32_t val, size_t len, size_t width, uint32_t
spiram_core_master_rxtx_write(val);
while (!spiram_rx_ready());
/* Clear RX queue. */
spiflash_core_master_rxtx_read();
/* Clear CS. */
spiram_core_master_cs_write(0);
}