summaryrefslogtreecommitdiff
path: root/chip/ish/config_chip.h
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 /chip/ish/config_chip.h
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 'chip/ish/config_chip.h')
-rw-r--r--chip/ish/config_chip.h52
1 files changed, 20 insertions, 32 deletions
diff --git a/chip/ish/config_chip.h b/chip/ish/config_chip.h
index 74432baca1..24cd558f6c 100644
--- a/chip/ish/config_chip.h
+++ b/chip/ish/config_chip.h
@@ -26,45 +26,33 @@
/* this macro causes 'pause' and reduces loop counts inside loop. */
#define CPU_RELAX() asm volatile("rep; nop" ::: "memory")
-/****************************************************************************/
-/* Memory mapping */
-/****************************************************************************/
+/*****************************************************************************/
+/* Memory Layout */
+/*****************************************************************************/
-/* Define our SRAM layout. */
-#define CONFIG_ISH_SRAM_BASE_START 0xFF000000
-#define CONFIG_ISH_SRAM_BASE_END 0xFF0A0000
-#define CONFIG_ISH_SRAM_SIZE (CONFIG_ISH_SRAM_BASE_END - \
- CONFIG_ISH_SRAM_BASE_START)
+#define CONFIG_RAM_BASE 0xFF000000
+#define CONFIG_RAM_SIZE 0x000A0000
+#define CONFIG_RAM_BANK_SIZE 0x00008000
#if defined(CHIP_FAMILY_ISH3)
-/* on ISH3, there is no seprated aon memory, using last 4KB of normal memory
- * without poweroff
- */
-#define CONFIG_ISH_AON_SRAM_BASE_START 0xFF09F000
-#define CONFIG_ISH_AON_SRAM_BASE_END 0xFF0A0000
+/* On ISH3, there is no separate AON memory; use last 4KB of SRAM */
+#define CONFIG_AON_RAM_BASE 0xFF09F000
+#define CONFIG_AON_RAM_SIZE 0x00001000
#elif defined(CHIP_FAMILY_ISH4)
-#define CONFIG_ISH_AON_SRAM_BASE_START 0xFF800000
-#define CONFIG_ISH_AON_SRAM_BASE_END 0xFF801000
+#define CONFIG_AON_RAM_BASE 0xFF800000
+#define CONFIG_AON_RAM_SIZE 0x00001000
+#elif defined(CHIP_FAMILY_ISH5)
+#define CONFIG_AON_RAM_BASE 0xFF800000
+#define CONFIG_AON_RAM_SIZE 0x00002000
#else
-#define CONFIG_ISH_AON_SRAM_BASE_START 0xFF800000
-#define CONFIG_ISH_AON_SRAM_BASE_END 0xFF802000
+#error "CHIP_FAMILY_ISH(3|4|5) must be defined"
#endif
-#define CONFIG_ISH_AON_SRAM_SIZE (CONFIG_ISH_AON_SRAM_BASE_END - \
- CONFIG_ISH_AON_SRAM_BASE_START)
-
-/* reserve for readonly use in the last of AON memory */
-#define CONFIG_ISH_AON_SRAM_ROM_SIZE 0x80
-#define CONFIG_ISH_AON_SRAM_ROM_START (CONFIG_ISH_AON_SRAM_BASE_END - \
- CONFIG_ISH_AON_SRAM_ROM_SIZE)
-
-#define CONFIG_ISH_SRAM_BANK_SIZE 0x8000
-#define CONFIG_ISH_SRAM_BANKS (CONFIG_ISH_SRAM_SIZE / \
- CONFIG_ISH_SRAM_BANK_SIZE)
-
-/* Required for panic_output */
-#define CONFIG_RAM_SIZE CONFIG_ISH_SRAM_SIZE
-#define CONFIG_RAM_BASE CONFIG_ISH_SRAM_BASE_START
+/* The end of the AON memory is reserved for read-only use */
+#define CONFIG_AON_ROM_SIZE 0x80
+#define CONFIG_AON_ROM_BASE (CONFIG_AON_RAM_BASE \
+ + CONFIG_AON_RAM_SIZE \
+ - CONFIG_AON_ROM_SIZE)
/* System stack size */
#define CONFIG_STACK_SIZE 1024