summaryrefslogtreecommitdiff
path: root/baseboard/volteer/baseboard.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-08 11:22:19 -0700
committerCommit Bot <commit-bot@chromium.org>2021-01-12 21:03:51 +0000
commit9cdf0dbd2fe9c6d7ca2f3a2eae4e7c1de2a799c3 (patch)
tree8d1a9597c78254daf4a35b6e77844d863bf2c06a /baseboard/volteer/baseboard.c
parent83b1aef29fee7f353b274a388eeb5a670855e666 (diff)
downloadchrome-ec-9cdf0dbd2fe9c6d7ca2f3a2eae4e7c1de2a799c3.tar.gz
volteer: Split out baseboard CBI code into its own file
Move this out of baseboard.c so we can use it on Zephyr. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I3783211d2e566f09b476043b045b5fed734164b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617367
Diffstat (limited to 'baseboard/volteer/baseboard.c')
-rw-r--r--baseboard/volteer/baseboard.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c
index 5552809c84..3118cb9204 100644
--- a/baseboard/volteer/baseboard.c
+++ b/baseboard/volteer/baseboard.c
@@ -142,42 +142,3 @@ static void baseboard_init(void)
gpio_enable_interrupt(GPIO_EC_PROCHOT_IN_L);
}
DECLARE_HOOK(HOOK_INIT, baseboard_init, HOOK_PRIO_DEFAULT);
-
-static uint8_t board_id;
-
-uint8_t get_board_id(void)
-{
- return board_id;
-}
-
-__overridable void board_cbi_init(void)
-{
-}
-
-/*
- * Read CBI from i2c eeprom and initialize variables for board variants
- *
- * Example for configuring for a USB3 DB:
- * ectool cbi set 6 2 4 10
- */
-static void cbi_init(void)
-{
- uint32_t cbi_val;
-
- /* Board ID */
- if (cbi_get_board_version(&cbi_val) != EC_SUCCESS ||
- cbi_val > UINT8_MAX)
- CPRINTS("CBI: Read Board ID failed");
- else
- board_id = cbi_val;
-
- CPRINTS("Board ID: %d", board_id);
-
- /* FW config */
- init_fw_config();
-
- /* Allow the board project to make runtime changes based on CBI data */
- board_cbi_init();
-}
-DECLARE_HOOK(HOOK_INIT, cbi_init, HOOK_PRIO_FIRST);
-