spi_flash: move the unlock patch to bootloader and add support for GD

This commit is contained in:
Cao Sen Miao
2021-05-07 15:25:06 +08:00
committed by Michael (XIAO Xufeng)
parent fa18296c32
commit dda13f88ea
10 changed files with 118 additions and 14 deletions

View File

@@ -70,6 +70,7 @@
#include "esp_ota_ops.h"
#include "esp_efuse.h"
#include "bootloader_flash_config.h"
#include "bootloader_flash.h"
#ifdef CONFIG_APP_BUILD_TYPE_ELF_RAM
#include "esp32/rom/efuse.h"
@@ -430,7 +431,7 @@ void start_cpu0_default(void)
extern void esp_rom_spiflash_attach(uint32_t, bool);
esp_rom_spiflash_attach(ets_efuse_get_spiconfig(), false);
esp_rom_spiflash_unlock();
bootloader_flash_unlock();
#else
// This assumes that DROM is the first segment in the application binary, i.e. that we can read
// the binary header through cache by accessing SOC_DROM_LOW address.