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

Marek Vasut
2013-09-05T15:50:20Z

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@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> Cc: Marek Vasut <marex@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