diff options
author | Lukasz Majewski <l.majewski@samsung.com> | 2013-07-18 13:19:14 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2013-07-29 23:01:33 +0200 |
commit | 6bed7ce569fc409843ff2537937ea1b5fd0f694d (patch) | |
tree | bb17efd44c3e2f69ae3dd0f0a0a6bd31a06a2204 /drivers/dfu | |
parent | 6dd30af0fa5c2f509f6f789789151268bdfcde0c (diff) | |
download | u-boot-6bed7ce569fc409843ff2537937ea1b5fd0f694d.tar.gz u-boot-6bed7ce569fc409843ff2537937ea1b5fd0f694d.tar.bz2 u-boot-6bed7ce569fc409843ff2537937ea1b5fd0f694d.zip |
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/dfu')
-rw-r--r-- | drivers/dfu/dfu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index b8870ecf73..d73d510391 100644 --- a/drivers/dfu/dfu.c +++ b/drivers/dfu/dfu.c @@ -16,9 +16,20 @@ #include <linux/list.h> #include <linux/compiler.h> +static bool dfu_reset_request; static LIST_HEAD(dfu_list); static int dfu_alt_num; +bool dfu_reset(void) +{ + return dfu_reset_request; +} + +void dfu_trigger_reset() +{ + dfu_reset_request = true; +} + static int dfu_find_alt_num(const char *s) { int i = 0; |