summaryrefslogtreecommitdiff
path: root/zephyr/shim
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-05-09 10:51:12 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-09 22:29:27 +0000
commit1c5cf0545bafed8317025d903bccb8a4ac498bcf (patch)
tree46bbed87517c679f457706dd487fc7b21ba41e41 /zephyr/shim
parent24d911de09145dcb98644e811b1cdcbf1d3f1e85 (diff)
downloadchrome-ec-1c5cf0545bafed8317025d903bccb8a4ac498bcf.tar.gz
charger: Add a way to disable debugging at build time
Add a way to disable some debugging related to the chgstate command. It is a small, but enough to reclaim 70 bytes for damu. Use functions to avoid needing #ifdefs in the main body of the code. Convert the value to a bool while we are here. BUG=b:218332694 TEST=build on brya and see that the feature is still enabled $ grep CONFIG_CHARGE_DEBUG build/brya/.config CONFIG_CHARGE_DEBUG=y Check damu is the same as before: *** 12 bytes in flash and 10908 bytes in RAM still available on damu RO **** Change-Id: I07d2453aa74ab53a29275bba76cd2e8003c5dc14 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4518028 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/shim')
-rw-r--r--zephyr/shim/include/config_chip.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 153b150293..132494d5f4 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -1153,6 +1153,11 @@ extern char mock_jump_data[CONFIG_PLATFORM_EC_PRESERVED_END_OF_RAM_SIZE];
#define CONFIG_CHARGE_STATE_DEBUG
#endif
+#undef CONFIG_CHARGE_DEBUG
+#ifdef CONFIG_PLATFORM_EC_CHARGE_DEBUG
+#define CONFIG_CHARGE_DEBUG
+#endif
+
#undef CONFIG_CMD_PWR_AVG
#ifdef CONFIG_PLATFORM_EC_CMD_PWR_AVG
#define CONFIG_CMD_PWR_AVG