mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] usb-imx28: fix enable
@ 2013-09-10 17:57 Eric Bénard
  2013-09-10 17:57 ` [PATCH 2/3] imx28-regs: i.MX28 has 2 USB controllers Eric Bénard
  2013-09-10 17:57 ` [PATCH 3/3] mx28-evk: enable USB Eric Bénard
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Bénard @ 2013-09-10 17:57 UTC (permalink / raw)
  To: barebox

we need to power on the PLL when enabling the USB clock.

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/mach-mxs/usb-imx28.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mxs/usb-imx28.c b/arch/arm/mach-mxs/usb-imx28.c
index 61d59c3..e5b63c3 100644
--- a/arch/arm/mach-mxs/usb-imx28.c
+++ b/arch/arm/mach-mxs/usb-imx28.c
@@ -46,6 +46,7 @@
 #define CLK_PLL0CTRL0			(IMX_CCM_BASE + 0x0)
 #define CLK_PLL1CTRL0			(IMX_CCM_BASE + 0x20)
 #define PLLCTRL0_EN_USB_CLKS		(1 << 18)
+#define PLLCTRL0_POWER		(1 << 17)
 
 #define DIGCTRL_CTRL			(IMX_DIGCTL_BASE + 0x0)
 #define DIGCTL_CTRL_USB0_CLKGATE	(1 << 2)
@@ -77,7 +78,7 @@ int imx28_usb_phy0_enable(void)
 	imx28_usb_phy_reset((void *)IMX_USBPHY0_BASE);
 
 	/* Turn on the USB clocks */
-	writel(PLLCTRL0_EN_USB_CLKS, CLK_PLL0CTRL0 + SET);
+	writel(PLLCTRL0_EN_USB_CLKS | PLLCTRL0_POWER, CLK_PLL0CTRL0 + SET);
 
 	writel(DIGCTL_CTRL_USB0_CLKGATE, DIGCTRL_CTRL + CLR);
 
@@ -91,7 +92,7 @@ int imx28_usb_phy1_enable(void)
 	imx28_usb_phy_reset((void *)IMX_USBPHY1_BASE);
 
 	/* Turn on the USB clocks */
-	writel(PLLCTRL0_EN_USB_CLKS, CLK_PLL1CTRL0 + SET);
+	writel(PLLCTRL0_EN_USB_CLKS | PLLCTRL0_POWER, CLK_PLL1CTRL0 + SET);
 
 	writel(DIGCTL_CTRL_USB1_CLKGATE, DIGCTRL_CTRL + CLR);
 
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-10 17:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-10 17:57 [PATCH 1/3] usb-imx28: fix enable Eric Bénard
2013-09-10 17:57 ` [PATCH 2/3] imx28-regs: i.MX28 has 2 USB controllers Eric Bénard
2013-09-10 17:57 ` [PATCH 3/3] mx28-evk: enable USB Eric Bénard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox