summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorLukasz Majewski <l.majewski@samsung.com>2013-07-18 13:19:14 +0200
committerMarek Vasut <marex@denx.de>2013-07-29 23:01:33 +0200
commit6bed7ce569fc409843ff2537937ea1b5fd0f694d (patch)
treebb17efd44c3e2f69ae3dd0f0a0a6bd31a06a2204 /drivers/usb
parent6dd30af0fa5c2f509f6f789789151268bdfcde0c (diff)
downloadu-boot-imx-6bed7ce569fc409843ff2537937ea1b5fd0f694d.zip
u-boot-imx-6bed7ce569fc409843ff2537937ea1b5fd0f694d.tar.gz
u-boot-imx-6bed7ce569fc409843ff2537937ea1b5fd0f694d.tar.bz2
dfu: Implementation of target reset after communication with dfu-util's -R switch
This patch extends dfu code to support transmission with -R switch specified at dfu-util. When -R is specified, the extra USB_REQ_DFU_DETACH request is sent after successful data transmission. Then dfu resources are released and reset command is issued. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/f_dfu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
index 5321a68..37d04a1 100644
--- a/drivers/usb/gadget/f_dfu.c
+++ b/drivers/usb/gadget/f_dfu.c
@@ -312,6 +312,8 @@ static int state_dfu_idle(struct f_dfu *f_dfu,
DFU_STATE_dfuMANIFEST_WAIT_RST;
to_runtime_mode(f_dfu);
f_dfu->dfu_state = DFU_STATE_appIDLE;
+
+ dfu_trigger_reset();
break;
default:
f_dfu->dfu_state = DFU_STATE_dfuERROR;