summaryrefslogtreecommitdiff
path: root/zephyr/shim/include/config_chip.h
diff options
context:
space:
mode:
authorTim Lin <tim2.lin@ite.corp-partner.google.com>2021-06-02 15:40:01 +0800
committerCommit Bot <commit-bot@chromium.org>2021-06-23 01:52:46 +0000
commit41165549be19ddc085bffc7b7abb09bc20b7eac5 (patch)
tree6d03d795dd9597811affc192aa0b435aabb71c2d /zephyr/shim/include/config_chip.h
parent7504878299b553aafc283abf47962518269ea12c (diff)
downloadchrome-ec-41165549be19ddc085bffc7b7abb09bc20b7eac5.tar.gz
zephyr: enable related configs for flash driver on it8xxx2
These flash related configs have to be enabled for the flash driver of it8xxx2. This CL also distinguishes the flash configs into header file of it8xxx2 and npcx. BUG=b:187192628 BRANCH=none TEST=zmake -lDEBUG configure -b -B zephyr/build_ite \ zephyr/projects/it8xxx2_evb zmake -lDEBUG configure -b -B zephyr/build_volteer \ zephyr/projects/volteer/volteer Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: Ic6a2e89a24676d6ac484a389c938ab0692971be0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2952280 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/shim/include/config_chip.h')
-rw-r--r--zephyr/shim/include/config_chip.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 1d49fb504e..512097baac 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -328,23 +328,14 @@
/* Flash settings */
#undef CONFIG_EXTERNAL_STORAGE
+#undef CONFIG_INTERNAL_STORAGE
#undef CONFIG_MAPPED_STORAGE
#undef CONFIG_FLASH_PSTATE
#undef CONFIG_FLASH_SIZE_BYTES
#ifdef CONFIG_PLATFORM_EC_FLASH_CROS
+#include "flash_chip.h"
#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)
-#else
-#define CONFIG_FLASH_SIZE_BYTES 0x0
-#endif
-/* TODO(b:176490413): use DT_PROP(DT_INST(inst, DT_DRV_COMPAT), size) ? */
-#define CONFIG_MAPPED_STORAGE_BASE 0x64000000
-#define CONFIG_FLASH_WRITE_SIZE 0x1 /* minimum write size */
-#define CONFIG_FLASH_WRITE_IDEAL_SIZE 256 /* one page size for write */
-#define CONFIG_FLASH_ERASE_SIZE 0x10000
-#define CONFIG_FLASH_BANK_SIZE CONFIG_FLASH_ERASE_SIZE
/* Internal, don't use outside this header */
#define _BINMAN_RO_PATH DT_PATH(binman, wp_ro)
@@ -355,20 +346,24 @@
#define CONFIG_EC_WRITABLE_STORAGE_OFF DT_PROP(_BINMAN_RW_PATH, offset)
#define CONFIG_EC_WRITABLE_STORAGE_SIZE DT_PROP(_BINMAN_RW_PATH, size)
-/* RO image resides at start of protected region, right after header */
-#define CONFIG_RO_STORAGE_OFF CONFIG_RO_HDR_SIZE
-
-#define CONFIG_RW_STORAGE_OFF 0
#define CONFIG_RAM_SIZE CONFIG_DATA_RAM_SIZE
#ifdef CONFIG_PLATFORM_EC_EXTERNAL_STORAGE
#define CONFIG_EXTERNAL_STORAGE
#endif
+#ifdef CONFIG_PLATFORM_EC_INTERNAL_STORAGE
+#define CONFIG_INTERNAL_STORAGE
+#endif
+
#ifdef CONFIG_PLATFORM_EC_MAPPED_STORAGE
#define CONFIG_MAPPED_STORAGE
#endif
+#ifdef CONFIG_PLATFORM_EC_FLASH_PSTATE
+#define CONFIG_FLASH_PSTATE
+#endif
+
#undef CONFIG_CMD_FLASH
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_FLASH
#define CONFIG_CMD_FLASH