[U-Boot] [RFC 2/6] odroid: exynos: usb clean up for U3/X2
Krzysztof Kozlowski
krzk at kernel.org
Mon Apr 1 16:12:38 UTC 2019
On Mon, 1 Apr 2019 at 17:57, Anand Moon <linux.amoon at gmail.com> wrote:
>
> Hi Krzysztof,
>
> On Mon, 1 Apr 2019 at 18:21, Krzysztof Kozlowski <krzk at kernel.org> wrote:
> >
> > On Mon, 1 Apr 2019 at 13:52, Anand Moon <linux.amoon at gmail.com> wrote:
> > >
> > > Add board_usb_cleanup routine to cleanup after
> > > de-registering it usb devices. Also fixed the
> > > compilation error for other board.
> >
> > Fix for build error should be in separate commit. Please also quote
> > the error you are fixing... because the code compiles fine in my case.
> >
>
> Compilation error happens on other target boards. like Odroid-XU3
OK, please quote it and fix the error in separate commit.
>
> > > Signed-off-by: Anand Moon <linux.amoon at gmail.com>
> > > ---
> > > 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);
> >
> > Why you pass index of USB controller as argument "int on"? Index != on...
> >
>
> Generally board_usb_cleanup do cleanup the index of the board_usb_init,
> so I use this naturally. I will check and update this if needed.
But s5pc210_phy_control not. Your comment does not really address my concerns...
Best regards,
Krzysztof
More information about the U-Boot
mailing list