From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/4] ARM i.MX53: Setup USB clocks
Date: Thu, 12 Apr 2012 21:40:04 +0200 [thread overview]
Message-ID: <1334259605-21907-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1334259605-21907-1-git-send-email-s.hauer@pengutronix.de>
- get USB PHY clock from OSC (24MHz)
- adjust USB clock to 54MHz
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/imx53.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/imx53.c b/arch/arm/mach-imx/imx53.c
index 8742c46..b5dbc39 100644
--- a/arch/arm/mach-imx/imx53.c
+++ b/arch/arm/mach-imx/imx53.c
@@ -154,10 +154,15 @@ void imx53_init_lowlevel(unsigned int cpufreq_mhz)
writel(0x00016154, ccm + MX5_CCM_CBCMR);
- /* change uart clk parent to pll2 */
r = readl(ccm + MX5_CCM_CSCMR1);
- r &= ~(3 << 24);
- r |= (1 << 24);
+
+ /* change uart clk parent to pll2 */
+ r &= ~MX5_CCM_CSCMR1_UART_CLK_SEL_MASK;
+ r |= 1 << MX5_CCM_CSCMR1_UART_CLK_SEL_OFFSET;
+
+ /* USB phy clock from osc */
+ r &= ~(1 << MX5_CCM_CSCMR1_USB_PHY_CLK_SEL_OFFSET);
+
writel(r, ccm + MX5_CCM_CSCMR1);
/* make sure change is effective */
@@ -187,6 +192,12 @@ void imx53_init_lowlevel(unsigned int cpufreq_mhz)
r &= ~MX5_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_MASK;
r |= 1 << MX5_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_OFFSET;
+ r &= ~MX5_CCM_CSCDR1_USBOH3_CLK_PRED_MASK;
+ r &= ~MX5_CCM_CSCDR1_USBOH3_CLK_PODF_MASK;
+
+ r |= 3 << MX5_CCM_CSCDR1_USBOH3_CLK_PRED_OFFSET;
+ r |= 1 << MX5_CCM_CSCDR1_USBOH3_CLK_PODF_OFFSET;
+
writel(r, ccm + MX5_CCM_CSCDR1);
/* Restore the default values in the Gate registers */
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-04-12 19:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-12 19:40 ehci patches Sascha Hauer
2012-04-12 19:40 ` [PATCH 1/4] USB ehci: make cache handling simpler Sascha Hauer
2012-04-12 19:40 ` [PATCH 2/4] USB ehci: speed up initialization Sascha Hauer
2012-04-12 19:40 ` Sascha Hauer [this message]
2012-04-12 19:40 ` [PATCH 4/4] ARM i.MX53 LOCO: Add USB support Sascha Hauer
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=1334259605-21907-4-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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