Patchwork [U-Boot,v3,4/9] dfu: Only perform DFU board_usb_init() for TRATS

login
register
mail settings
Submitter Pantelis Antoniou
Date Nov. 30, 2012, 6:01 p.m.
Message ID <1354298472-3605-5-git-send-email-panto@antoniou-consulting.com>
Download mbox | patch
Permalink /patch/203015/
State Awaiting Upstream
Delegated to: Marek Vasut
Headers show

Comments

Pantelis Antoniou - Nov. 30, 2012, 6:01 p.m.
USB initialization shouldn't happen for all the boards.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
---
 common/cmd_dfu.c | 3 +++
 1 file changed, 3 insertions(+)
Marek Vasut - Dec. 1, 2012, 5:31 a.m.
Dear Pantelis Antoniou,

> USB initialization shouldn't happen for all the boards.
> 
> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
> ---
>  common/cmd_dfu.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c
> index 01d6b3a..327c738 100644
> --- a/common/cmd_dfu.c
> +++ b/common/cmd_dfu.c
> @@ -55,7 +55,10 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc,
> char * const argv[]) goto done;
>  	}
> 
> +#ifdef CONFIG_TRATS
>  	board_usb_init();
> +#endif
> +

Can this "board_usb_init()" _please_ be renamed?

>  	g_dnl_register(s);
>  	while (1) {
>  		if (ctrlc())

Best regards,
Marek Vasut

Patch

diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c
index 01d6b3a..327c738 100644
--- a/common/cmd_dfu.c
+++ b/common/cmd_dfu.c
@@ -55,7 +55,10 @@  static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		goto done;
 	}
 
+#ifdef CONFIG_TRATS
 	board_usb_init();
+#endif
+
 	g_dnl_register(s);
 	while (1) {
 		if (ctrlc())