summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2021-04-09 15:55:35 +0800
committerCommit Bot <commit-bot@chromium.org>2021-04-23 21:41:36 +0000
commit4e074a16c5703f0cdd7b7d780a8ae1bea53a445a (patch)
treeee55f33d67210001d31d852ba380a27778cbe379
parentd1156aae265e671c6779026ce52716f42847f9f9 (diff)
downloadchrome-ec-4e074a16c5703f0cdd7b7d780a8ae1bea53a445a.tar.gz
config: rename CONFIG_FLASH to CONFIG_FLASH_CROS
The config name collides with the same config name in zephyr. Also, renames zephyr Kconfig CONFIG_PLATFORM_EC_FLASH to CONFIG_PLATFORM_EC_FLASH_CROS as the corresponding change at Kconfig side. BUG=b:180980668 TEST=make buildall BRANCH=none Change-Id: Ibac008ddff8c041aae04dca0bbf973823abe7640 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2816622 Tested-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r--board/arcada_ish/board.h2
-rw-r--r--board/atlas_ish/board.h2
-rw-r--r--board/drallion_ish/board.h2
-rw-r--r--board/hadoken/board.h2
-rw-r--r--board/stm32f446e-eval/board.h2
-rw-r--r--board/stm32l476g-eval/board.h2
-rw-r--r--board/tglrvp_ish/board.h2
-rw-r--r--board/volteer_ish/board.h2
-rw-r--r--board/zinger/board.h2
-rw-r--r--chip/mt8192_scp/config_chip.h2
-rw-r--r--chip/mt_scp/config_chip.h2
-rw-r--r--common/build.mk2
-rw-r--r--common/ec_features.c2
-rw-r--r--common/system.c2
-rw-r--r--core/cortex-m/ec.lds.S6
-rw-r--r--core/cortex-m0/ec.lds.S6
-rw-r--r--core/nds32/ec.lds.S6
-rw-r--r--core/riscv-rv32i/ec.lds.S6
-rw-r--r--include/config.h6
-rw-r--r--util/config_allowed.txt1
-rw-r--r--zephyr/CMakeLists.txt2
-rw-r--r--zephyr/Kconfig2
-rw-r--r--zephyr/Kconfig.flash4
-rw-r--r--zephyr/shim/include/config_chip.h6
-rw-r--r--zephyr/shim/src/CMakeLists.txt2
25 files changed, 37 insertions, 38 deletions
diff --git a/board/arcada_ish/board.h b/board/arcada_ish/board.h
index 13c62c6195..ce735bd268 100644
--- a/board/arcada_ish/board.h
+++ b/board/arcada_ish/board.h
@@ -82,7 +82,7 @@
#undef CONFIG_CMD_SHMEM
#undef CONFIG_EXTPOWER
#undef CONFIG_KEYBOARD_KSO_BASE
-#undef CONFIG_FLASH
+#undef CONFIG_FLASH_CROS
#undef CONFIG_FMAP
#undef CONFIG_SWITCH
diff --git a/board/atlas_ish/board.h b/board/atlas_ish/board.h
index 5e75cbe7c0..c9ee52395d 100644
--- a/board/atlas_ish/board.h
+++ b/board/atlas_ish/board.h
@@ -49,7 +49,7 @@
#undef CONFIG_CMD_TIMERINFO
#undef CONFIG_EXTPOWER
#undef CONFIG_KEYBOARD_KSO_BASE
-#undef CONFIG_FLASH
+#undef CONFIG_FLASH_CROS
#undef CONFIG_FMAP
#undef CONFIG_LID_SWITCH
#undef CONFIG_SWITCH
diff --git a/board/drallion_ish/board.h b/board/drallion_ish/board.h
index 483af9be22..dab93426a6 100644
--- a/board/drallion_ish/board.h
+++ b/board/drallion_ish/board.h
@@ -74,7 +74,7 @@
/* Undefined features */
#undef CONFIG_EXTPOWER
#undef CONFIG_KEYBOARD_KSO_BASE
-#undef CONFIG_FLASH
+#undef CONFIG_FLASH_CROS
#undef CONFIG_FMAP
#undef CONFIG_SWITCH
diff --git a/board/hadoken/board.h b/board/hadoken/board.h
index e8d71b7ee8..ef4b45640d 100644
--- a/board/hadoken/board.h
+++ b/board/hadoken/board.h
@@ -10,7 +10,7 @@
#ifndef __ASSEMBLER__
-#undef CONFIG_FLASH /* TODO: implement me */
+#undef CONFIG_FLASH_CROS /* TODO: implement me */
#undef CONFIG_FLASH_PHYSICAL /* TODO: implement me */
#undef CONFIG_FMAP /* TODO: implement me */
#undef CONFIG_WATCHDOG
diff --git a/board/stm32f446e-eval/board.h b/board/stm32f446e-eval/board.h
index 656d372766..aa498d6caa 100644
--- a/board/stm32f446e-eval/board.h
+++ b/board/stm32f446e-eval/board.h
@@ -58,7 +58,7 @@
/* Optional features */
#define CONFIG_STM_HWTIMER32
#define CONFIG_DMA_HELP
-#define CONFIG_FLASH
+#define CONFIG_FLASH_CROS
/*
* Allow dangerous commands all the time, since we don't have a write protect
diff --git a/board/stm32l476g-eval/board.h b/board/stm32l476g-eval/board.h
index 3124779fd7..e8ce99845f 100644
--- a/board/stm32l476g-eval/board.h
+++ b/board/stm32l476g-eval/board.h
@@ -50,7 +50,7 @@
#ifndef __ASSEMBLER__
-#undef CONFIG_FLASH
+#undef CONFIG_FLASH_CROS
#undef CONFIG_FLASH_PHYSICAL
/* Timer selection */
diff --git a/board/tglrvp_ish/board.h b/board/tglrvp_ish/board.h
index 7ab88641ea..03044a5bb8 100644
--- a/board/tglrvp_ish/board.h
+++ b/board/tglrvp_ish/board.h
@@ -55,7 +55,7 @@
#undef CONFIG_CMD_SHMEM
#undef CONFIG_EXTPOWER
#undef CONFIG_KEYBOARD_KSO_BASE
-#undef CONFIG_FLASH
+#undef CONFIG_FLASH_CROS
#undef CONFIG_FMAP
#undef CONFIG_LID_SWITCH
#undef CONFIG_SWITCH
diff --git a/board/volteer_ish/board.h b/board/volteer_ish/board.h
index 6cc4057702..097ee25750 100644
--- a/board/volteer_ish/board.h
+++ b/board/volteer_ish/board.h
@@ -70,7 +70,7 @@
#undef CONFIG_CMD_SHMEM
#undef CONFIG_EXTPOWER
#undef CONFIG_KEYBOARD_KSO_BASE
-#undef CONFIG_FLASH
+#undef CONFIG_FLASH_CROS
#undef CONFIG_FMAP
#undef CONFIG_LID_SWITCH
#undef CONFIG_SWITCH
diff --git a/board/zinger/board.h b/board/zinger/board.h
index c8992816eb..82fb29f29e 100644
--- a/board/zinger/board.h
+++ b/board/zinger/board.h
@@ -37,7 +37,7 @@
#undef CONFIG_DEBUG_ASSERT
#undef CONFIG_DEBUG_EXCEPTIONS
#undef CONFIG_DEBUG_STACK_OVERFLOW
-#undef CONFIG_FLASH
+#undef CONFIG_FLASH_CROS
#undef CONFIG_FLASH_PHYSICAL
#undef CONFIG_FMAP
/* Not using pstate but keep some space for the public key */
diff --git a/chip/mt8192_scp/config_chip.h b/chip/mt8192_scp/config_chip.h
index 7b428d6a09..ac53d51732 100644
--- a/chip/mt8192_scp/config_chip.h
+++ b/chip/mt8192_scp/config_chip.h
@@ -29,7 +29,7 @@
/* Unsupported features/commands */
#undef CONFIG_CMD_FLASHINFO
#undef CONFIG_CMD_POWER_AP
-#undef CONFIG_FLASH
+#undef CONFIG_FLASH_CROS
#undef CONFIG_FLASH_PHYSICAL
#undef CONFIG_FMAP
#undef CONFIG_HIBERNATE
diff --git a/chip/mt_scp/config_chip.h b/chip/mt_scp/config_chip.h
index 89311cda38..e0710a908b 100644
--- a/chip/mt_scp/config_chip.h
+++ b/chip/mt_scp/config_chip.h
@@ -43,7 +43,7 @@
/* Unsupported features/commands */
#undef CONFIG_CMD_FLASHINFO
#undef CONFIG_CMD_POWER_AP
-#undef CONFIG_FLASH
+#undef CONFIG_FLASH_CROS
#undef CONFIG_FLASH_PHYSICAL
#undef CONFIG_FMAP
#undef CONFIG_HIBERNATE
diff --git a/common/build.mk b/common/build.mk
index 3ca7a0fa56..32585de11f 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -78,7 +78,7 @@ common-$(CONFIG_HOSTCMD_ESPI)+=espi.o
common-$(CONFIG_EXTPOWER_GPIO)+=extpower_gpio.o
common-$(CONFIG_EXTPOWER)+=extpower_common.o
common-$(CONFIG_FANS)+=fan.o pwm.o
-common-$(CONFIG_FLASH)+=flash.o
+common-$(CONFIG_FLASH_CROS)+=flash.o
common-$(CONFIG_FMAP)+=fmap.o
common-$(CONFIG_GESTURE_SW_DETECTION)+=gesture.o
common-$(CONFIG_HOSTCMD_EVENTS)+=host_event_commands.o
diff --git a/common/ec_features.c b/common/ec_features.c
index 9655e17fe6..a7e097e733 100644
--- a/common/ec_features.c
+++ b/common/ec_features.c
@@ -17,7 +17,7 @@ uint32_t get_feature_flags0(void)
#ifdef CONFIG_FW_LIMITED_IMAGE
| EC_FEATURE_MASK_0(EC_FEATURE_LIMITED)
#endif
-#ifdef CONFIG_FLASH
+#ifdef CONFIG_FLASH_CROS
| EC_FEATURE_MASK_0(EC_FEATURE_FLASH)
#endif
#ifdef CONFIG_FANS
diff --git a/common/system.c b/common/system.c
index 6a96db415f..6b473a33b8 100644
--- a/common/system.c
+++ b/common/system.c
@@ -176,7 +176,7 @@ int system_is_locked(void)
is_locked = 0;
return 0;
-#elif defined(CONFIG_FLASH)
+#elif defined(CONFIG_FLASH_CROS)
/*
* Unlocked if write protect pin deasserted or read-only firmware
* is not protected.
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 85bc9ea5cb..c2c3ea12a3 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -345,7 +345,7 @@ SECTIONS
__init_rom_end = .;
#endif /* CONFIG_CHIP_INIT_ROM_REGION */
-#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH)
+#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH_CROS)
. = ALIGN(64);
KEEP(*(.google))
#endif
@@ -503,7 +503,7 @@ SECTIONS
__image_size = __flash_used;
#endif /* CONFIG_CHIP_INIT_ROM_REGION */
-#ifdef CONFIG_FLASH
+#ifdef CONFIG_FLASH_CROS
/*
* These linker labels are just for analysis and not used in the code.
*/
@@ -703,7 +703,7 @@ SECTIONS
} > DRAM
#endif
-#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
+#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH_CROS))
/DISCARD/ : { *(.google) }
#endif
/DISCARD/ : { *(.ARM.*) }
diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S
index f6023aa322..bc461b90de 100644
--- a/core/cortex-m0/ec.lds.S
+++ b/core/cortex-m0/ec.lds.S
@@ -220,7 +220,7 @@ SECTIONS
*(.init.rom)
__init_rom_end = .;
-#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH)
+#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH_CROS)
. = ALIGN(64);
KEEP(*(.google))
#endif
@@ -315,7 +315,7 @@ SECTIONS
__flash_used = LOADADDR(.data) + SIZEOF(.data) - ORIGIN(FLASH);
__image_size = __flash_used;
-#ifdef CONFIG_FLASH
+#ifdef CONFIG_FLASH_CROS
/*
* These linker labels are just for analysis and not used in the code.
*/
@@ -353,7 +353,7 @@ SECTIONS
#undef REGION
#endif /* CONFIG_CHIP_MEMORY_REGIONS */
-#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
+#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH_CROS))
/DISCARD/ : { *(.google) }
#endif
/DISCARD/ : { *(.ARM.*) }
diff --git a/core/nds32/ec.lds.S b/core/nds32/ec.lds.S
index c10e3e82f7..2c21b94761 100644
--- a/core/nds32/ec.lds.S
+++ b/core/nds32/ec.lds.S
@@ -205,7 +205,7 @@ SECTIONS
*(.init.rom)
__init_rom_end = .;
-#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH)
+#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH_CROS)
. = ALIGN(64);
KEEP(*(.google))
#endif
@@ -285,7 +285,7 @@ SECTIONS
__flash_used = LOADADDR(.data) + SIZEOF(.data) - FW_OFF(SECTION);
__image_size = __flash_used;
-#ifdef CONFIG_FLASH
+#ifdef CONFIG_FLASH_CROS
/*
* These linker labels are just for analysis and not used in the code.
*/
@@ -313,7 +313,7 @@ SECTIONS
"Not enough space for h2ram section.")
#endif
-#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
+#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH_CROS))
/DISCARD/ : { *(.google) }
#endif
diff --git a/core/riscv-rv32i/ec.lds.S b/core/riscv-rv32i/ec.lds.S
index 80d1208a69..e8963c1b14 100644
--- a/core/riscv-rv32i/ec.lds.S
+++ b/core/riscv-rv32i/ec.lds.S
@@ -254,7 +254,7 @@ SECTIONS
. = ALIGN(4);
*(.srodata*)
-#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH)
+#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH_CROS)
. = ALIGN(64);
KEEP(*(.google))
#endif
@@ -360,7 +360,7 @@ SECTIONS
#endif
__image_size = __flash_used;
-#ifdef CONFIG_FLASH
+#ifdef CONFIG_FLASH_CROS
/*
* These linker labels are just for analysis and not used in the code.
*/
@@ -450,7 +450,7 @@ SECTIONS
} > DRAM
#endif /* CONFIG_DRAM_BASE */
-#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
+#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH_CROS))
/DISCARD/ : { *(.google) }
#endif
diff --git a/include/config.h b/include/config.h
index 3de3ab11f0..afa6b777f6 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1784,7 +1784,7 @@
/* Flash configuration */
/* This enables console commands and higher-level features */
-#define CONFIG_FLASH
+#define CONFIG_FLASH_CROS
/* This enables chip-specific access functions */
#define CONFIG_FLASH_PHYSICAL
#undef CONFIG_FLASH_BANK_SIZE
@@ -5940,8 +5940,8 @@
*/
#ifdef CONFIG_CHIP_INIT_ROM_REGION
-#ifndef CONFIG_FLASH
-#error CONFIG_CHIP_INIT_ROM_REGION requires CONFIG_FLASH
+#ifndef CONFIG_FLASH_CROS
+#error CONFIG_CHIP_INIT_ROM_REGION requires CONFIG_FLASH_CROS
#endif
#ifndef CONFIG_RO_ROM_RESIDENT_SIZE
diff --git a/util/config_allowed.txt b/util/config_allowed.txt
index ea62090d2a..4560e32b57 100644
--- a/util/config_allowed.txt
+++ b/util/config_allowed.txt
@@ -488,7 +488,6 @@ CONFIG_FAN_INIT_SPEED
CONFIG_FAN_RPM_CUSTOM
CONFIG_FAN_UPDATE_PERIOD
CONFIG_FINGERPRINT_MCU
-CONFIG_FLASH
CONFIG_FLASH_BANK_SIZE
CONFIG_FLASH_DEFERRED_ERASE
CONFIG_FLASH_ERASED_VALUE32
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index a0c03874d9..95bf2046ea 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -267,7 +267,7 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_EXTPOWER_GPIO
"${PLATFORM_EC}/common/extpower_gpio.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_FAN
"${PLATFORM_EC}/common/fan.c")
-zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_FLASH
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_FLASH_CROS
"${PLATFORM_EC}/common/flash.c"
"${PLATFORM_EC}/common/spi_flash_reg.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_HOSTCMD
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index 191f49ace4..358ac691f1 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -265,7 +265,7 @@ config PLATFORM_EC_EXTPOWER_GPIO
project should define a GPIO pin named GPIO_AC_PRESENT, with
extpower_interrupt configured as the handler in gpio_map.h.
-config PLATFORM_EC_FLASH
+config PLATFORM_EC_FLASH_CROS
bool "Enable flash support"
default y if FLASH_SIZE > 0
help
diff --git a/zephyr/Kconfig.flash b/zephyr/Kconfig.flash
index 74ec9521ed..e79732d928 100644
--- a/zephyr/Kconfig.flash
+++ b/zephyr/Kconfig.flash
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-if PLATFORM_EC_FLASH
+if PLATFORM_EC_FLASH_CROS
config PLATFORM_EC_SPI_FLASH_REGS
bool "Enable SPI flash registers"
@@ -110,4 +110,4 @@ config PLATFORM_EC_MAPPED_STORAGE
If this is not defined, the flash driver must implement
flash_physical_read().
-endif # PLATFORM_EC_FLASH
+endif # PLATFORM_EC_FLASH_CROS
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index c83d9f89eb..7e79ddf4b1 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -288,8 +288,8 @@
#undef CONFIG_MAPPED_STORAGE
#undef CONFIG_FLASH_PSTATE
#undef CONFIG_FLASH_SIZE_BYTES
-#ifdef CONFIG_PLATFORM_EC_FLASH
-#define CONFIG_FLASH
+#ifdef CONFIG_PLATFORM_EC_FLASH_CROS
+#define CONFIG_FLASH_CROS
#define CONFIG_SPI_FLASH_W25Q80 /* Internal SPI flash type. */
#ifdef CONFIG_FLASH_SIZE
#define CONFIG_FLASH_SIZE_BYTES (CONFIG_FLASH_SIZE * 1024)
@@ -337,7 +337,7 @@
#define CONFIG_CMD_FLASH_WP
#endif
-#endif /* CONFIG_PLATFORM_EC_FLASH */
+#endif /* CONFIG_PLATFORM_EC_FLASH_CROS */
#undef CONFIG_ADC
#ifdef CONFIG_PLATFORM_EC_ADC
diff --git a/zephyr/shim/src/CMakeLists.txt b/zephyr/shim/src/CMakeLists.txt
index ce4ed14323..439ea374de 100644
--- a/zephyr/shim/src/CMakeLists.txt
+++ b/zephyr/shim/src/CMakeLists.txt
@@ -18,7 +18,7 @@ zephyr_library_sources_ifdef(no_libgcc libgcc_${ARCH}.S)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ADC adc.c)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ESPI espi.c)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_FAN fan.c)
-zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_FLASH flash.c)
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_FLASH_CROS flash.c)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_HOOKS hooks.c)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_HOSTCMD host_command.c)
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_HOSTCMD_CONSOLE