summaryrefslogtreecommitdiff
path: root/zephyr
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 /zephyr
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 'zephyr')
-rw-r--r--zephyr/Kconfig11
-rw-r--r--zephyr/Kconfig.board_version17
-rw-r--r--zephyr/projects/asurada/hayato/prj.conf3
-rw-r--r--zephyr/projects/brya/brya/prj.conf3
-rw-r--r--zephyr/projects/it8xxx2_evb/prj.conf3
-rw-r--r--zephyr/projects/kohaku/prj.conf3
-rw-r--r--zephyr/projects/trogdor/lazor/prj.conf1
-rw-r--r--zephyr/projects/volteer/delbin/prj.conf3
-rw-r--r--zephyr/shim/include/config_chip.h5
9 files changed, 13 insertions, 36 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index 5c01a09314..ef41309d28 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -115,17 +115,6 @@ config PLATFORM_EC_BOARD_RESET_AFTER_POWER_ON
the EC starts up, performs some amount of processing and then gets a
reset that it is not expecting.
-config PLATFORM_EC_BOARD_VERSION
- bool "Support the notion of board version"
- default y
- help
- Enable support for a board version, used to distinguish different
- revisions of the same base design. Each board goes through a number
- of development phases on the way to launch. Sometimes different boards
- have different quirks and this version number can provide a way for
- the EC to handle several board versions, avoiding the problem of
- having to flash different images to different board versions.
-
config PLATFORM_EC_BRINGUP
bool "Enable early bringup debugging features"
help
diff --git a/zephyr/Kconfig.board_version b/zephyr/Kconfig.board_version
index 500dae21c3..e24957764d 100644
--- a/zephyr/Kconfig.board_version
+++ b/zephyr/Kconfig.board_version
@@ -2,10 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-if PLATFORM_EC_BOARD_VERSION
-
-choice "Version source"
- prompt "Select the source of the version number"
+choice PLATFORM_EC_BOARD_VERSION_SOURCE
+ prompt "Select the source of the board version number"
+ optional
help
This allow selection of the source of the board version number
information. Several options are available, but BOARD_VERSION_CBI is
@@ -32,14 +31,4 @@ config PLATFORM_EC_BOARD_VERSION_GPIO
The GPIOs should have external pull-up/pull-down resistors installed
at the factory to select the correct value.
-config PLATFORM_EC_BOARD_VERSION_CUSTOM
- bool "Custom board-specific algortihm"
- help
- Choose this if none of the standard methods is available and you must
- perform special logic to find the board version. If this is chosen,
- then the system code will call board_get_version() to find out the
- version, so you should implement this function in your board code.
-
endchoice
-
-endif # PLATFORM_EC_BOARD_VERSION
diff --git a/zephyr/projects/asurada/hayato/prj.conf b/zephyr/projects/asurada/hayato/prj.conf
index 23b91e6650..80218fdaaf 100644
--- a/zephyr/projects/asurada/hayato/prj.conf
+++ b/zephyr/projects/asurada/hayato/prj.conf
@@ -32,7 +32,8 @@ CONFIG_PLATFORM_EC_ACCELGYRO_BMI_COMM_I2C=y
# TODO(b/180980668): bring these features up
CONFIG_LTO=n
CONFIG_PLATFORM_EC_BACKLIGHT_LID=n
-CONFIG_PLATFORM_EC_BOARD_VERSION=n
+CONFIG_PLATFORM_EC_BOARD_VERSION_CBI=n
+CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO=n
CONFIG_PLATFORM_EC_CONSOLE_CMD_SYSINFO=n
CONFIG_PLATFORM_EC_HOSTCMD=y
CONFIG_PLATFORM_EC_SWITCH=n
diff --git a/zephyr/projects/brya/brya/prj.conf b/zephyr/projects/brya/brya/prj.conf
index f4269f2756..6edeedb6f6 100644
--- a/zephyr/projects/brya/brya/prj.conf
+++ b/zephyr/projects/brya/brya/prj.conf
@@ -39,4 +39,5 @@ CONFIG_PLATFORM_EC_WORKAROUND_FLASH_DOWNLOAD_API=y
# TODO(b/188605676): bring these features up
CONFIG_PLATFORM_EC_ADC=n
CONFIG_PLATFORM_EC_BACKLIGHT_LID=n
-CONFIG_PLATFORM_EC_BOARD_VERSION=n
+CONFIG_PLATFORM_EC_BOARD_VERSION_CBI=n
+CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO=n
diff --git a/zephyr/projects/it8xxx2_evb/prj.conf b/zephyr/projects/it8xxx2_evb/prj.conf
index 2f975a6b86..b41f689c58 100644
--- a/zephyr/projects/it8xxx2_evb/prj.conf
+++ b/zephyr/projects/it8xxx2_evb/prj.conf
@@ -31,7 +31,8 @@ CONFIG_LOG=y
# TODO(b:185202623): bring these features up
CONFIG_PLATFORM_EC_BACKLIGHT_LID=n
-CONFIG_PLATFORM_EC_BOARD_VERSION=n
+CONFIG_PLATFORM_EC_BOARD_VERSION_CBI=n
+CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO=n
CONFIG_PLATFORM_EC_KEYBOARD=n
CONFIG_CROS_KB_RAW_ITE=n
CONFIG_PLATFORM_EC_SWITCH=n
diff --git a/zephyr/projects/kohaku/prj.conf b/zephyr/projects/kohaku/prj.conf
index 23423c63cb..28c3a4a550 100644
--- a/zephyr/projects/kohaku/prj.conf
+++ b/zephyr/projects/kohaku/prj.conf
@@ -32,4 +32,5 @@ CONFIG_CROS_KB_RAW_NPCX=n
# This is not yet supported
CONFIG_PLATFORM_EC_ADC=n
-CONFIG_PLATFORM_EC_BOARD_VERSION=n
+CONFIG_PLATFORM_EC_BOARD_VERSION_CBI=n
+CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO=n
diff --git a/zephyr/projects/trogdor/lazor/prj.conf b/zephyr/projects/trogdor/lazor/prj.conf
index 1682fdf686..3d16cdb46b 100644
--- a/zephyr/projects/trogdor/lazor/prj.conf
+++ b/zephyr/projects/trogdor/lazor/prj.conf
@@ -27,7 +27,6 @@ CONFIG_PLATFORM_EC_PWM_KBLIGHT=y
CONFIG_AP_ARM_QUALCOMM_SC7180=y
# Board version is selected over GPIO board ID pins.
-CONFIG_PLATFORM_EC_BOARD_VERSION=y
CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO=y
# LN9310 Switchcap
diff --git a/zephyr/projects/volteer/delbin/prj.conf b/zephyr/projects/volteer/delbin/prj.conf
index 12dbc775c8..8f85b5dabc 100644
--- a/zephyr/projects/volteer/delbin/prj.conf
+++ b/zephyr/projects/volteer/delbin/prj.conf
@@ -27,7 +27,8 @@ CONFIG_PLATFORM_EC_POWERSEQ_RTC_RESET=y
CONFIG_PLATFORM_EC_THROTTLE_AP=y
# TODO(b/180410072): bringup these features
-CONFIG_PLATFORM_EC_BOARD_VERSION=n
+CONFIG_PLATFORM_EC_BOARD_VERSION_CBI=n
+CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO=n
CONFIG_PLATFORM_EC_VBOOT_HASH=n
CONFIG_PLATFORM_EC_VSTORE=n
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 672168bebf..70b00b86d8 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -1399,11 +1399,6 @@
#define CONFIG_BOARD_VERSION_GPIO
#endif
-#undef CONFIG_BOARD_VERSION_CUSTOM
-#ifdef CONFIG_PLATFORM_EC_BOARD_VERSION_CUSTOM
-#define CONFIG_BOARD_VERSION_CUSTOM
-#endif
-
#undef CONFIG_CBI_EEPROM
#ifdef CONFIG_PLATFORM_EC_CBI_EEPROM
#define CONFIG_CBI_EEPROM