summaryrefslogtreecommitdiff
path: root/chip/g/upgrade_fw.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/g/upgrade_fw.c')
-rw-r--r--chip/g/upgrade_fw.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/chip/g/upgrade_fw.c b/chip/g/upgrade_fw.c
index a419e3a229..b1da99d7a7 100644
--- a/chip/g/upgrade_fw.c
+++ b/chip/g/upgrade_fw.c
@@ -32,6 +32,8 @@ struct {
uint32_t rw_top_offset;
} valid_sections;
+static int upgrade_done;
+
/* Pick sections where updates can go to based on current code addresses. */
static void set_valid_sections(void)
{
@@ -263,3 +265,13 @@ void fw_upgrade_command_handler(void *body,
*error_code = UPGRADE_SUCCESS;
}
+
+void fw_upgrade_complete(void)
+{
+ upgrade_done = 1;
+}
+
+int fw_upgraded(void)
+{
+ return upgrade_done;
+}