From: tony.lin@freescale.com (Tony Lin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 3/7] ARM: mxs: add usb clocks to clock tree
Date: Tue, 2 Aug 2011 16:39:42 +0800 [thread overview]
Message-ID: <1312274386-6833-4-git-send-email-tony.lin@freescale.com> (raw)
In-Reply-To: <1312274386-6833-1-git-send-email-tony.lin@freescale.com>
add usb host clock and usb host phy clock to clock tree
add usb dummy clocks to clock tree to get rid of adding
more cpu_is_mx macros
Signed-off-by: Tony Lin <tony.lin@freescale.com>
---
arch/arm/mach-mxs/clock-mx28.c | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c
index 5dcc59d..3b43c97 100644
--- a/arch/arm/mach-mxs/clock-mx28.c
+++ b/arch/arm/mach-mxs/clock-mx28.c
@@ -554,6 +554,8 @@ static struct clk rtc_clk = {
.parent = &ref_xtal_clk,
};
+static struct clk dummy_clk; /* initial to 0 and NULL */
+
/* usb_clk gate is controlled in DIGCTRL other than CLKCTRL */
static struct clk usb0_clk = {
.enable_reg = DIGCTRL_BASE_ADDR,
@@ -571,6 +573,21 @@ static struct clk usb1_clk = {
.parent = &pll1_clk,
};
+static struct clk usb_phy_clk0 = {
+ .parent = &pll0_clk,
+ .enable = _raw_clk_disable,
+ .disable = _raw_clk_enable,
+ .enable_reg = CLKCTRL_BASE_ADDR + HW_CLKCTRL_PLL0CTRL0,
+ .enable_shift = 18,
+};
+/* usb phy clock for usb1 */
+static struct clk usb_phy_clk1 = {
+ .parent = &pll1_clk,
+ .enable = _raw_clk_disable,
+ .disable = _raw_clk_enable,
+ .enable_reg = CLKCTRL_BASE_ADDR + HW_CLKCTRL_PLL1CTRL0,
+ .enable_shift = 18,
+};
#define _DEFINE_CLOCK(name, er, es, p) \
static struct clk name = { \
.enable_reg = CLKCTRL_BASE_ADDR + HW_CLKCTRL_##er, \
@@ -627,8 +644,12 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("mxs-mmc.1", NULL, ssp1_clk)
_REGISTER_CLOCK("flexcan.0", NULL, can0_clk)
_REGISTER_CLOCK("flexcan.1", NULL, can1_clk)
- _REGISTER_CLOCK(NULL, "usb0", usb0_clk)
- _REGISTER_CLOCK(NULL, "usb1", usb1_clk)
+ _REGISTER_CLOCK("mxc-ehci.0", "usb", usb0_clk)
+ _REGISTER_CLOCK("mxc-ehci.1", "usb", usb1_clk)
+ _REGISTER_CLOCK(NULL, "usb0_phy", usb_phy_clk0)
+ _REGISTER_CLOCK(NULL, "usb1_phy", usb_phy_clk1)
+ _REGISTER_CLOCK("mxc-ehci.0", "usb_ahb", dummy_clk)
+ _REGISTER_CLOCK("mxc-ehci.1", "usb_ahb", dummy_clk)
_REGISTER_CLOCK("mxs-pwm.0", NULL, pwm_clk)
_REGISTER_CLOCK("mxs-pwm.1", NULL, pwm_clk)
_REGISTER_CLOCK("mxs-pwm.2", NULL, pwm_clk)
--
1.7.0.4
next prev parent reply other threads:[~2011-08-02 8:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-02 8:39 [PATCH v4 0/7] ARM: mx28: add usb host function Tony Lin
2011-08-02 8:39 ` [PATCH v4 1/7] ARM: mxs: ehci: consolidate definitions and structures to share among platforms Tony Lin
2011-08-02 8:39 ` [PATCH v4 2/7] ARM: mxs: make ehci-mxc more flexible to be used on different platforms Tony Lin
2011-08-02 8:39 ` Tony Lin [this message]
2011-08-02 8:39 ` [PATCH v4 4/7] ARM: mxs: enable usb phy power supply Tony Lin
2011-08-02 8:39 ` [PATCH v4 5/7] ARM: mxs: add usb platform operations Tony Lin
2011-08-02 8:39 ` [PATCH v4 6/7] " Tony Lin
2011-08-02 8:39 ` [PATCH v4 7/7] ARM: mxs: add usb host function to default config Tony Lin
2011-08-05 7:53 ` [PATCH v4 0/7] ARM: mx28: add usb host function Lin Tony-B19295
2011-08-05 13:03 ` s.hauer at pengutronix.de
2011-08-05 14:22 ` Peter Chen
2011-08-05 16:52 ` s.hauer at pengutronix.de
2011-08-08 2:03 ` Lin Tony-B19295
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=1312274386-6833-4-git-send-email-tony.lin@freescale.com \
--to=tony.lin@freescale.com \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).