All of lore.kernel.org
 help / color / mirror / Atom feed
From: tony.lin@freescale.com (Tony Lin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/6] ARM: mxs: add usb clocks to clock tree
Date: Mon, 25 Jul 2011 15:01:21 +0800	[thread overview]
Message-ID: <1311577284-11506-4-git-send-email-tony.lin@freescale.com> (raw)
In-Reply-To: <1311577284-11506-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 |   28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c
index 5dcc59d..6f3cd40 100644
--- a/arch/arm/mach-mxs/clock-mx28.c
+++ b/arch/arm/mach-mxs/clock-mx28.c
@@ -554,15 +554,15 @@ static struct clk rtc_clk = {
 	.parent = &ref_xtal_clk,
 };
 
-/* usb_clk gate is controlled in DIGCTRL other than CLKCTRL */
-static struct clk usb0_clk = {
-	.enable_reg = DIGCTRL_BASE_ADDR,
-	.enable_shift = 2,
-	.enable = _raw_clk_enable,
-	.disable = _raw_clk_disable,
-	.parent = &pll0_clk,
+static struct clk dummy_clk = {
+	.enable_reg = 0,
+	.enable_shift = 0,
+	.enable = NULL,
+	.disable = NULL,
+	.parent = NULL,
 };
 
+/* usb_clk gate is controlled in DIGCTRL other than CLKCTRL */
 static struct clk usb1_clk = {
 	.enable_reg = DIGCTRL_BASE_ADDR,
 	.enable_shift = 16,
@@ -571,6 +571,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 +635,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-25  7:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25  7:01 [PATCH v2 0/6] ARM: mx28: add usb host function Tony Lin
2011-07-25  7:01 ` [PATCH v2 1/6] ARM: mxs: ehci: consolidate definitions and structures to share among platforms Tony Lin
2011-07-25  7:01 ` [PATCH v2 2/6] ARM: mxs: enable usb1 phy power supply Tony Lin
2011-07-25  7:01 ` Tony Lin [this message]
2011-07-25 10:24   ` [PATCH v2 3/6] ARM: mxs: add usb clocks to clock tree Sergei Shtylyov
2011-07-25 10:43     ` Lin Tony-B19295
2011-07-25  7:01 ` [PATCH v2 4/6] ARM: mxs: make ehci-mxc more flexible to be used on different platforms Tony Lin
2011-07-25  7:21   ` Lothar Waßmann
2011-07-25  7:01 ` [PATCH v2 5/6] ARM: mxs: add usb phy operations Tony Lin
2011-07-25  7:15   ` Lothar Waßmann
2011-07-25  7:26     ` Lin Tony-B19295
2011-07-25  8:24     ` Russell King - ARM Linux
2011-07-26  2:05       ` Lin Tony-B19295
2011-07-26  7:07   ` Koen Beel
2011-07-26  7:12     ` Lin Tony-B19295
2011-07-25  7:01 ` [PATCH v2 6/6] ARM: mxs: add usb host function to default config Tony Lin

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=1311577284-11506-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.