diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-04 14:36:08 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-29 22:16:44 +0000 |
commit | 373c310c8e78650d644b038530a34a5433412870 (patch) | |
tree | 37e53bff605d9552ff8af5ffdd2cbe569e162e39 /zephyr/Kconfig | |
parent | 0be966a98cd999239152881295acb24e9f4581e3 (diff) | |
download | chrome-ec-373c310c8e78650d644b038530a34a5433412870.tar.gz |
zephyr: Add the beginnings of a shim for flash access
Add myriad Kconfig options to make the flash code compile. This does
not yet do anything useful, as we need to connect up to the Zephyr
flash device (and need support for this in the npcx too).
BUG=b:174873770
BRANCH=none
TEST=build for volteer
Change-Id: Ib4bed4cdd39cdf33a1d27b39aadb89df491941b3
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575208
Diffstat (limited to 'zephyr/Kconfig')
-rw-r--r-- | zephyr/Kconfig | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig index fb50ac9c31..90af23f3a8 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -90,6 +90,48 @@ 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 + bool "Enable flash support" + default y + help + Enables access to the device's flash through a simple API. With + this is it possible for the EC to update its flash while running, + e.g. to support auto-update. Various write-protection features are + also provided. + +if PLATFORM_EC_FLASH + +config PLATFORM_EC_CONSOLE_CMD_FLASH + bool "Enable the flash commands" + default y + help + Enables various console commands: + + flashread - read from flash to memory + flasherase - erase flash region + flashwrite - write memory to flash + flashwp - change write-protection settings + +config PLATFORM_EC_EXTERNAL_STORAGE + bool "Flash is stored external to the EC" + default y if SOC_FAMILY_NPCX + help + This indicates that the EC's flash is stored separately and is it + not possible execute directly from it. Code must be loaded from + the flash into internal SRAM before it can be executed. It is still + possible to read and write the flash. + +config PLATFORM_EC_MAPPED_STORAGE + bool "Flash is mapped into the EC's address space" + default y if SOC_FAMILY_NPCX + help + This indicates that the EC's flash is directly mapped into + its address space. This makes it easier to read and write the flash. + If this is not defined, the flash driver must implement + flash_physical_read(). + +endif # PLATFORM_EC_FLASH + menuconfig PLATFORM_EC_KEYBOARD bool "Enable keyboard support" default y |