summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-05-01 14:08:33 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-05-04 03:17:25 -0700
commitacb893a320f0398d25083a9ea102329c619845ab (patch)
tree36b90b5b5224595b63b0c402aba55e361a0d620f /include
parenta87deb3376ca76e76c734f3204a776e828011b5b (diff)
downloadchrome-ec-acb893a320f0398d25083a9ea102329c619845ab.tar.gz
ish: ensure all CONFIGs are undef'ed in include/config.h
Some people have been bypassing the pre-submit checks: confs=($(grep -Eor "\bCONFIG_[A-Z_]*" chip/ish/config_chip.h | sort | uniq)) for opt in "${confs[@]}"; do grep "$opt" include/config.h >/dev/null || echo "$opt is not defined in include/config.h!" done >>> CONFIG_ISH_AON_SRAM_BASE_END is not defined in include/config.h! CONFIG_ISH_AON_SRAM_BASE_START is not defined in include/config.h! CONFIG_ISH_AON_SRAM_ROM_SIZE is not defined in include/config.h! CONFIG_ISH_AON_SRAM_ROM_START is not defined in include/config.h! CONFIG_ISH_AON_SRAM_SIZE is not defined in include/config.h! CONFIG_ISH_SRAM_BANKS is not defined in include/config.h! CONFIG_ISH_SRAM_BANK_SIZE is not defined in include/config.h! CONFIG_ISH_SRAM_BASE_END is not defined in include/config.h! CONFIG_ISH_SRAM_BASE_START is not defined in include/config.h! CONFIG_ISH_SRAM_SIZE is not defined in include/config.h! This is not good! This commit renames each of these to an existing option defined in include/config.h, or undefs the relevant option in include/config.h. BUG=b:131749055 BRANCH=none TEST=make buildall -j TEST=script above reports no options which weren't defined TEST=arcada_ish, (specifically power management, which was greatly affected by this commit) functions as normal Change-Id: Idfbd1105880174b5e160c47c4ec1d88c352d6bc6 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1592420 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 1fc3330cfb..2a62f4f665 100644
--- a/include/config.h
+++ b/include/config.h
@@ -83,6 +83,19 @@
#undef CONFIG_ACCELGYRO_LSM6DSM
#undef CONFIG_ACCELGYRO_LSM6DSO
+/*
+ * Some chips have a portion of memory which will remain powered even
+ * during a reset. This is called Always-On, or AON memory, and
+ * typically has a separate firmware to manage the memory. These
+ * values can be used to configure the RAM layout for Always-On.
+ *
+ * See chip/ish/ for an example implementation.
+ */
+#undef CONFIG_AON_RAM_BASE
+#undef CONFIG_AON_RAM_SIZE
+#undef CONFIG_AON_ROM_BASE
+#undef CONFIG_AON_ROM_SIZE
+
/* Add sensorhub function for LSM6DSM, required if 2nd device attached. */
#undef CONFIG_SENSORHUB_LSM6DSM
@@ -2764,6 +2777,15 @@
/* Support Real-Time Clock (RTC) */
#undef CONFIG_RTC
+/* Size of each RAM bank in chip, default is CONFIG_RAM_SIZE */
+#undef CONFIG_RAM_BANK_SIZE
+
+/*
+ * Number of RAM banks in chip, default is
+ * CONFIG_RAM_SIZE / CONFIG_RAM_BANK_SIZE
+ */
+#undef CONFIG_RAM_BANKS
+
/* Base address of RAM for the chip */
#undef CONFIG_RAM_BASE
@@ -4039,6 +4061,16 @@
#define CONFIG_DATA_RAM_SIZE CONFIG_RAM_SIZE
#endif
+/* Automatic configuration of RAM banks **************************************/
+/* Assume one RAM bank if not specified, auto-compute number of banks */
+#ifndef CONFIG_RAM_BANK_SIZE
+#define CONFIG_RAM_BANK_SIZE CONFIG_RAM_SIZE
+#endif
+
+#ifndef CONFIG_RAM_BANKS
+#define CONFIG_RAM_BANKS (CONFIG_RAM_SIZE / CONFIG_RAM_BANK_SIZE)
+#endif
+
/******************************************************************************/
/*
* Set minimum shared memory size, unless it is defined in board file.