Merge pull request #1004 from antmicro/liblitespi-freq-init

liblitespi: perform frequency initialization after entering quad/qpi mode
This commit is contained in:
enjoy-digital 2021-08-23 16:36:42 +02:00 committed by GitHub
commit 16f6f08d00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 7 deletions

View File

@ -84,15 +84,8 @@ static void spiflash_master_write(uint32_t val, size_t len, size_t width, uint32
void spiflash_init(void)
{
int ret;
printf("Initializing %s SPI Flash...\n", SPIFLASH_MODULE_NAME);
/* Clk frequency auto-calibration. */
ret = spiflash_freq_init();
if (ret < 0)
return;
/* Dummy bits setup. */
#ifdef SPIFLASH_MODULE_DUMMY_BITS
spiflash_dummy_bits_setup(SPIFLASH_MODULE_DUMMY_BITS);
@ -115,6 +108,8 @@ void spiflash_init(void)
#endif
/* Clk frequency auto-calibration. */
spiflash_freq_init();
}
#endif