Skip to content
Snippets Groups Projects
Commit 5899674b authored by Lin Fuzhen's avatar Lin Fuzhen
Browse files

ENGR00254091 fastboot: add reboot command for quick fastboot


Quick fastboot just support download and flash commands.
Add reboot command support when launch fastboot by "fastboot q"

Signed-off-by: default avatarLin Fuzhen <fuzhen.lin@freescale.com>
parent 18fdfe69
No related branches found
No related tags found
No related merge requests found
/*
* Copyright (C) 2010-2012 Freescale Semiconductor, Inc.
* Copyright (C) 2010-2013 Freescale Semiconductor, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -877,6 +877,14 @@ static void fastboot_cmd_handler(u32 len, u8 *recvbuf)
}
g_fastboot_datalen = 0;
fastboot_status = FASTBOOT_STS_CMD;
} else if (memcmp(recvbuf, "reboot", 6) == 0) {
sprintf((char *)g_fastboot_sendbuf, "OKAY");
udc_send_data(g_fastboot_inep_index, g_fastboot_sendbuf,
4, NULL);
udelay(100000); /* 1 sec */
do_reset(NULL, 0, 0, NULL);
} else {
DBG_ERR("Not support command:%s\n", recvbuf);
sprintf((char *)g_fastboot_sendbuf, "FAIL");
......@@ -898,7 +906,7 @@ static struct cmd_fastboot_interface interface = {
};
/*
* fastboot main process, only support 'download', 'flash' command now
* fastboot main process, only support 'download', 'flash' 'reboot' command now
*
* @debug control debug level, support three level now,
* 0(normal), 1(debug), 2(info), default is 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment