diff options
author | Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> | 2022-05-27 14:24:31 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-27 22:23:06 +0000 |
commit | 4022a02a3da0b8518c73232bfc2a3caa8e4a974c (patch) | |
tree | aa4ac07b6d79db43ac987972d5f98760aa4a2743 /board/osiris | |
parent | 2b505abdbbd966f021ebbc5846a94f31da8ce142 (diff) | |
download | chrome-ec-4022a02a3da0b8518c73232bfc2a3caa8e4a974c.tar.gz |
osiris: Update FW_CONFIG field
remove usb_db_type field
BUG=b:232647819
BRANCH=none
TEST=check system boot
Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>
Change-Id: I09142c02eb9b1418740b33c2699ad0f9bb054023
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3670784
Commit-Queue: caveh jalali <caveh@chromium.org>
Reviewed-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'board/osiris')
-rw-r--r-- | board/osiris/board.c | 5 | ||||
-rw-r--r-- | board/osiris/fw_config.c | 21 | ||||
-rw-r--r-- | board/osiris/fw_config.h | 21 | ||||
-rw-r--r-- | board/osiris/usbc_config.c | 12 |
4 files changed, 3 insertions, 56 deletions
diff --git a/board/osiris/board.c b/board/osiris/board.c index 7c58e41f7a..d74e7e6088 100644 --- a/board/osiris/board.c +++ b/board/osiris/board.c @@ -30,11 +30,6 @@ #define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ## args) #define CPRINTS(format, args...) cprints(CC_CHARGER, format, ## args) -__override void board_cbi_init(void) -{ - config_usb_db_type(); -} - /* Called on AP S3 -> S0 transition */ static void board_chipset_resume(void) { diff --git a/board/osiris/fw_config.c b/board/osiris/fw_config.c index 456c295c82..6a4469163b 100644 --- a/board/osiris/fw_config.c +++ b/board/osiris/fw_config.c @@ -20,7 +20,6 @@ BUILD_ASSERT(sizeof(fw_config) == sizeof(uint32_t)); * initialized. */ static const union osiris_cbi_fw_config fw_config_defaults = { - .usb_db = DB_USB3_PS8815, .kb_bl = KEYBOARD_BACKLIGHT_ENABLED, }; @@ -33,29 +32,9 @@ void board_init_fw_config(void) CPRINTS("CBI: Read FW_CONFIG failed, using board defaults"); fw_config = fw_config_defaults; } - - if (get_board_id() == 0) { - /* - * Early boards have a zero'd out FW_CONFIG, so replace - * it with a sensible default value. If DB_USB_ABSENT2 - * was used as an alternate encoding of DB_USB_ABSENT to - * avoid the zero check, then fix it. - */ - if (fw_config.raw_value == 0) { - CPRINTS("CBI: FW_CONFIG is zero, using board defaults"); - fw_config = fw_config_defaults; - } else if (fw_config.usb_db == DB_USB_ABSENT2) { - fw_config.usb_db = DB_USB_ABSENT; - } - } } union osiris_cbi_fw_config get_fw_config(void) { return fw_config; } - -enum ec_cfg_usb_db_type ec_cfg_usb_db_type(void) -{ - return fw_config.usb_db; -} diff --git a/board/osiris/fw_config.h b/board/osiris/fw_config.h index e686726361..c10e6a99ca 100644 --- a/board/osiris/fw_config.h +++ b/board/osiris/fw_config.h @@ -14,12 +14,6 @@ * Source of truth is the project/brya/osiris/config.star configuration file. */ -enum ec_cfg_usb_db_type { - DB_USB_ABSENT = 0, - DB_USB3_PS8815 = 1, - DB_USB_ABSENT2 = 15 -}; - enum ec_cfg_keyboard_backlight_type { KEYBOARD_BACKLIGHT_DISABLED = 0, KEYBOARD_BACKLIGHT_ENABLED = 1 @@ -27,12 +21,10 @@ enum ec_cfg_keyboard_backlight_type { union osiris_cbi_fw_config { struct { - enum ec_cfg_usb_db_type usb_db : 4; - uint32_t sd_db : 2; - uint32_t lte_db : 1; enum ec_cfg_keyboard_backlight_type kb_bl : 1; - uint32_t audio : 3; - uint32_t reserved_1 : 21; + uint32_t reserved_1 : 1; + uint32_t audio : 2; + uint32_t reserved_2 : 28; }; uint32_t raw_value; }; @@ -44,11 +36,4 @@ union osiris_cbi_fw_config { */ union osiris_cbi_fw_config get_fw_config(void); -/** - * Get the USB daughter board type from FW_CONFIG. - * - * @return the USB daughter board type. - */ -enum ec_cfg_usb_db_type ec_cfg_usb_db_type(void); - #endif /* __BOARD_OSIRIS_FW_CONFIG_H_ */ diff --git a/board/osiris/usbc_config.c b/board/osiris/usbc_config.c index 21356ae3a3..9a165ecdcc 100644 --- a/board/osiris/usbc_config.c +++ b/board/osiris/usbc_config.c @@ -17,7 +17,6 @@ #include "driver/tcpm/ps8xxx_public.h" #include "driver/tcpm/tcpci.h" #include "ec_commands.h" -#include "fw_config.h" #include "gpio.h" #include "gpio_signal.h" #include "hooks.h" @@ -180,17 +179,6 @@ int board_is_vbus_too_low(int port, enum chg_ramp_vbus_state ramp_state) #endif /* CONFIG_CHARGE_RAMP_SW */ -void config_usb_db_type(void) -{ - enum ec_cfg_usb_db_type db_type = ec_cfg_usb_db_type(); - - /* - * TODO(b/180434685): implement multiple DB types - */ - - CPRINTS("Configured USB DB type number is %d", db_type); -} - void board_reset_pd_mcu(void) { /* |