esp_flash: fix cs_initialize issue on esp32s2

This commit is contained in:
Michael (XIAO Xufeng) 2020-07-11 02:19:28 +08:00
parent 0a65911df2
commit c7b1436485
2 changed files with 2 additions and 12 deletions

View File

@ -88,13 +88,10 @@ static IRAM_ATTR NOINLINE_ATTR void cs_initialize(esp_flash_t *chip, const esp_f
//To avoid the panic caused by flash data line conflicts during cs line
//initialization, disable the cache temporarily
chip->os_func->start(chip->os_func_data);
PIN_INPUT_ENABLE(iomux_reg);
if (use_iomux) {
// This requires `gpio_iomux_in` and `gpio_iomux_out` to be in the IRAM.
// `linker.lf` is used fulfill this requirement.
gpio_iomux_in(cs_io_num, spics_in);
gpio_iomux_out(cs_io_num, spics_func, false);
PIN_FUNC_SELECT(iomux_reg, spics_func);
} else {
PIN_INPUT_ENABLE(iomux_reg);
if (cs_io_num < 32) {
GPIO.enable_w1ts = (0x1 << cs_io_num);
} else {

View File

@ -7,10 +7,3 @@ entries:
spi_flash_chip_mxic (noflash)
spi_flash_chip_gd(noflash)
memspi_host_driver (noflash)
# `spi_bus_add_flash_device` uses these functions when the cache is disabled
[mapping:driver_spiflash]
archive: libdriver.a
entries:
gpio:gpio_iomux_out (noflash)
gpio:gpio_iomux_in (noflash)