Skip to contentSkip to conversation

arm: am57xx: cl-som-am57x: invoke clock API to enable/disable clocks

PATCH New Uri Mashiach 3 participants 3 messages Feb 9, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/6 arm: am57xx: cl-som-am57x: invoke clock API to enable/disable clocks

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.

---
 board/compulab/cl-som-am57x/cl-som-am57x.c | 10 ----------
 drivers/usb/host/xhci-omap.c               |  3 +++
 2 files changed, 3 insertions(+), 10 deletions(-)
board/compulab/cl-som-am57x/cl-som-am57x.c +0 -10
index fe1468f..4701b71 100644
@@ -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();
drivers/usb/host/xhci-omap.c +3 -0
index ceee12a..f32fccc 100644
@@ -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;
 }
 
@@ -40,8 +41,10 @@ int board_usb_init(int index, enum usb_init_type init)
 	return omap_xhci_board_usb_init(index, init);
 }
 
+
 __weak int __omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
 {
+	disable_usb_clocks(index);
 	return 0;
 }
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH 3/6 arm: am57xx: cl-som-am57x: invoke clock API to enable/disable clocks

Quoted 10 lines · Uri Mashiach

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.

Quoted 50 lines
---
 board/compulab/cl-som-am57x/cl-som-am57x.c | 10 ----------
 drivers/usb/host/xhci-omap.c               |  3 +++
 2 files changed, 3 insertions(+), 10 deletions(-)
board/compulab/cl-som-am57x/cl-som-am57x.c +0 -10
index fe1468f..4701b71 100644
@@ -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();
drivers/usb/host/xhci-omap.c +3 -0
index ceee12a..f32fccc 100644
@@ -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;
 }
 
@@ -40,8 +41,10 @@ int board_usb_init(int index, enum usb_init_type init)
 	return omap_xhci_board_usb_init(index, init);
 }
 
+
 __weak int __omap_xhci_board_usb_cleanup(int index, enum usb_init_type init)
 {
+	disable_usb_clocks(index);
 	return 0;
 }
 
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

PATCH 3/6 arm: am57xx: cl-som-am57x: invoke clock API to enable/disable clocks

In reply to Uri Mashiach
Quoted 10 lines · Uri Mashiach

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170209/593c3872/attachment.sig>