From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anand Moon Date: Mon, 1 Apr 2019 11:52:28 +0000 Subject: [U-Boot] [RFC 2/6] odroid: exynos: usb clean up for U3/X2 In-Reply-To: <20190401115232.453-1-linux.amoon@gmail.com> References: <20190401115232.453-1-linux.amoon@gmail.com> Message-ID: <20190401115232.453-3-linux.amoon@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add board_usb_cleanup routine to cleanup after de-registering it usb devices. Also fixed the compilation error for other board. Signed-off-by: Anand Moon --- board/samsung/common/board.c | 4 ++-- board/samsung/odroid/odroid.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 9adbd1e2cf..c74aca9b0a 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -351,10 +351,10 @@ void reset_misc(void) } } +#ifdef CONFIG_USB_DWC3 int board_usb_cleanup(int index, enum usb_init_type init) { -#ifdef CONFIG_USB_DWC3 dwc3_uboot_exit(index); -#endif return 0; } +#endif diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index 79d14ead01..547ae698cf 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -538,4 +538,9 @@ int board_usb_init(int index, enum usb_init_type init) debug("USB_udc_probe\n"); return dwc2_udc_probe(&s5pc210_otg_data); } + +int board_usb_cleanup(int index, enum usb_init_type init) +{ + return s5pc210_phy_control(index); +} #endif -- 2.21.0