diff options
author | Lin Fuzhen <fuzhen.lin@freescale.com> | 2013-03-19 17:39:11 +0800 |
---|---|---|
committer | Lin Fuzhen <fuzhen.lin@freescale.com> | 2013-03-20 11:06:49 +0800 |
commit | cb58e57c28ecb9e505a1a9d17936708d37b579e9 (patch) | |
tree | d97165beb63190613e4399d0b3e71fff666dc1a9 | |
parent | 82a4725015d9e0e31544c0ab853ef8f2889c53f2 (diff) | |
download | u-boot-imx-cb58e57c28ecb9e505a1a9d17936708d37b579e9.zip u-boot-imx-cb58e57c28ecb9e505a1a9d17936708d37b579e9.tar.gz u-boot-imx-cb58e57c28ecb9e505a1a9d17936708d37b579e9.tar.bz2 |
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: Lin Fuzhen <fuzhen.lin@freescale.com>
-rw-r--r-- | drivers/fastboot/fastboot.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/fastboot/fastboot.c b/drivers/fastboot/fastboot.c index 9594cad..d77d746 100644 --- a/drivers/fastboot/fastboot.c +++ b/drivers/fastboot/fastboot.c @@ -1,5 +1,5 @@ /* - * 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 |