diff options
-rw-r--r-- | src/ec/google/chromeec/ec.c | 34 | ||||
-rw-r--r-- | src/ec/google/chromeec/ec.h | 2 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 7546a82ee8..f1cefae4f2 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -132,6 +132,23 @@ void google_chromeec_early_init(void) hlt(); } } + +u16 google_chromeec_get_board_version(void) +{ + struct chromeec_command cmd; + struct ec_response_board_version board_v; + + cmd.cmd_code = EC_CMD_GET_BOARD_VERSION; + cmd.cmd_version = 0; + cmd.cmd_size_in = 0; + cmd.cmd_size_out = sizeof(board_v); + cmd.cmd_data_out = &board_v; + + if (google_chromeec_command(&cmd) != 0) + return 0; + + return board_v.board_version; +} #endif /* ! __SMM__ */ #ifndef __PRE_RAM__ @@ -308,23 +325,6 @@ void google_chromeec_log_events(u32 mask) #endif } -u16 google_chromeec_get_board_version(void) -{ - struct chromeec_command cmd; - struct ec_response_board_version board_v; - - cmd.cmd_code = EC_CMD_GET_BOARD_VERSION; - cmd.cmd_version = 0; - cmd.cmd_size_in = 0; - cmd.cmd_size_out = sizeof(board_v); - cmd.cmd_data_out = &board_v; - - if (google_chromeec_command(&cmd) != 0) - return 0; - - return board_v.board_version; -} - int google_chromeec_set_usb_charge_mode(u8 port_id, enum usb_charge_mode mode) { struct chromeec_command cmd; diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index f661d311a8..a037d0147d 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -33,12 +33,12 @@ int google_chromeec_set_smi_mask(u32 mask); int google_chromeec_set_wake_mask(u32 mask); u8 google_chromeec_get_event(void); int google_ec_running_ro(void); -u16 google_chromeec_get_board_version(void); void google_chromeec_init(void); #endif void google_chromeec_early_init(void); uint8_t google_chromeec_calc_checksum(const uint8_t *data, int size); +u16 google_chromeec_get_board_version(void); u32 google_chromeec_get_events_b(void); int google_chromeec_kbbacklight(int percent); void google_chromeec_post(u8 postcode); |