You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/01/31 15:35:59 UTC

[incubator-nuttx] 02/02: esp32c3/: Remove unused exported variables from ROM and add declaration for the one used.

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit f49a5797213f2ec3fd348e1826db6e080e7be4d9
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Mon Jan 31 13:20:30 2022 +0100

    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 68dc75d..36fae3c 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_spiflash_mtd.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_spiflash_mtd.c
@@ -103,12 +103,6 @@ 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 ca6bfe0..aa5a87f 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 */
-
-extern esp32c3_spiflash_chip_t g_rom_flashchip;
+/*****************************************************************************
+ * Public Data
+ *****************************************************************************/
 
-extern uint8_t g_rom_spiflash_dummy_len_plus[];
+extern const struct spiflash_legacy_data_s *rom_spiflash_legacy_data;
 
 #ifdef __cplusplus
 }