linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony.lin@freescale.com (Tony Lin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 3/6] ARM: mxs: add usb clocks to clock tree
Date: Wed, 27 Jul 2011 13:29:31 +0800	[thread overview]
Message-ID: <1311744574-3610-4-git-send-email-tony.lin@freescale.com> (raw)
In-Reply-To: <1311744574-3610-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 |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c
index 5dcc59d..0afc98f 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,14 @@ static struct clk usb1_clk = {
 	.parent = &pll1_clk,
 };
 
+/* 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 +637,10 @@ 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", "usb1", usb1_clk)
+	_REGISTER_CLOCK("mxc-ehci", "usb1_phy", usb_phy_clk1)
+	_REGISTER_CLOCK("mxc-ehci", "usb", dummy_clk)
+	_REGISTER_CLOCK("mxc-ehci", "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

  parent reply	other threads:[~2011-07-27  5:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27  5:29 [PATCH v3 0/6] ARM: mx28: add usb host function Tony Lin
2011-07-27  5:29 ` [PATCH v3 1/6] ARM: mxs: ehci: consolidate definitions and structures to share among platforms Tony Lin
2011-07-27  5:29 ` [PATCH v3 2/6] ARM: mxs: enable usb1 phy power supply Tony Lin
2011-07-27  5:29 ` Tony Lin [this message]
2011-07-27  5:29 ` [PATCH v3 4/6] ARM: mxs: make ehci-mxc more flexible to be used on different platforms Tony Lin
2011-07-27  8:19   ` Marc Kleine-Budde
2011-07-27  5:29 ` [PATCH v3 5/6] ARM: mxs: add usb phy operations Tony Lin
2011-07-27  8:03   ` Sascha Hauer
2011-07-27  8:16     ` Lin Tony-B19295
2011-07-28  7:39     ` Lin Tony-B19295
2011-07-28 11:27     ` Russell King - ARM Linux
2011-07-27  8:48   ` Lothar Waßmann
2011-07-27  9:10     ` Lin Tony-B19295
2011-07-27  9:24       ` Lothar Waßmann
2011-07-27  8:57   ` Marc Kleine-Budde
2011-07-27  5:29 ` [PATCH v3 6/6] ARM: mxs: add usb host function to default config Tony Lin
2011-07-27  9:01 ` [PATCH v3 0/6] ARM: mx28: add usb host function Marc Kleine-Budde
2011-07-27  9:15   ` 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=1311744574-3610-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).