From da078cf7b015aee4b87b3a3d941b2688830c9f28 Mon Sep 17 00:00:00 2001 From: Ryan Lattrel Date: Tue, 13 Nov 2018 14:02:21 -0600 Subject: [PATCH] mmi_muc_uart: add recovery bootmode Add recovery boot mode enum to the bootmode message. Change-Id: I75a62b17e69358cac14560dd944f5a298bc04993 Signed-off-by: Ryan Lattrel Reviewed-on: https://gerrit.mot.com/1268597 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Kenneth Kessler Submit-Approved: Jira Key --- drivers/mmi_muc_uart/muc_protocol.h | 2 +- drivers/mmi_muc_uart/muc_uart.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmi_muc_uart/muc_protocol.h b/drivers/mmi_muc_uart/muc_protocol.h index cc35f7f456ff..f0e04c9876b4 100644 --- a/drivers/mmi_muc_uart/muc_protocol.h +++ b/drivers/mmi_muc_uart/muc_protocol.h @@ -61,7 +61,7 @@ struct mmi_uart_pb_hdr_t { #define MUC_FIRMWARE_NAME "muc_firmware.zip" #define MUC_FW_PAYLOAD_SIZE 1022 -enum { NORMAL = 0, BP_TOOLS, FACTORY, QCOM, }; +enum { NORMAL = 0, BP_TOOLS, FACTORY, QCOM, RECOVERY }; struct boot_mode_t { uint8_t boot_mode; /* androidboot.mode */ uint32_t hwid; /* androidboot.hwrev */ diff --git a/drivers/mmi_muc_uart/muc_uart.c b/drivers/mmi_muc_uart/muc_uart.c index cb8c426bd9f0..96b3caf9b5fb 100644 --- a/drivers/mmi_muc_uart/muc_uart.c +++ b/drivers/mmi_muc_uart/muc_uart.c @@ -583,6 +583,8 @@ static int muc_uart_send_bootmode(struct mod_muc_data_t *mm_data) bootmode.boot_mode = QCOM; } else if (strncmp(bi_bootmode(), "bp-tools", strlen("bp-tools")) == 0) { bootmode.boot_mode = BP_TOOLS; + } else if (strncmp(bi_bootmode(), "recovery", strlen("recovery")) == 0) { + bootmode.boot_mode = RECOVERY; } else { /* TODO defaults to normal. Should we have unknown/other? */ bootmode.boot_mode = NORMAL;