[U-Boot] [PATCH 05/10] dfu: Only perform DFU board_usb_init() for TRATS

Lukasz Majewski l.majewski at samsung.com
Wed Nov 28 15:47:43 CET 2012


Hi Pantelis,

> USB initialization shouldn't happen for all the boards.
> 

The board_usb_init() follows u-boot policy, that SoC IPs (USB) are
enabled and configured just before their usage.


> Signed-off-by: Pantelis Antoniou <panto at 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
> +
In mine opinion this #ifdef shall be removed and each target board
using the DFU shall define board_usb_init() at board file. 

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



-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center | Linux Platform Group


More information about the U-Boot mailing list