mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
Merge "Add EC command to report board version"
This commit is contained in:
@@ -637,6 +637,19 @@ static int host_command_get_chip_info(uint8_t *data, int *resp_size)
|
||||
DECLARE_HOST_COMMAND(EC_CMD_GET_CHIP_INFO, host_command_get_chip_info);
|
||||
|
||||
|
||||
int host_command_get_board_version(uint8_t *data, int *resp_size)
|
||||
{
|
||||
struct ec_params_board_version *board_v =
|
||||
(struct ec_params_board_version *) data;
|
||||
|
||||
board_v->board_version = (uint16_t) system_get_board_version();
|
||||
|
||||
*resp_size = sizeof(struct ec_params_board_version);
|
||||
return EC_RES_SUCCESS;
|
||||
}
|
||||
DECLARE_HOST_COMMAND(EC_CMD_GET_BOARD_VERSION, host_command_get_board_version);
|
||||
|
||||
|
||||
#ifdef CONFIG_REBOOT_EC
|
||||
static void clean_busy_bits(void) {
|
||||
#ifdef CONFIG_LPC
|
||||
|
||||
@@ -239,6 +239,12 @@ struct ec_response_get_chip_info {
|
||||
char revision[32]; /* Mask version */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Get board HW version. */
|
||||
#define EC_CMD_GET_BOARD_VERSION 0x06
|
||||
struct ec_params_board_version {
|
||||
uint16_t board_version; /* A monotonously incrementing number. */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Flash commands */
|
||||
|
||||
Reference in New Issue
Block a user