Message ID | 1487857181-8938-5-git-send-email-uri.mashiach@compulab.co.il |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
On 02/23/2017 02:39 PM, Uri Mashiach wrote: > Invoke enable_usb_clocks during board_usb_init and disable_usb_clocks > during board_usb_exit to enable and disable clocks respectively. > > Modifications: > * Enable USB clocks in the OMAP version of the function > board_usb_init. > * Disable USB clocks in the OMAP version of the function > board_usb_cleanup. > > Cc: Marek Vasut <marex@denx.de> > Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> > Reviewed-by: Marek Vasut <marex@denx.de> > Reviewed-by: Tom Rini <trini@konsulko.com> > --- > V1 -> V4: none > > board/compulab/cl-som-am57x/cl-som-am57x.c | 10 ---------- > drivers/usb/host/xhci-omap.c | 2 ++ > 2 files changed, 2 insertions(+), 10 deletions(-) > > diff --git a/board/compulab/cl-som-am57x/cl-som-am57x.c b/board/compulab/cl-som-am57x/cl-som-am57x.c > index fe1468f..4701b71 100644 > --- a/board/compulab/cl-som-am57x/cl-som-am57x.c > +++ b/board/compulab/cl-som-am57x/cl-som-am57x.c > @@ -53,16 +53,6 @@ int board_mmc_init(bd_t *bis) > } > #endif /* CONFIG_GENERIC_MMC */ > > -#ifdef CONFIG_USB_XHCI_OMAP > -int omap_xhci_board_usb_init(int index, enum usb_init_type init) > -{ > - setbits_le32((*prcm)->cm_l3init_usb_otg_ss1_clkctrl, > - OTG_SS_CLKCTRL_MODULEMODE_HW | OPTFCLKEN_REFCLK960M); > - > - return 0; > -} > -#endif /* CONFIG_USB_XHCI_OMAP */ > - > int misc_init_r(void) > { > cl_print_pcb_info(); > diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c > index a1b4f2f..d6c5744 100644 > --- a/drivers/usb/host/xhci-omap.c > +++ b/drivers/usb/host/xhci-omap.c > @@ -29,6 +29,7 @@ static struct omap_xhci omap; > > __weak int omap_xhci_board_usb_init(int index, enum usb_init_type init) > { > + enable_usb_clocks(index); How many OMAP boards will this break btw ? :) > return 0; > } > > @@ -39,6 +40,7 @@ int board_usb_init(int index, enum usb_init_type init) > > __weak int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init) > { > + disable_usb_clocks(index); > return 0; > } > >
Hi, On 26/02/17 14:27, Marek Vasut wrote: > On 02/23/2017 02:39 PM, Uri Mashiach wrote: >> Invoke enable_usb_clocks during board_usb_init and disable_usb_clocks >> during board_usb_exit to enable and disable clocks respectively. >> >> Modifications: >> * Enable USB clocks in the OMAP version of the function >> board_usb_init. >> * Disable USB clocks in the OMAP version of the function >> board_usb_cleanup. >> >> Cc: Marek Vasut <marex@denx.de> >> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> >> Reviewed-by: Marek Vasut <marex@denx.de> >> Reviewed-by: Tom Rini <trini@konsulko.com> >> --- >> V1 -> V4: none >> >> board/compulab/cl-som-am57x/cl-som-am57x.c | 10 ---------- >> drivers/usb/host/xhci-omap.c | 2 ++ >> 2 files changed, 2 insertions(+), 10 deletions(-) >> >> diff --git a/board/compulab/cl-som-am57x/cl-som-am57x.c b/board/compulab/cl-som-am57x/cl-som-am57x.c >> index fe1468f..4701b71 100644 >> --- a/board/compulab/cl-som-am57x/cl-som-am57x.c >> +++ b/board/compulab/cl-som-am57x/cl-som-am57x.c >> @@ -53,16 +53,6 @@ int board_mmc_init(bd_t *bis) >> } >> #endif /* CONFIG_GENERIC_MMC */ >> >> -#ifdef CONFIG_USB_XHCI_OMAP >> -int omap_xhci_board_usb_init(int index, enum usb_init_type init) >> -{ >> - setbits_le32((*prcm)->cm_l3init_usb_otg_ss1_clkctrl, >> - OTG_SS_CLKCTRL_MODULEMODE_HW | OPTFCLKEN_REFCLK960M); >> - >> - return 0; >> -} >> -#endif /* CONFIG_USB_XHCI_OMAP */ >> - >> int misc_init_r(void) >> { >> cl_print_pcb_info(); >> diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c >> index a1b4f2f..d6c5744 100644 >> --- a/drivers/usb/host/xhci-omap.c >> +++ b/drivers/usb/host/xhci-omap.c >> @@ -29,6 +29,7 @@ static struct omap_xhci omap; >> >> __weak int omap_xhci_board_usb_init(int index, enum usb_init_type init) >> { >> + enable_usb_clocks(index); > > How many OMAP boards will this break btw ? :) Why do you think this would break OMAP boards? > >> return 0; >> } >> >> @@ -39,6 +40,7 @@ int board_usb_init(int index, enum usb_init_type init) >> >> __weak int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init) >> { >> + disable_usb_clocks(index); >> return 0; >> } >> >> > >
On 02/27/2017 05:24 PM, Roger Quadros wrote: > Hi, > > On 26/02/17 14:27, Marek Vasut wrote: >> On 02/23/2017 02:39 PM, Uri Mashiach wrote: >>> Invoke enable_usb_clocks during board_usb_init and disable_usb_clocks >>> during board_usb_exit to enable and disable clocks respectively. >>> >>> Modifications: >>> * Enable USB clocks in the OMAP version of the function >>> board_usb_init. >>> * Disable USB clocks in the OMAP version of the function >>> board_usb_cleanup. >>> >>> Cc: Marek Vasut <marex@denx.de> >>> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> >>> Reviewed-by: Marek Vasut <marex@denx.de> >>> Reviewed-by: Tom Rini <trini@konsulko.com> >>> --- >>> V1 -> V4: none >>> >>> board/compulab/cl-som-am57x/cl-som-am57x.c | 10 ---------- >>> drivers/usb/host/xhci-omap.c | 2 ++ >>> 2 files changed, 2 insertions(+), 10 deletions(-) >>> >>> diff --git a/board/compulab/cl-som-am57x/cl-som-am57x.c b/board/compulab/cl-som-am57x/cl-som-am57x.c >>> index fe1468f..4701b71 100644 >>> --- a/board/compulab/cl-som-am57x/cl-som-am57x.c >>> +++ b/board/compulab/cl-som-am57x/cl-som-am57x.c >>> @@ -53,16 +53,6 @@ int board_mmc_init(bd_t *bis) >>> } >>> #endif /* CONFIG_GENERIC_MMC */ >>> >>> -#ifdef CONFIG_USB_XHCI_OMAP >>> -int omap_xhci_board_usb_init(int index, enum usb_init_type init) >>> -{ >>> - setbits_le32((*prcm)->cm_l3init_usb_otg_ss1_clkctrl, >>> - OTG_SS_CLKCTRL_MODULEMODE_HW | OPTFCLKEN_REFCLK960M); >>> - >>> - return 0; >>> -} >>> -#endif /* CONFIG_USB_XHCI_OMAP */ >>> - >>> int misc_init_r(void) >>> { >>> cl_print_pcb_info(); >>> diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c >>> index a1b4f2f..d6c5744 100644 >>> --- a/drivers/usb/host/xhci-omap.c >>> +++ b/drivers/usb/host/xhci-omap.c >>> @@ -29,6 +29,7 @@ static struct omap_xhci omap; >>> >>> __weak int omap_xhci_board_usb_init(int index, enum usb_init_type init) >>> { >>> + enable_usb_clocks(index); >> >> How many OMAP boards will this break btw ? :) > > Why do you think this would break OMAP boards? Just curious if there is some breakage I should anticipate ...
On Thu, Feb 23, 2017 at 03:39:38PM +0200, Uri Mashiach wrote: > Invoke enable_usb_clocks during board_usb_init and disable_usb_clocks > during board_usb_exit to enable and disable clocks respectively. > > Modifications: > * Enable USB clocks in the OMAP version of the function > board_usb_init. > * Disable USB clocks in the OMAP version of the function > board_usb_cleanup. > > Cc: Marek Vasut <marex@denx.de> > Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> > Reviewed-by: Marek Vasut <marex@denx.de> > Reviewed-by: Tom Rini <trini@konsulko.com> Applied to u-boot/master, thanks!
diff --git a/board/compulab/cl-som-am57x/cl-som-am57x.c b/board/compulab/cl-som-am57x/cl-som-am57x.c index fe1468f..4701b71 100644 --- a/board/compulab/cl-som-am57x/cl-som-am57x.c +++ b/board/compulab/cl-som-am57x/cl-som-am57x.c @@ -53,16 +53,6 @@ int board_mmc_init(bd_t *bis) } #endif /* CONFIG_GENERIC_MMC */ -#ifdef CONFIG_USB_XHCI_OMAP -int omap_xhci_board_usb_init(int index, enum usb_init_type init) -{ - setbits_le32((*prcm)->cm_l3init_usb_otg_ss1_clkctrl, - OTG_SS_CLKCTRL_MODULEMODE_HW | OPTFCLKEN_REFCLK960M); - - return 0; -} -#endif /* CONFIG_USB_XHCI_OMAP */ - int misc_init_r(void) { cl_print_pcb_info(); diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c index a1b4f2f..d6c5744 100644 --- a/drivers/usb/host/xhci-omap.c +++ b/drivers/usb/host/xhci-omap.c @@ -29,6 +29,7 @@ static struct omap_xhci omap; __weak int omap_xhci_board_usb_init(int index, enum usb_init_type init) { + enable_usb_clocks(index); return 0; } @@ -39,6 +40,7 @@ int board_usb_init(int index, enum usb_init_type init) __weak int omap_xhci_board_usb_cleanup(int index, enum usb_init_type init) { + disable_usb_clocks(index); return 0; }