[PATCH 2/8] MXS: Add USB EHCI and USB PHY clock handling

Marek Vasut marex at denx.de
Tue May 15 04:23:33 EDT 2012


Based on code by:
Tony Lin <tony.lin at freescale.com>

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Chen Peter-B29397 <B29397 at freescale.com>
Cc: Detlev Zundel <dzu at denx.de>
Cc: Fabio Estevam <festevam at gmail.com>
Cc: Li Frank-B20596 <B20596 at freescale.com>
Cc: Linux USB <linux-usb at vger.kernel.org>
Cc: Liu JunJie-B08287 <B08287 at freescale.com>
Cc: Sascha Hauer <s.hauer at pengutronix.de>
Cc: Shawn Guo <shawn.guo at linaro.org>
Cc: Shi Make-B15407 <B15407 at freescale.com>
Cc: Stefano Babic <sbabic at denx.de>
Cc: Subodh Nijsure <snijsure at grid-net.com>
Cc: Wolfgang Denk <wd at denx.de>
---
 arch/arm/mach-mxs/clock-mx28.c |   21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c
index 43116ba..60ebe99 100644
--- a/arch/arm/mach-mxs/clock-mx28.c
+++ b/arch/arm/mach-mxs/clock-mx28.c
@@ -577,6 +577,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,
+};
+
+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,	\
@@ -636,8 +651,10 @@ static struct clk_lookup lookups[] = {
 	_REGISTER_CLOCK("mxs-mmc.3", NULL, ssp3_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("mxs-usb.0", "usb", usb0_clk)
+	_REGISTER_CLOCK("mxs-usb.1", "usb", usb1_clk)
+	_REGISTER_CLOCK("mxs-usb-phy.0", "phy", usb_phy_clk0)
+	_REGISTER_CLOCK("mxs-usb-phy.1", "phy", usb_phy_clk1)
 	_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.10




More information about the linux-arm-kernel mailing list