[U-Boot] [PATCH v3] usb: new board-specific USB init interface

Marek Vasut marex at denx.de
Thu Sep 5 17:50:20 CEST 2013


Dear Mateusz Zalega,

> This commit unifies board-specific USB initialization implementations
> under one symbol (usb_board_init), declaration of which is available in
> usb.h.
> 
> Signed-off-by: Mateusz Zalega <m.zalega at samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> Reviewed-by: Lukasz Majewski <l.majewski at samsung.com>
> Cc: Minkyu Kang <mk7.kang at samsung.com>
> Cc: Marek Vasut <marex at denx.de>
> ---
> Changes since RFC (v1):
> - NVIDIA Tegra doesn't postpone its USB init anymore
> - board_usb_init()'s sole argument name was shortened
> - networking code comment style (/* blurb...) dropped
> - squashed RFC changes so that patch won't break bisect
> 
> v2 changes:
> - commit message fixup
> 
> v3 changes:
> - added 'index' argument to perform selective port initialization

OK, a few general ideas again:

Why not wrap board_usb_init() and board_usb_init_fail() into single call. You 
now pass some flags to board_usb_init() already, so just add another for the 
fail case. How does it sound to you?

Moreover, the 'int index' should likely be unsigned int and the special value to 
init all controllers at once should probably then be 0xffffffff

Best regards,
Marek Vasut


More information about the U-Boot mailing list