mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Christoph Fritz <chf.fritz@googlemail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 01/18] arm: am33xx: add USB clocks
Date: Fri, 13 Jun 2014 09:54:18 +0200	[thread overview]
Message-ID: <1402646075-22747-2-git-send-email-chf.fritz@googlemail.com> (raw)
In-Reply-To: <1402646075-22747-1-git-send-email-chf.fritz@googlemail.com>

Signed-off-by: Christoph Fritz <chf.fritz@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


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

  reply	other threads:[~2014-06-13  7:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13  7:54 [RFC][PATCH 00/18] am33x: add musb Christoph Fritz
2014-06-13  7:54 ` Christoph Fritz [this message]
2014-06-13  7:54 ` [PATCH 02/18] arm: am33xx: add pinmux config for USB Christoph Fritz
2014-06-13  7:54 ` [PATCH 03/18] linux wrapper: add more dummy spin_lock stubs Christoph Fritz
2014-06-13  7:54 ` [PATCH 05/18] musb: delete unused include files Christoph Fritz
2014-06-13  7:54 ` [PATCH 06/18] musb: move musb.h to path include/usb Christoph Fritz
2014-06-13  7:54 ` [PATCH 07/18] musb: drop gadget support - remove appropriate files Christoph Fritz
2014-06-13  7:54 ` [PATCH 08/18] musb: use __BAREBOX__ macro Christoph Fritz
2014-06-13  7:54 ` [PATCH 09/18] musb: adapt Kconfig and Makefiles Christoph Fritz
2014-06-13  7:54 ` [PATCH 10/18] arm: pcm051: enable musb in defconfig Christoph Fritz
2014-06-13  7:54 ` [PATCH 11/18] musb: adapt driver to work on barebox Christoph Fritz
2014-06-14 20:53   ` Michael Grzeschik
2014-06-17  9:55     ` Christoph Fritz
2014-06-13  7:54 ` [PATCH 12/18] musb: only support USB_SPEED_HIGH devices Christoph Fritz
2014-06-13  7:54 ` [PATCH 13/18] usb: add musb support Christoph Fritz
2014-06-13  7:54 ` [PATCH 14/18] arm: am33xx: add usb base addresses Christoph Fritz
2014-06-13  7:54 ` [PATCH 15/18] arm: am33xx: add usb platform helper code Christoph Fritz
2014-06-13  7:54 ` [PATCH 16/18] musb: add barebox gluecode Christoph Fritz
2014-06-13  7:54 ` [PATCH 17/18] arm: pcm051: enable USB pinmux Christoph Fritz
2014-06-13  7:54 ` [PATCH 18/18] arm: pcm051: enable USB Christoph Fritz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402646075-22747-2-git-send-email-chf.fritz@googlemail.com \
    --to=chf.fritz@googlemail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox