summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-04-24 15:29:41 +0000
committerCommit Bot <commit-bot@chromium.org>2021-04-24 19:34:04 +0000
commit4ac1d81e1430dbfbfba1376a23ab19dfa845d7ef (patch)
tree1c4ed92d40e0c4e93c1253d79e11f574d7ee1e7d
parentf0be771092e47854664c6028c56d1499ca412f8a (diff)
downloadchrome-ec-stabilize-13935.B-main.tar.gz
Revert "config: rename CONFIG_FLASH to CONFIG_FLASH_CROS"stabilize-13935.B-main
This reverts commit 4e074a16c5703f0cdd7b7d780a8ae1bea53a445a. Reason for revert: responsible for CQ failures (crbug.com/1202406) BUG=chromium:1202406 BRANCH=none TEST=CQ Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Original change's description: > 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> Bug: b:180980668 Change-Id: Idc5e799d3b0ea8cc76dbbb49a91b3758ce6e9719 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2847274 Auto-Submit: Jack Rosenthal <jrosenth@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jack Rosenthal <jrosenth@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, 38 insertions, 37 deletions
diff --git a/board/arcada_ish/board.h b/board/arcada_ish/board.h
index ce735bd268..13c62c6195 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_CROS
+#undef CONFIG_FLASH
#undef CONFIG_FMAP
#undef CONFIG_SWITCH
diff --git a/board/atlas_ish/board.h b/board/atlas_ish/board.h
index c9ee52395d..5e75cbe7c0 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_CROS
+#undef CONFIG_FLASH
#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 dab93426a6..483af9be22 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_CROS
+#undef CONFIG_FLASH
#undef CONFIG_FMAP
#undef CONFIG_SWITCH
diff --git a/board/hadoken/board.h b/board/hadoken/board.h
index ef4b45640d..e8d71b7ee8 100644
--- a/board/hadoken/board.h
+++ b/board/hadoken/board.h
@@ -10,7 +10,7 @@
#ifndef __ASSEMBLER__
-#undef CONFIG_FLASH_CROS /* TODO: implement me */
+#undef CONFIG_FLASH /* 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 aa498d6caa..656d372766 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_CROS
+#define CONFIG_FLASH
/*
* 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 e8ce99845f..3124779fd7 100644
--- a/board/stm32l476g-eval/board.h
+++ b/board/stm32l476g-eval/board.h
@@ -50,7 +50,7 @@
#ifndef __ASSEMBLER__
-#undef CONFIG_FLASH_CROS
+#undef CONFIG_FLASH
#undef CONFIG_FLASH_PHYSICAL
/* Timer selection */
diff --git a/board/tglrvp_ish/board.h b/board/tglrvp_ish/board.h
index 03044a5bb8..7ab88641ea 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_CROS
+#undef CONFIG_FLASH
#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 097ee25750..6cc4057702 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_CROS
+#undef CONFIG_FLASH
#undef CONFIG_FMAP
#undef CONFIG_LID_SWITCH
#undef CONFIG_SWITCH
diff --git a/board/zinger/board.h b/board/zinger/board.h
index 82fb29f29e..c8992816eb 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_CROS
+#undef CONFIG_FLASH
#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 ac53d51732..7b428d6a09 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_CROS
+#undef CONFIG_FLASH
#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 e0710a908b..89311cda38 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_CROS
+#undef CONFIG_FLASH
#undef CONFIG_FLASH_PHYSICAL
#undef CONFIG_FMAP
#undef CONFIG_HIBERNATE
diff --git a/common/build.mk b/common/build.mk
index 32585de11f..3ca7a0fa56 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_CROS)+=flash.o
+common-$(CONFIG_FLASH)+=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 a7e097e733..9655e17fe6 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_CROS
+#ifdef CONFIG_FLASH
| EC_FEATURE_MASK_0(EC_FEATURE_FLASH)
#endif
#ifdef CONFIG_FANS
diff --git a/common/system.c b/common/system.c
index 0e4f9848d9..2085cad731 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_CROS)
+#elif defined(CONFIG_FLASH)
/*
* 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 c2c3ea12a3..85bc9ea5cb 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_CROS)
+#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH)
. = ALIGN(64);
KEEP(*(.google))
#endif
@@ -503,7 +503,7 @@ SECTIONS
__image_size = __flash_used;
#endif /* CONFIG_CHIP_INIT_ROM_REGION */
-#ifdef CONFIG_FLASH_CROS
+#ifdef CONFIG_FLASH
/*
* 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_CROS))
+#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
/DISCARD/ : { *(.google) }
#endif
/DISCARD/ : { *(.ARM.*) }
diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S
index bc461b90de..f6023aa322 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_CROS)
+#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH)
. = 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_CROS
+#ifdef CONFIG_FLASH
/*
* 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_CROS))
+#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
/DISCARD/ : { *(.google) }
#endif
/DISCARD/ : { *(.ARM.*) }
diff --git a/core/nds32/ec.lds.S b/core/nds32/ec.lds.S
index 2c21b94761..c10e3e82f7 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_CROS)
+#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH)
. = 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_CROS
+#ifdef CONFIG_FLASH
/*
* 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_CROS))
+#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
/DISCARD/ : { *(.google) }
#endif
diff --git a/core/riscv-rv32i/ec.lds.S b/core/riscv-rv32i/ec.lds.S
index e8963c1b14..80d1208a69 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_CROS)
+#if defined(SECTION_IS_RO) && defined(CONFIG_FLASH)
. = ALIGN(64);
KEEP(*(.google))
#endif
@@ -360,7 +360,7 @@ SECTIONS
#endif
__image_size = __flash_used;
-#ifdef CONFIG_FLASH_CROS
+#ifdef CONFIG_FLASH
/*
* 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_CROS))
+#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
/DISCARD/ : { *(.google) }
#endif
diff --git a/include/config.h b/include/config.h
index afa6b777f6..3de3ab11f0 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_CROS
+#define CONFIG_FLASH
/* 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_CROS
-#error CONFIG_CHIP_INIT_ROM_REGION requires CONFIG_FLASH_CROS
+#ifndef CONFIG_FLASH
+#error CONFIG_CHIP_INIT_ROM_REGION requires CONFIG_FLASH
#endif
#ifndef CONFIG_RO_ROM_RESIDENT_SIZE
diff --git a/util/config_allowed.txt b/util/config_allowed.txt
index 4560e32b57..ea62090d2a 100644
--- a/util/config_allowed.txt
+++ b/util/config_allowed.txt
@@ -488,6 +488,7 @@ 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 f16ce4dd1a..badd503e2f 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -268,7 +268,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_CROS
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_FLASH
"${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 358ac691f1..191f49ace4 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_CROS
+config PLATFORM_EC_FLASH
bool "Enable flash support"
default y if FLASH_SIZE > 0
help
diff --git a/zephyr/Kconfig.flash b/zephyr/Kconfig.flash
index e79732d928..74ec9521ed 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_CROS
+if PLATFORM_EC_FLASH
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_CROS
+endif # PLATFORM_EC_FLASH
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 7e79ddf4b1..c83d9f89eb 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_CROS
-#define CONFIG_FLASH_CROS
+#ifdef CONFIG_PLATFORM_EC_FLASH
+#define CONFIG_FLASH
#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_CROS */
+#endif /* CONFIG_PLATFORM_EC_FLASH */
#undef CONFIG_ADC
#ifdef CONFIG_PLATFORM_EC_ADC
diff --git a/zephyr/shim/src/CMakeLists.txt b/zephyr/shim/src/CMakeLists.txt
index 439ea374de..ce4ed14323 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_CROS flash.c)
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_FLASH 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