diff options
author | Tom Rini <trini@konsulko.com> | 2020-06-03 12:27:51 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-06-03 12:27:51 -0400 |
commit | 0d8f35b58cc8458a5263b424896a386429ee49e5 (patch) | |
tree | 5d2faff1993ca4daa006916e84521af31ddfecb6 /env/sf.c | |
parent | f1a69b8c733614ca8293891d4f7a1d1bdbe665c9 (diff) | |
parent | db2e6d0ad7860653fcec63ded4211d74b83c2e09 (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi
- Toshiba spinand (Yoshio)
- SPI/SPI Flash cleanup (Jagan)
- Remove SH SPI (Jagan)
Diffstat (limited to 'env/sf.c')
-rw-r--r-- | env/sf.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -53,15 +53,14 @@ static int setup_flash_device(void) env_flash = dev_get_uclass_priv(new); #else + if (env_flash) + spi_flash_free(env_flash); + env_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS, + CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE); if (!env_flash) { - env_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, - CONFIG_ENV_SPI_CS, - CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE); - if (!env_flash) { - env_set_default("spi_flash_probe() failed", 0); - return -EIO; - } + env_set_default("spi_flash_probe() failed", 0); + return -EIO; } #endif return 0; |