From 06bb85d8a55259517e995f40565287f866a91e21 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Nihei Date: Mon, 25 Oct 2021 14:43:13 -0300 Subject: [PATCH] risc-v/esp32c3: Rename MTD-related configs to become more intuitive Signed-off-by: Gustavo Henrique Nihei --- arch/risc-v/src/esp32c3/Kconfig | 10 +++++----- .../esp32c3/esp32c3-devkit/configs/spiflash/defconfig | 4 ++-- .../esp32c3-devkit/configs/sta_softap/defconfig | 4 ++-- .../esp32c3/esp32c3-devkit/src/esp32c3_spiflash.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/risc-v/src/esp32c3/Kconfig b/arch/risc-v/src/esp32c3/Kconfig index e59e9aa6d02..84a1431ef2d 100644 --- a/arch/risc-v/src/esp32c3/Kconfig +++ b/arch/risc-v/src/esp32c3/Kconfig @@ -872,17 +872,17 @@ config ESP32C3_OTA_SCRATCH_DEVPATH endif -comment "General MTD configuration" +comment "General storage MTD configuration" -config ESP32C3_MTD_OFFSET - hex "MTD base address in SPI Flash" +config ESP32C3_STORAGE_MTD_OFFSET + hex "Storage MTD base address in SPI Flash" default 0x180000 if !ESP32C3_HAVE_OTA_PARTITION default 0x250000 if ESP32C3_HAVE_OTA_PARTITION ---help--- MTD base address in SPI Flash. -config ESP32C3_MTD_SIZE - hex "MTD size in SPI Flash" +config ESP32C3_STORAGE_MTD_SIZE + hex "Storage MTD size in SPI Flash" default 0x100000 ---help--- MTD size in SPI Flash. diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/spiflash/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/spiflash/defconfig index 23546b3deac..c21f975bbec 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/spiflash/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/spiflash/defconfig @@ -20,9 +20,9 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_BOARD_LOOPSPERMSEC=15000 CONFIG_BUILTIN=y CONFIG_DEV_ZERO=y -CONFIG_ESP32C3_MTD_OFFSET=0x110000 -CONFIG_ESP32C3_MTD_SIZE=0xf0000 CONFIG_ESP32C3_SPIFLASH=y +CONFIG_ESP32C3_STORAGE_MTD_OFFSET=0x110000 +CONFIG_ESP32C3_STORAGE_MTD_SIZE=0xf0000 CONFIG_FS_PROCFS=y CONFIG_FS_SMARTFS=y CONFIG_IDLETHREAD_STACKSIZE=2048 diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig index 103aee378d7..bce0e0e0652 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig @@ -28,9 +28,9 @@ CONFIG_DEBUG_WIRELESS=y CONFIG_DEBUG_WIRELESS_ERROR=y CONFIG_DRIVERS_IEEE80211=y CONFIG_DRIVERS_WIRELESS=y -CONFIG_ESP32C3_MTD_OFFSET=0x110000 -CONFIG_ESP32C3_MTD_SIZE=0xf0000 CONFIG_ESP32C3_SPIFLASH=y +CONFIG_ESP32C3_STORAGE_MTD_OFFSET=0x110000 +CONFIG_ESP32C3_STORAGE_MTD_SIZE=0xf0000 CONFIG_ESP32C3_WIFI=y CONFIG_ESP32C3_WIFI_SAVE_PARAM=y CONFIG_ESP32C3_WIFI_STATION_SOFTAP_COEXISTENCE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_spiflash.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_spiflash.c index bc00a5c9ee7..334c9956ee2 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_spiflash.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_spiflash.c @@ -432,8 +432,8 @@ static int init_storage_partition(void) int ret = OK; FAR struct mtd_dev_s *mtd; - mtd = esp32c3_spiflash_alloc_mtdpart(CONFIG_ESP32C3_MTD_OFFSET, - CONFIG_ESP32C3_MTD_SIZE); + mtd = esp32c3_spiflash_alloc_mtdpart(CONFIG_ESP32C3_STORAGE_MTD_OFFSET, + CONFIG_ESP32C3_STORAGE_MTD_SIZE); if (!mtd) { ferr("ERROR: Failed to alloc MTD partition of SPI Flash\n");