summaryrefslogtreecommitdiff
path: root/baseboard/brya
diff options
context:
space:
mode:
authorRajesh Kumar <rajesh3.kumar@intel.com>2021-11-11 16:01:00 -0800
committerCommit Bot <commit-bot@chromium.org>2021-11-16 00:26:15 +0000
commit57abb1f109899f7a0a06397a91b956e0adf66e5e (patch)
tree70d7c458b5bea511ca530a250d73a65fa66176a2 /baseboard/brya
parent95c67ba1b0d754861bde6c113fe7ebcdabb99d2c (diff)
downloadchrome-ec-57abb1f109899f7a0a06397a91b956e0adf66e5e.tar.gz
brya: Split out baseboard CBI and USB code into its own file
Move this out of baord.c so we can use it on Zephyr. BUG=b:202701454 BRANCH=none TEST=make BOARD=brya Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I9f746d3ec3659e972c3e0665dbd68b92b1985104 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3276907 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'baseboard/brya')
-rw-r--r--baseboard/brya/baseboard.h19
-rw-r--r--baseboard/brya/cbi.h32
2 files changed, 33 insertions, 18 deletions
diff --git a/baseboard/brya/baseboard.h b/baseboard/brya/baseboard.h
index 5b109df62b..9d12792dbe 100644
--- a/baseboard/brya/baseboard.h
+++ b/baseboard/brya/baseboard.h
@@ -237,23 +237,11 @@
#include <stdbool.h>
#include <stdint.h>
+#include "cbi.h"
#include "common.h"
#include "baseboard_usbc_config.h"
#include "extpower.h"
-/**
- * Configure run-time data structures and operation based on CBI data. This
- * typically includes customization for changes in the BOARD_VERSION and
- * FW_CONFIG fields in CBI. This routine is called from the baseboard after
- * the CBI data has been initialized.
- */
-__override_proto void board_cbi_init(void);
-
-/**
- * Initialize the FW_CONFIG from CBI data. If the CBI data is not valid, set the
- * FW_CONFIG to the board specific defaults.
- */
-__override_proto void board_init_fw_config(void);
/*
* Check battery disconnect state.
@@ -262,11 +250,6 @@ __override_proto void board_init_fw_config(void);
*/
__override_proto bool board_battery_is_initialized(void);
-/*
- * Return the board revision number.
- */
-uint8_t get_board_id(void);
-
#endif /* !__ASSEMBLER__ */
#endif /* __CROS_EC_BASEBOARD_H */
diff --git a/baseboard/brya/cbi.h b/baseboard/brya/cbi.h
new file mode 100644
index 0000000000..10ecfd87e7
--- /dev/null
+++ b/baseboard/brya/cbi.h
@@ -0,0 +1,32 @@
+/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* brya family-specific CBI functions, shared with Zephyr */
+
+#ifndef __CROS_EC_BASEBOARD_CBI_H
+#define __CROS_EC_BASEBOARD_CBI_H
+
+#include "common.h"
+
+/*
+ * Return the board revision number.
+ */
+uint8_t get_board_id(void);
+
+/**
+ * Configure run-time data structures and operation based on CBI data. This
+ * typically includes customization for changes in the BOARD_VERSION and
+ * FW_CONFIG fields in CBI. This routine is called from the baseboard after
+ * the CBI data has been initialized.
+ */
+__override_proto void board_cbi_init(void);
+
+/**
+ * Initialize the FW_CONFIG from CBI data. If the CBI data is not valid, set the
+ * FW_CONFIG to the board specific defaults.
+ */
+__override_proto void board_init_fw_config(void);
+
+#endif /* __CROS_EC_BASEBOARD_CBI_H */