aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2011-05-24 03:04:49 -0400
committerTony Lindgren <tony@atomide.com>2011-05-24 03:04:49 -0400
commitb7679ab3f70482ff4b75a8c735c8224ebedb6020 (patch)
tree39fba8d730b08ce79090dab49851adffe13dc329
parentb08827f4c7a5020855abe0f9b1a316f11275b76b (diff)
parent208466dc10083e734a8af71d10f923ee4bff950c (diff)
Merge branch 'for-tony' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb into omap-for-linus
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c2
-rw-r--r--arch/arm/mach-omap2/omap_phy_internal.c9
-rw-r--r--arch/arm/mach-omap2/usb-musb.c10
-rw-r--r--arch/arm/plat-omap/include/plat/usb.h2
4 files changed, 13 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 6c4706038808..be44147d911a 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -374,7 +374,7 @@ static struct omap_musb_board_data musb_board_data = {
374 .power = 500, 374 .power = 500,
375 .set_phy_power = am35x_musb_phy_power, 375 .set_phy_power = am35x_musb_phy_power,
376 .clear_irq = am35x_musb_clear_irq, 376 .clear_irq = am35x_musb_clear_irq,
377 .set_mode = am35x_musb_set_mode, 377 .set_mode = am35x_set_mode,
378 .reset = am35x_musb_reset, 378 .reset = am35x_musb_reset,
379}; 379};
380 380
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c
index 05f6abc96b0d..f47813edd951 100644
--- a/arch/arm/mach-omap2/omap_phy_internal.c
+++ b/arch/arm/mach-omap2/omap_phy_internal.c
@@ -50,13 +50,16 @@ int omap4430_phy_init(struct device *dev)
50{ 50{
51 ctrl_base = ioremap(OMAP443X_SCM_BASE, SZ_1K); 51 ctrl_base = ioremap(OMAP443X_SCM_BASE, SZ_1K);
52 if (!ctrl_base) { 52 if (!ctrl_base) {
53 dev_err(dev, "control module ioremap failed\n"); 53 pr_err("control module ioremap failed\n");
54 return -ENOMEM; 54 return -ENOMEM;
55 } 55 }
56 /* Power down the phy */ 56 /* Power down the phy */
57 __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF); 57 __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
58 phyclk = clk_get(dev, "ocp2scp_usb_phy_ick");
59 58
59 if (!dev)
60 return 0;
61
62 phyclk = clk_get(dev, "ocp2scp_usb_phy_ick");
60 if (IS_ERR(phyclk)) { 63 if (IS_ERR(phyclk)) {
61 dev_err(dev, "cannot clk_get ocp2scp_usb_phy_ick\n"); 64 dev_err(dev, "cannot clk_get ocp2scp_usb_phy_ick\n");
62 iounmap(ctrl_base); 65 iounmap(ctrl_base);
@@ -228,7 +231,7 @@ void am35x_musb_clear_irq(void)
228 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); 231 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
229} 232}
230 233
231void am35x_musb_set_mode(u8 musb_mode) 234void am35x_set_mode(u8 musb_mode)
232{ 235{
233 u32 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); 236 u32 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);
234 237
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index dfa5a3cb5a17..c7ed540d868d 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -129,11 +129,6 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
129 else 129 else
130 board_data = &musb_default_board_data; 130 board_data = &musb_default_board_data;
131 131
132 if (cpu_is_omap3517() || cpu_is_omap3505()) {
133 } else if (cpu_is_omap44xx()) {
134 usb_musb_mux_init(board_data);
135 }
136
137 /* 132 /*
138 * REVISIT: This line can be removed once all the platforms using 133 * REVISIT: This line can be removed once all the platforms using
139 * musb_core.c have been converted to use use clkdev. 134 * musb_core.c have been converted to use use clkdev.
@@ -176,10 +171,15 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
176 dev->dma_mask = &musb_dmamask; 171 dev->dma_mask = &musb_dmamask;
177 dev->coherent_dma_mask = musb_dmamask; 172 dev->coherent_dma_mask = musb_dmamask;
178 put_device(dev); 173 put_device(dev);
174
175 if (cpu_is_omap44xx())
176 omap4430_phy_init(dev);
179} 177}
180 178
181#else 179#else
182void __init usb_musb_init(struct omap_musb_board_data *board_data) 180void __init usb_musb_init(struct omap_musb_board_data *board_data)
183{ 181{
182 if (cpu_is_omap44xx())
183 omap4430_phy_init(NULL);
184} 184}
185#endif /* CONFIG_USB_MUSB_SOC */ 185#endif /* CONFIG_USB_MUSB_SOC */
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
index 02b96c8f6a17..17d3c939775c 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
@@ -113,7 +113,7 @@ extern int omap4430_phy_suspend(struct device *dev, int suspend);
113extern void am35x_musb_reset(void); 113extern void am35x_musb_reset(void);
114extern void am35x_musb_phy_power(u8 on); 114extern void am35x_musb_phy_power(u8 on);
115extern void am35x_musb_clear_irq(void); 115extern void am35x_musb_clear_irq(void);
116extern void am35x_musb_set_mode(u8 musb_mode); 116extern void am35x_set_mode(u8 musb_mode);
117 117
118/* 118/*
119 * FIXME correct answer depends on hmc_mode, 119 * FIXME correct answer depends on hmc_mode,