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>
This commit is contained in:
committed by
Marek Vasut
parent
f3d7cff559
commit
16297cfb2a
@@ -13,6 +13,7 @@
|
||||
#include <netdev.h>
|
||||
#include <asm/io.h>
|
||||
#include <serial.h>
|
||||
#include <usb.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@@ -39,7 +40,7 @@ int dram_init(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CMD_USB
|
||||
int usb_board_init(void)
|
||||
int board_usb_init(int index, enum board_usb_init_type init)
|
||||
{
|
||||
writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) &
|
||||
~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE),
|
||||
@@ -70,9 +71,9 @@ int usb_board_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void usb_board_init_fail(void)
|
||||
int board_usb_cleanup(int index, enum board_usb_init_type init)
|
||||
{
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void usb_board_stop(void)
|
||||
|
||||
Reference in New Issue
Block a user