[PATCH 01/18] arm: am33xx: add USB clocks

Christoph Fritz chf.fritz at googlemail.com
Fri Jun 13 00:54:18 PDT 2014


Signed-off-by: Christoph Fritz <chf.fritz at googlemail.com>
---
 arch/arm/mach-omap/am33xx_clock.c              |    7 +++++++
 arch/arm/mach-omap/include/mach/am33xx-clock.h |    2 ++
 2 files changed, 9 insertions(+)

diff --git a/arch/arm/mach-omap/am33xx_clock.c b/arch/arm/mach-omap/am33xx_clock.c
index 9105ddc..f4b1f4e 100644
--- a/arch/arm/mach-omap/am33xx_clock.c
+++ b/arch/arm/mach-omap/am33xx_clock.c
@@ -26,6 +26,8 @@
 #define PLL_LOCK_MODE	0x7
 #define PLL_MULTIPLIER_SHIFT	 8
 
+#define DPLL_CLKDCOLDO_GATE_EN	(0x1 << 8)
+
 static void interface_clocks_enable(void)
 {
 	/* Enable all the Interconnect Modules */
@@ -154,6 +156,11 @@ static void per_clocks_enable(void)
 
 	__raw_writel(PRCM_MOD_EN, CM_PER_SPI1_CLKCTRL);
 	while (__raw_readl(CM_PER_SPI1_CLKCTRL) != PRCM_MOD_EN);
+
+	/* USB */
+	__raw_writel(DPLL_CLKDCOLDO_GATE_EN, CM_CLKDCOLDO_DPLL_PER);
+	__raw_writel(PRCM_MOD_EN, CM_PER_USB0_CLKCTRL);
+	while (__raw_readl(CM_PER_USB0_CLKCTRL) != PRCM_MOD_EN);
 }
 
 static void mpu_pll_config(int mpupll_M, int osc)
diff --git a/arch/arm/mach-omap/include/mach/am33xx-clock.h b/arch/arm/mach-omap/include/mach/am33xx-clock.h
index 65fbed6..996f531 100644
--- a/arch/arm/mach-omap/include/mach/am33xx-clock.h
+++ b/arch/arm/mach-omap/include/mach/am33xx-clock.h
@@ -120,6 +120,8 @@
 #define CM_PER_TIMER2_CLKCTRL           (CM_PER + 0x80) /* Timer2 */
 #define CM_WKUP_UART0_CLKCTRL           (CM_WKUP + 0xB4)/* UART0 */
 #define CM_WKUP_CONTROL_CLKCTRL         (CM_WKUP + 0x4) /* Control Module */
+#define CM_PER_USB0_CLKCTRL             (CM_PER + 0x1C) /* USB */
+#define CM_CLKDCOLDO_DPLL_PER           (CM_WKUP + 0x7C)/* USB phy */
 #define CM_PER_EMIF_CLKCTRL             (CM_PER + 0x28) /* EMIF */
 #define CM_PER_EMIF_FW_CLKCTRL          (CM_PER + 0xD0) /* EMIF FW */
 #define CM_PER_GPMC_CLKCTRL             (CM_PER + 0x30) /* GPMC */
-- 
1.7.10.4




More information about the barebox mailing list