spi_flash: move the unlock patch to bootloader and add support for GD (backport v4.0)

This commit is contained in:
Cao Sen Miao
2021-09-18 04:28:03 +08:00
committed by zhaokeke
parent 6b79d1c206
commit 04a730c80c
5 changed files with 98 additions and 2 deletions

View File

@@ -88,6 +88,7 @@ static void do_global_ctors(void);
static void main_task(void* args);
extern void app_main(void);
extern esp_err_t esp_pthread_init(void);
extern esp_err_t bootloader_flash_unlock(void);
extern int _bss_start;
extern int _bss_end;
@@ -458,6 +459,7 @@ void start_cpu0_default(void)
#endif
bootloader_flash_update_id();
bootloader_flash_unlock();
#if !CONFIG_SPIRAM_BOOT_INIT
// If psram is uninitialized, we need to improve some flash configuration.
bootloader_flash_clock_config(&fhdr);