summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2021-07-02 16:47:58 -0700
committerCommit Bot <commit-bot@chromium.org>2021-07-09 21:10:26 +0000
commit2c37de83e78e98820ce2a7473932afdec029d2a6 (patch)
treec4c43bcced79adabb1cf6b785633f122b64e8329 /include/config.h
parent107738848df07a66ae4d7c5af8f73a98ca555224 (diff)
downloadchrome-ec-2c37de83e78e98820ce2a7473932afdec029d2a6.tar.gz
system: Clean up system_get_board_version()
Refactor system_get_board_version() a bit so that we can remove CONFIG_BOARD_VERSION_CUSTOM and CONFIG_BOARD_VERSION from config.h. BRANCH=None BUG=b:186264627 TEST=make buildall -j TEST=zmake testall Cq-Depend: chromium:3015243 Change-Id: Id5ab809493c297b7d330ea13dcd6934ec00042a6 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3004112 Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h25
1 files changed, 5 insertions, 20 deletions
diff --git a/include/config.h b/include/config.h
index 6405a0b06d..8daf9025f6 100644
--- a/include/config.h
+++ b/include/config.h
@@ -733,16 +733,8 @@
*/
#undef CONFIG_BOARD_PRE_INIT
-/*
- * EC has the notion of board version either through resistors or EEPROM.
- * The common CONFIG_BOARD_VERSION is defined automatically when one of the
- * specific options is used.
- */
-#undef CONFIG_BOARD_VERSION
/* The board version comes from Cros Board Info within EEPROM. */
#undef CONFIG_BOARD_VERSION_CBI
-/* The board version function is defined in board code. */
-#undef CONFIG_BOARD_VERSION_CUSTOM
/*
* The board version is encoded with 3 GPIO signals where GPIO_BOARD_VERSION1
* is the LSB.
@@ -5526,18 +5518,6 @@
/******************************************************************************/
/*
- * Automatically define common CONFIG_BOARD_VERSION if any specific option is
- * used.
- */
-
-#if defined(CONFIG_BOARD_VERSION_CBI) || \
- defined(CONFIG_BOARD_VERSION_CUSTOM) || \
- defined(CONFIG_BOARD_VERSION_GPIO)
-#define CONFIG_BOARD_VERSION
-#endif
-
-/******************************************************************************/
-/*
* Thermal throttling AP must have temperature sensor enabled to get
* the temperature readings.
*/
@@ -6376,6 +6356,11 @@
"when CONFIG_SYSTEM_UNLOCK is also enabled."
#endif /* CONFIG_BYPASS_CBI_EEPROM_WP_CHECK && !CONFIG_SYSTEM_UNLOCK */
+#if defined(CONFIG_BOARD_VERSION_CBI) && defined(CONFIG_BOARD_VERSION_GPIO)
+#error "CONFIG_BOARD_VERSION_CBI and CONFIG_BOARD_VERSION_GPIO " \
+ "are mutually exclusive. "
+#endif /* CONFIG_BOARD_VERSION_CBI && CONFIG_BOARD_VERSION_GPIO */
+
#if !defined(CONFIG_ZEPHYR) && !defined(CONFIG_ACCELGYRO_ICM_COMM_SPI) && \
!defined(CONFIG_ACCELGYRO_ICM_COMM_I2C)
#ifdef I2C_PORT_ACCEL