usb: new board-specific USB init interface
This commit unifies board-specific USB initialization implementations
under one symbol (usb_board_init), declaration of which is available in
usb.h.
New API allows selective initialization of USB controllers whenever needed.
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: Marek Vasut <marex@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 7f61d17..58d925f 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -26,6 +26,7 @@
#include <power/max8997_muic.h>
#include <power/battery.h>
#include <power/max17042_fg.h>
+#include <usb.h>
#include <usb_mass_storage.h>
#include "setup.h"
@@ -495,10 +496,10 @@
.usb_flags = PHY0_SLEEP,
};
-void board_usb_init(void)
+int board_usb_init(int index, enum board_usb_init_type init)
{
debug("USB_udc_probe\n");
- s3c_udc_probe(&s5pc210_otg_data);
+ return s3c_udc_probe(&s5pc210_otg_data);
}
#endif