summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Marheine <pmarheine@chromium.org>2021-12-29 13:50:11 +1100
committerCommit Bot <commit-bot@chromium.org>2021-12-30 00:43:28 +0000
commit074ed1a2eb2eca4c3365e42c537145ec2b6f33bc (patch)
tree1080f7bf381e1d6fdad6fad10773f488a7992b89
parentf4658ca0e26beeaa22b5667463ce820ca0ddf49b (diff)
downloadchrome-ec-074ed1a2eb2eca4c3365e42c537145ec2b6f33bc.tar.gz
zephyr/usbc: require MATH_UTIL to enable USB-C
The TCPM implementation depends on the bitmask_uint64 function in multiple locations, so it should depend on the option that causes that function to be built. Since MATH_UTIL should have no effect on code size in most configurations (especially with LTO enabled), its default is set to y in order to simplify the configuration. BUG=b:211693800 TEST=zmake testall; math_util is now built when PLATFORM_EC_USBC is enabled and MATH_UTIL is unconfigured BRANCH=None Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: If3b18d43bd2e2cb21b22f57f298f942eadc2a963 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3360316 Reviewed-by: Aaron Massey <aaronmassey@google.com>
-rw-r--r--zephyr/Kconfig1
-rw-r--r--zephyr/Kconfig.usbc1
2 files changed, 2 insertions, 0 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index 02e96bf1d2..4dde997406 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -890,6 +890,7 @@ config PLATFORM_EC_AMD_STT
config PLATFORM_EC_MATH_UTIL
bool "Math utility"
+ default y
help
Math utilities including bitmask manipulation, division rounding,
trigonometric function, etc.
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc
index 22bdb9c632..3d2b13829f 100644
--- a/zephyr/Kconfig.usbc
+++ b/zephyr/Kconfig.usbc
@@ -33,6 +33,7 @@ config PLATFORM_EC_USB_PORT_POWER_DUMB_CUSTOM_HOOK
menuconfig PLATFORM_EC_USBC
bool "USB Type-C"
default y if PLATFORM_EC_BATTERY
+ depends on PLATFORM_EC_MATH_UTIL
help
Enable this to support various USB Type-C features chosen by the
options below. USB-C is widely used on modern Chromebooks and the EC's