From f49a5797213f2ec3fd348e1826db6e080e7be4d9 Mon Sep 17 00:00:00 2001 From: Abdelatif Guettouche Date: Mon, 31 Jan 2022 13:20:30 +0100 Subject: [PATCH] esp32c3/: Remove unused exported variables from ROM and add declaration for the one used. --- arch/risc-v/src/esp32c3/esp32c3_spiflash_mtd.c | 6 ------ arch/risc-v/src/esp32c3/rom/esp32c3_spiflash.h | 14 ++++++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/arch/risc-v/src/esp32c3/esp32c3_spiflash_mtd.c b/arch/risc-v/src/esp32c3/esp32c3_spiflash_mtd.c index 68dc75d791..36fae3cdcc 100644 --- a/arch/risc-v/src/esp32c3/esp32c3_spiflash_mtd.c +++ b/arch/risc-v/src/esp32c3/esp32c3_spiflash_mtd.c @@ -102,12 +102,6 @@ static ssize_t esp32c3_bwrite_encrypt(struct mtd_dev_s *dev, static int esp32c3_ioctl(struct mtd_dev_s *dev, int cmd, unsigned long arg); -/**************************************************************************** - * Public Data - ****************************************************************************/ - -extern const struct spiflash_legacy_data_s *rom_spiflash_legacy_data; - /**************************************************************************** * Private Data ****************************************************************************/ diff --git a/arch/risc-v/src/esp32c3/rom/esp32c3_spiflash.h b/arch/risc-v/src/esp32c3/rom/esp32c3_spiflash.h index ca6bfe0cc7..aa5a87f392 100644 --- a/arch/risc-v/src/esp32c3/rom/esp32c3_spiflash.h +++ b/arch/risc-v/src/esp32c3/rom/esp32c3_spiflash.h @@ -989,7 +989,8 @@ int spi_flash_erase_range(uint32_t start_address, uint32_t size); * * Returned Values: * Return true if both CPUs have flash cache enabled, false otherwise. - */ + * + *****************************************************************************/ bool spi_flash_cache_enabled(void); @@ -1001,15 +1002,16 @@ bool spi_flash_cache_enabled(void); * * Parameters: * cpuid - core number to enable instruction cache for. - */ + * + *****************************************************************************/ void spi_flash_enable_cache(uint32_t cpuid); -/* Global esp32c3_spiflash_chip_t structure used by ROM functions */ +/***************************************************************************** + * Public Data + *****************************************************************************/ -extern esp32c3_spiflash_chip_t g_rom_flashchip; - -extern uint8_t g_rom_spiflash_dummy_len_plus[]; +extern const struct spiflash_legacy_data_s *rom_spiflash_legacy_data; #ifdef __cplusplus }