aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-07 16:16:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-07 16:16:28 -0500
commit3e5b08cbbf78bedd316904ab0cf3b27119433ee5 (patch)
tree0365745c1b7441c1868551c024410c829c3accc6 /arch
parentda40d036fd716f0efb2917076220814b1e927ae1 (diff)
parent2af10844eb6ed104f9505bf3a7ba3ceb02264f31 (diff)
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (144 commits) USB: add support for Dream Cheeky DL100B Webmail Notifier (1d34:0004) USB: serial: ftdi_sio: add support for TIOCSERGETLSR USB: ehci-mxc: Setup portsc register prior to accessing OTG viewport USB: atmel_usba_udc: fix freeing irq in usba_udc_remove() usb: ehci-omap: fix tll channel enable mask usb: ohci-omap3: fix trivial typo USB: gadget: ci13xxx: don't assume that PAGE_SIZE is 4096 USB: gadget: ci13xxx: fix complete() callback for no_interrupt rq's USB: gadget: update ci13xxx to work with g_ether USB: gadgets: ci13xxx: fix probing of compiled-in gadget drivers Revert "USB: musb: pm: don't rely fully on clock support" Revert "USB: musb: blackfin: pm: make it work" USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path USB: uas: Ensure we only bind to a UAS interface USB: uas: Rename sense pipe and sense urb to status pipe and status urb USB: uas: Use kzalloc instead of kmalloc USB: uas: Fix up the Sense IU usb: musb: core: kill unneeded #include's DA8xx: assign name to MUSB IRQ resource usb: gadget: g_ncm added ... Manually fix up trivial conflicts in USB Kconfig changes in: arch/arm/mach-omap2/Kconfig arch/sh/Kconfig drivers/usb/Kconfig drivers/usb/host/ehci-hcd.c and annoying chip clock data conflicts in: arch/arm/mach-omap2/clock3xxx_data.c arch/arm/mach-omap2/clock44xx_data.c
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-davinci/usb.c6
-rw-r--r--arch/arm/mach-omap2/Kconfig1
-rw-r--r--arch/arm/mach-omap2/Makefile6
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c35
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c5
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c14
-rw-r--r--arch/arm/mach-omap2/clock2420_data.c2
-rw-r--r--arch/arm/mach-omap2/clock2430_data.c2
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c13
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c7
-rw-r--r--arch/arm/mach-omap2/omap_phy_internal.c149
-rw-r--r--arch/arm/mach-omap2/usb-ehci.c144
-rw-r--r--arch/arm/mach-omap2/usb-musb.c104
-rw-r--r--arch/arm/mach-omap2/usb-tusb6010.c2
-rw-r--r--arch/arm/plat-omap/include/plat/omap44xx.h5
-rw-r--r--arch/arm/plat-omap/include/plat/usb.h10
-rw-r--r--arch/blackfin/mach-bf527/boards/ad7160eval.c2
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c4
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c4
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c4
-rw-r--r--arch/blackfin/mach-bf527/boards/tll6527m.c2
-rw-r--r--arch/blackfin/mach-bf548/boards/cm_bf548.c4
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c4
-rw-r--r--arch/sh/Kconfig5
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7786.c35
25 files changed, 524 insertions, 45 deletions
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
index 31f0cbea0caa..23d2b6d9fa63 100644
--- a/arch/arm/mach-davinci/usb.c
+++ b/arch/arm/mach-davinci/usb.c
@@ -64,17 +64,19 @@ static struct resource usb_resources[] = {
64 { 64 {
65 .start = IRQ_USBINT, 65 .start = IRQ_USBINT,
66 .flags = IORESOURCE_IRQ, 66 .flags = IORESOURCE_IRQ,
67 .name = "mc"
67 }, 68 },
68 { 69 {
69 /* placeholder for the dedicated CPPI IRQ */ 70 /* placeholder for the dedicated CPPI IRQ */
70 .flags = IORESOURCE_IRQ, 71 .flags = IORESOURCE_IRQ,
72 .name = "dma"
71 }, 73 },
72}; 74};
73 75
74static u64 usb_dmamask = DMA_BIT_MASK(32); 76static u64 usb_dmamask = DMA_BIT_MASK(32);
75 77
76static struct platform_device usb_dev = { 78static struct platform_device usb_dev = {
77 .name = "musb_hdrc", 79 .name = "musb-davinci",
78 .id = -1, 80 .id = -1,
79 .dev = { 81 .dev = {
80 .platform_data = &usb_data, 82 .platform_data = &usb_data,
@@ -110,6 +112,7 @@ static struct resource da8xx_usb20_resources[] = {
110 { 112 {
111 .start = IRQ_DA8XX_USB_INT, 113 .start = IRQ_DA8XX_USB_INT,
112 .flags = IORESOURCE_IRQ, 114 .flags = IORESOURCE_IRQ,
115 .name = "mc",
113 }, 116 },
114}; 117};
115 118
@@ -121,6 +124,7 @@ int __init da8xx_register_usb20(unsigned mA, unsigned potpgt)
121 124
122 usb_dev.resource = da8xx_usb20_resources; 125 usb_dev.resource = da8xx_usb20_resources;
123 usb_dev.num_resources = ARRAY_SIZE(da8xx_usb20_resources); 126 usb_dev.num_resources = ARRAY_SIZE(da8xx_usb20_resources);
127 usb_dev.name = "musb-da8xx";
124 128
125 return platform_device_register(&usb_dev); 129 return platform_device_register(&usb_dev);
126} 130}
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 3e8c9e859f98..1a2cf6226a55 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -48,6 +48,7 @@ config ARCH_OMAP4
48 select ARM_ERRATA_720789 48 select ARM_ERRATA_720789
49 select ARCH_HAS_OPP 49 select ARCH_HAS_OPP
50 select PM_OPP if PM 50 select PM_OPP if PM
51 select USB_ARCH_HAS_EHCI
51 52
52comment "OMAP Core Type" 53comment "OMAP Core Type"
53 depends on ARCH_OMAP2 54 depends on ARCH_OMAP2
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 4ab82f6f15b1..cd7332f50b2d 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -209,9 +209,11 @@ obj-$(CONFIG_MACH_IGEP0030) += board-igep0030.o \
209obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \ 209obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
210 hsmmc.o 210 hsmmc.o
211obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \ 211obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \
212 hsmmc.o 212 hsmmc.o \
213 omap_phy_internal.o
213obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o \ 214obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o \
214 hsmmc.o 215 hsmmc.o \
216 omap_phy_internal.o
215 217
216obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o 218obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
217 219
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 1cb208b6e626..a70bdf28e2bc 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -44,6 +44,7 @@
44#define ETH_KS8851_IRQ 34 44#define ETH_KS8851_IRQ 34
45#define ETH_KS8851_POWER_ON 48 45#define ETH_KS8851_POWER_ON 48
46#define ETH_KS8851_QUART 138 46#define ETH_KS8851_QUART 138
47#define OMAP4SDP_MDM_PWR_EN_GPIO 157
47#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 48#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
48#define OMAP4_SFH7741_ENABLE_GPIO 188 49#define OMAP4_SFH7741_ENABLE_GPIO 188
49 50
@@ -250,12 +251,29 @@ static void __init omap_4430sdp_init_irq(void)
250 gic_init_irq(); 251 gic_init_irq();
251} 252}
252 253
254static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
255 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
256 .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
257 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
258 .phy_reset = false,
259 .reset_gpio_port[0] = -EINVAL,
260 .reset_gpio_port[1] = -EINVAL,
261 .reset_gpio_port[2] = -EINVAL,
262};
263
253static struct omap_musb_board_data musb_board_data = { 264static struct omap_musb_board_data musb_board_data = {
254 .interface_type = MUSB_INTERFACE_UTMI, 265 .interface_type = MUSB_INTERFACE_UTMI,
255 .mode = MUSB_PERIPHERAL, 266 .mode = MUSB_OTG,
256 .power = 100, 267 .power = 100,
257}; 268};
258 269
270static struct twl4030_usb_data omap4_usbphy_data = {
271 .phy_init = omap4430_phy_init,
272 .phy_exit = omap4430_phy_exit,
273 .phy_power = omap4430_phy_power,
274 .phy_set_clock = omap4430_phy_set_clk,
275};
276
259static struct omap2_hsmmc_info mmc[] = { 277static struct omap2_hsmmc_info mmc[] = {
260 { 278 {
261 .mmc = 1, 279 .mmc = 1,
@@ -475,6 +493,7 @@ static struct twl4030_platform_data sdp4430_twldata = {
475 .vaux1 = &sdp4430_vaux1, 493 .vaux1 = &sdp4430_vaux1,
476 .vaux2 = &sdp4430_vaux2, 494 .vaux2 = &sdp4430_vaux2,
477 .vaux3 = &sdp4430_vaux3, 495 .vaux3 = &sdp4430_vaux3,
496 .usb = &omap4_usbphy_data
478}; 497};
479 498
480static struct i2c_board_info __initdata sdp4430_i2c_boardinfo[] = { 499static struct i2c_board_info __initdata sdp4430_i2c_boardinfo[] = {
@@ -555,11 +574,15 @@ static void __init omap_4430sdp_init(void)
555 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); 574 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
556 omap_serial_init(); 575 omap_serial_init();
557 omap4_twl6030_hsmmc_init(mmc); 576 omap4_twl6030_hsmmc_init(mmc);
558 /* OMAP4 SDP uses internal transceiver so register nop transceiver */ 577
559 usb_nop_xceiv_register(); 578 /* Power on the ULPI PHY */
560 /* FIXME: allow multi-omap to boot until musb is updated for omap4 */ 579 if (gpio_is_valid(OMAP4SDP_MDM_PWR_EN_GPIO)) {
561 if (!cpu_is_omap44xx()) 580 /* FIXME: Assumes pad is already muxed for GPIO mode */
562 usb_musb_init(&musb_board_data); 581 gpio_request(OMAP4SDP_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3");
582 gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1);
583 }
584 usb_ehci_init(&ehci_pdata);
585 usb_musb_init(&musb_board_data);
563 586
564 status = omap_ethernet_init(); 587 status = omap_ethernet_init();
565 if (status) { 588 if (status) {
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 147d9005f320..f396756872b7 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -46,8 +46,7 @@ static struct device *mmc_device;
46#define TUSB6010_GPIO_ENABLE 0 46#define TUSB6010_GPIO_ENABLE 0
47#define TUSB6010_DMACHAN 0x3f 47#define TUSB6010_DMACHAN 0x3f
48 48
49#if defined(CONFIG_USB_TUSB6010) || \ 49#ifdef CONFIG_USB_MUSB_TUSB6010
50 defined(CONFIG_USB_TUSB6010_MODULE)
51/* 50/*
52 * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and 51 * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and
53 * 1.5 V voltage regulators of PM companion chip. Companion chip will then 52 * 1.5 V voltage regulators of PM companion chip. Companion chip will then
@@ -134,7 +133,7 @@ err:
134 133
135static void __init n8x0_usb_init(void) {} 134static void __init n8x0_usb_init(void) {}
136 135
137#endif /*CONFIG_USB_TUSB6010 */ 136#endif /*CONFIG_USB_MUSB_TUSB6010 */
138 137
139 138
140static struct omap2_mcspi_device_config p54spi_mcspi_config = { 139static struct omap2_mcspi_device_config p54spi_mcspi_config = {
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index b43e3ff9adec..3094e2007844 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -134,10 +134,17 @@ error1:
134 134
135static struct omap_musb_board_data musb_board_data = { 135static struct omap_musb_board_data musb_board_data = {
136 .interface_type = MUSB_INTERFACE_UTMI, 136 .interface_type = MUSB_INTERFACE_UTMI,
137 .mode = MUSB_PERIPHERAL, 137 .mode = MUSB_OTG,
138 .power = 100, 138 .power = 100,
139}; 139};
140 140
141static struct twl4030_usb_data omap4_usbphy_data = {
142 .phy_init = omap4430_phy_init,
143 .phy_exit = omap4430_phy_exit,
144 .phy_power = omap4430_phy_power,
145 .phy_set_clock = omap4430_phy_set_clk,
146};
147
141static struct omap2_hsmmc_info mmc[] = { 148static struct omap2_hsmmc_info mmc[] = {
142 { 149 {
143 .mmc = 1, 150 .mmc = 1,
@@ -347,6 +354,7 @@ static struct twl4030_platform_data omap4_panda_twldata = {
347 .vaux1 = &omap4_panda_vaux1, 354 .vaux1 = &omap4_panda_vaux1,
348 .vaux2 = &omap4_panda_vaux2, 355 .vaux2 = &omap4_panda_vaux2,
349 .vaux3 = &omap4_panda_vaux3, 356 .vaux3 = &omap4_panda_vaux3,
357 .usb = &omap4_usbphy_data,
350}; 358};
351 359
352static struct i2c_board_info __initdata omap4_panda_i2c_boardinfo[] = { 360static struct i2c_board_info __initdata omap4_panda_i2c_boardinfo[] = {
@@ -394,9 +402,7 @@ static void __init omap4_panda_init(void)
394 /* OMAP4 Panda uses internal transceiver so register nop transceiver */ 402 /* OMAP4 Panda uses internal transceiver so register nop transceiver */
395 usb_nop_xceiv_register(); 403 usb_nop_xceiv_register();
396 omap4_ehci_init(); 404 omap4_ehci_init();
397 /* FIXME: allow multi-omap to boot until musb is updated for omap4 */ 405 usb_musb_init(&musb_board_data);
398 if (!cpu_is_omap44xx())
399 usb_musb_init(&musb_board_data);
400} 406}
401 407
402static void __init omap4_panda_map_io(void) 408static void __init omap4_panda_map_io(void)
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
index ed1295f5046e..0a992bc8d0d8 100644
--- a/arch/arm/mach-omap2/clock2420_data.c
+++ b/arch/arm/mach-omap2/clock2420_data.c
@@ -1877,7 +1877,7 @@ static struct omap_clk omap2420_clks[] = {
1877 CLK("omap-aes", "ick", &aes_ick, CK_242X), 1877 CLK("omap-aes", "ick", &aes_ick, CK_242X),
1878 CLK(NULL, "pka_ick", &pka_ick, CK_242X), 1878 CLK(NULL, "pka_ick", &pka_ick, CK_242X),
1879 CLK(NULL, "usb_fck", &usb_fck, CK_242X), 1879 CLK(NULL, "usb_fck", &usb_fck, CK_242X),
1880 CLK("musb_hdrc", "fck", &osc_ck, CK_242X), 1880 CLK("musb-hdrc", "fck", &osc_ck, CK_242X),
1881}; 1881};
1882 1882
1883/* 1883/*
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c
index 38341a71c6f8..c047dcd007e5 100644
--- a/arch/arm/mach-omap2/clock2430_data.c
+++ b/arch/arm/mach-omap2/clock2430_data.c
@@ -1983,7 +1983,7 @@ static struct omap_clk omap2430_clks[] = {
1983 CLK("omap-aes", "ick", &aes_ick, CK_243X), 1983 CLK("omap-aes", "ick", &aes_ick, CK_243X),
1984 CLK(NULL, "pka_ick", &pka_ick, CK_243X), 1984 CLK(NULL, "pka_ick", &pka_ick, CK_243X),
1985 CLK(NULL, "usb_fck", &usb_fck, CK_243X), 1985 CLK(NULL, "usb_fck", &usb_fck, CK_243X),
1986 CLK("musb_hdrc", "ick", &usbhs_ick, CK_243X), 1986 CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X),
1987 CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X), 1987 CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X),
1988 CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X), 1988 CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X),
1989 CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X), 1989 CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X),
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 9ab817e6c300..d3ab1c9e50b0 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3286,6 +3286,7 @@ static struct omap_clk omap3xxx_clks[] = {
3286 CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3286 CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3287 CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3287 CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3288 CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3288 CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3289 CLK("ehci-omap.0", "usbtll_fck", &usbtll_fck, CK_3430ES2 | CK_AM35XX),
3289 CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), 3290 CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX),
3290 CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), 3291 CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX),
3291 CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), 3292 CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX),
@@ -3313,14 +3314,15 @@ static struct omap_clk omap3xxx_clks[] = {
3313 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1), 3314 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1),
3314 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es2, CK_3430ES2PLUS | CK_36XX), 3315 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es2, CK_3430ES2PLUS | CK_36XX),
3315 CLK(NULL, "core_l3_ick", &core_l3_ick, CK_3XXX), 3316 CLK(NULL, "core_l3_ick", &core_l3_ick, CK_3XXX),
3316 CLK("musb_hdrc", "ick", &hsotgusb_ick_3430es1, CK_3430ES1), 3317 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es1, CK_3430ES1),
3317 CLK("musb_hdrc", "ick", &hsotgusb_ick_3430es2, CK_3430ES2PLUS | CK_36XX), 3318 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es2, CK_3430ES2PLUS | CK_36XX),
3318 CLK(NULL, "sdrc_ick", &sdrc_ick, CK_3XXX), 3319 CLK(NULL, "sdrc_ick", &sdrc_ick, CK_3XXX),
3319 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_3XXX), 3320 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_3XXX),
3320 CLK(NULL, "security_l3_ick", &security_l3_ick, CK_34XX | CK_36XX), 3321 CLK(NULL, "security_l3_ick", &security_l3_ick, CK_34XX | CK_36XX),
3321 CLK(NULL, "pka_ick", &pka_ick, CK_34XX | CK_36XX), 3322 CLK(NULL, "pka_ick", &pka_ick, CK_34XX | CK_36XX),
3322 CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX), 3323 CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX),
3323 CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3324 CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3325 CLK("ehci-omap.0", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3324 CLK("mmci-omap-hs.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3326 CLK("mmci-omap-hs.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3325 CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX), 3327 CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX),
3326 CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX), 3328 CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX),
@@ -3366,8 +3368,11 @@ static struct omap_clk omap3xxx_clks[] = {
3366 CLK(NULL, "cam_ick", &cam_ick, CK_34XX | CK_36XX), 3368 CLK(NULL, "cam_ick", &cam_ick, CK_34XX | CK_36XX),
3367 CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX), 3369 CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX),
3368 CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3370 CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3371 CLK("ehci-omap.0", "hs_fck", &usbhost_120m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3369 CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3372 CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3373 CLK("ehci-omap.0", "fs_fck", &usbhost_48m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3370 CLK(NULL, "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3374 CLK(NULL, "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3375 CLK("ehci-omap.0", "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3371 CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2PLUS | CK_36XX), 3376 CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2PLUS | CK_36XX),
3372 CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX), 3377 CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX),
3373 CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_3XXX), 3378 CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_3XXX),
@@ -3445,8 +3450,8 @@ static struct omap_clk omap3xxx_clks[] = {
3445 CLK("davinci_emac", "phy_clk", &emac_fck, CK_AM35XX), 3450 CLK("davinci_emac", "phy_clk", &emac_fck, CK_AM35XX),
3446 CLK("vpfe-capture", "master", &vpfe_ick, CK_AM35XX), 3451 CLK("vpfe-capture", "master", &vpfe_ick, CK_AM35XX),
3447 CLK("vpfe-capture", "slave", &vpfe_fck, CK_AM35XX), 3452 CLK("vpfe-capture", "slave", &vpfe_fck, CK_AM35XX),
3448 CLK("musb_hdrc", "ick", &hsotgusb_ick_am35xx, CK_AM35XX), 3453 CLK("musb-am35x", "ick", &hsotgusb_ick_am35xx, CK_AM35XX),
3449 CLK("musb_hdrc", "fck", &hsotgusb_fck_am35xx, CK_AM35XX), 3454 CLK("musb-am35x", "fck", &hsotgusb_fck_am35xx, CK_AM35XX),
3450 CLK(NULL, "hecc_ck", &hecc_ck, CK_AM35XX), 3455 CLK(NULL, "hecc_ck", &hecc_ck, CK_AM35XX),
3451 CLK(NULL, "uart4_ick", &uart4_ick_am35xx, CK_AM35XX), 3456 CLK(NULL, "uart4_ick", &uart4_ick_am35xx, CK_AM35XX),
3452}; 3457};
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index c426adccad06..e8cb32fd7f13 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -3198,6 +3198,7 @@ static struct omap_clk omap44xx_clks[] = {
3198 CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), 3198 CLK(NULL, "uart3_fck", &uart3_fck, CK_443X),
3199 CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), 3199 CLK(NULL, "uart4_fck", &uart4_fck, CK_443X),
3200 CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X), 3200 CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X),
3201 CLK("ehci-omap.0", "fs_fck", &usb_host_fs_fck, CK_443X),
3201 CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X), 3202 CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X),
3202 CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X), 3203 CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X),
3203 CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X), 3204 CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X),
@@ -3209,14 +3210,18 @@ static struct omap_clk omap44xx_clks[] = {
3209 CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X), 3210 CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X),
3210 CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X), 3211 CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X),
3211 CLK(NULL, "usb_host_hs_fck", &usb_host_hs_fck, CK_443X), 3212 CLK(NULL, "usb_host_hs_fck", &usb_host_hs_fck, CK_443X),
3213 CLK("ehci-omap.0", "hs_fck", &usb_host_hs_fck, CK_443X),
3214 CLK("ehci-omap.0", "usbhost_ick", &dummy_ck, CK_443X),
3212 CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), 3215 CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X),
3213 CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), 3216 CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X),
3214 CLK("musb_hdrc", "ick", &usb_otg_hs_ick, CK_443X), 3217 CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X),
3215 CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X), 3218 CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X),
3216 CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), 3219 CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X),
3217 CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), 3220 CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X),
3218 CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), 3221 CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X),
3219 CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X), 3222 CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X),
3223 CLK("ehci-omap.0", "usbtll_ick", &usb_tll_hs_ick, CK_443X),
3224 CLK("ehci-omap.0", "usbtll_fck", &dummy_ck, CK_443X),
3220 CLK(NULL, "usim_ck", &usim_ck, CK_443X), 3225 CLK(NULL, "usim_ck", &usim_ck, CK_443X),
3221 CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), 3226 CLK(NULL, "usim_fclk", &usim_fclk, CK_443X),
3222 CLK(NULL, "usim_fck", &usim_fck, CK_443X), 3227 CLK(NULL, "usim_fck", &usim_fck, CK_443X),
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c
new file mode 100644
index 000000000000..745252c60e32
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_phy_internal.c
@@ -0,0 +1,149 @@
1/*
2 * This file configures the internal USB PHY in OMAP4430. Used
3 * with TWL6030 transceiver and MUSB on OMAP4430.
4 *
5 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * Author: Hema HK <hemahk@ti.com>
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 *
22 */
23
24#include <linux/types.h>
25#include <linux/delay.h>
26#include <linux/clk.h>
27#include <linux/io.h>
28#include <linux/err.h>
29#include <linux/usb.h>
30
31#include <plat/usb.h>
32
33/* OMAP control module register for UTMI PHY */
34#define CONTROL_DEV_CONF 0x300
35#define PHY_PD 0x1
36
37#define USBOTGHS_CONTROL 0x33c
38#define AVALID BIT(0)
39#define BVALID BIT(1)
40#define VBUSVALID BIT(2)
41#define SESSEND BIT(3)
42#define IDDIG BIT(4)
43
44static struct clk *phyclk, *clk48m, *clk32k;
45static void __iomem *ctrl_base;
46
47int omap4430_phy_init(struct device *dev)
48{
49 ctrl_base = ioremap(OMAP443X_SCM_BASE, SZ_1K);
50 if (!ctrl_base) {
51 dev_err(dev, "control module ioremap failed\n");
52 return -ENOMEM;
53 }
54 /* Power down the phy */
55 __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
56 phyclk = clk_get(dev, "ocp2scp_usb_phy_ick");
57
58 if (IS_ERR(phyclk)) {
59 dev_err(dev, "cannot clk_get ocp2scp_usb_phy_ick\n");
60 iounmap(ctrl_base);
61 return PTR_ERR(phyclk);
62 }
63
64 clk48m = clk_get(dev, "ocp2scp_usb_phy_phy_48m");
65 if (IS_ERR(clk48m)) {
66 dev_err(dev, "cannot clk_get ocp2scp_usb_phy_phy_48m\n");
67 clk_put(phyclk);
68 iounmap(ctrl_base);
69 return PTR_ERR(clk48m);
70 }
71
72 clk32k = clk_get(dev, "usb_phy_cm_clk32k");
73 if (IS_ERR(clk32k)) {
74 dev_err(dev, "cannot clk_get usb_phy_cm_clk32k\n");
75 clk_put(phyclk);
76 clk_put(clk48m);
77 iounmap(ctrl_base);
78 return PTR_ERR(clk32k);
79 }
80 return 0;
81}
82
83int omap4430_phy_set_clk(struct device *dev, int on)
84{
85 static int state;
86
87 if (on && !state) {
88 /* Enable the phy clocks */
89 clk_enable(phyclk);
90 clk_enable(clk48m);
91 clk_enable(clk32k);
92 state = 1;
93 } else if (state) {
94 /* Disable the phy clocks */
95 clk_disable(phyclk);
96 clk_disable(clk48m);
97 clk_disable(clk32k);
98 state = 0;
99 }
100 return 0;
101}
102
103int omap4430_phy_power(struct device *dev, int ID, int on)
104{
105 if (on) {
106 /* enabled the clocks */
107 omap4430_phy_set_clk(dev, 1);
108 /* power on the phy */
109 if (__raw_readl(ctrl_base + CONTROL_DEV_CONF) & PHY_PD) {
110 __raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF);
111 mdelay(200);
112 }
113 if (ID)
114 /* enable VBUS valid, IDDIG groung */
115 __raw_writel(AVALID | VBUSVALID, ctrl_base +
116 USBOTGHS_CONTROL);
117 else
118 /*
119 * Enable VBUS Valid, AValid and IDDIG
120 * high impedence
121 */
122 __raw_writel(IDDIG | AVALID | VBUSVALID,
123 ctrl_base + USBOTGHS_CONTROL);
124 } else {
125 /* Enable session END and IDIG to high impedence. */
126 __raw_writel(SESSEND | IDDIG, ctrl_base +
127 USBOTGHS_CONTROL);
128 /* Disable the clocks */
129 omap4430_phy_set_clk(dev, 0);
130 /* Power down the phy */
131 __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
132 }
133
134 return 0;
135}
136
137int omap4430_phy_exit(struct device *dev)
138{
139 if (ctrl_base)
140 iounmap(ctrl_base);
141 if (phyclk)
142 clk_put(phyclk);
143 if (clk48m)
144 clk_put(clk48m);
145 if (clk32k)
146 clk_put(clk32k);
147
148 return 0;
149}
diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c
index b11bf385d360..25eeadabc39b 100644
--- a/arch/arm/mach-omap2/usb-ehci.c
+++ b/arch/arm/mach-omap2/usb-ehci.c
@@ -34,22 +34,15 @@
34 34
35static struct resource ehci_resources[] = { 35static struct resource ehci_resources[] = {
36 { 36 {
37 .start = OMAP34XX_EHCI_BASE,
38 .end = OMAP34XX_EHCI_BASE + SZ_1K - 1,
39 .flags = IORESOURCE_MEM, 37 .flags = IORESOURCE_MEM,
40 }, 38 },
41 { 39 {
42 .start = OMAP34XX_UHH_CONFIG_BASE,
43 .end = OMAP34XX_UHH_CONFIG_BASE + SZ_1K - 1,
44 .flags = IORESOURCE_MEM, 40 .flags = IORESOURCE_MEM,
45 }, 41 },
46 { 42 {
47 .start = OMAP34XX_USBTLL_BASE,
48 .end = OMAP34XX_USBTLL_BASE + SZ_4K - 1,
49 .flags = IORESOURCE_MEM, 43 .flags = IORESOURCE_MEM,
50 }, 44 },
51 { /* general IRQ */ 45 { /* general IRQ */
52 .start = INT_34XX_EHCI_IRQ,
53 .flags = IORESOURCE_IRQ, 46 .flags = IORESOURCE_IRQ,
54 } 47 }
55}; 48};
@@ -214,13 +207,148 @@ static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
214 return; 207 return;
215} 208}
216 209
210static void setup_4430ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode)
211{
212 switch (port_mode[0]) {
213 case EHCI_HCD_OMAP_MODE_PHY:
214 omap_mux_init_signal("usbb1_ulpiphy_stp",
215 OMAP_PIN_OUTPUT);
216 omap_mux_init_signal("usbb1_ulpiphy_clk",
217 OMAP_PIN_INPUT_PULLDOWN);
218 omap_mux_init_signal("usbb1_ulpiphy_dir",
219 OMAP_PIN_INPUT_PULLDOWN);
220 omap_mux_init_signal("usbb1_ulpiphy_nxt",
221 OMAP_PIN_INPUT_PULLDOWN);
222 omap_mux_init_signal("usbb1_ulpiphy_dat0",
223 OMAP_PIN_INPUT_PULLDOWN);
224 omap_mux_init_signal("usbb1_ulpiphy_dat1",
225 OMAP_PIN_INPUT_PULLDOWN);
226 omap_mux_init_signal("usbb1_ulpiphy_dat2",
227 OMAP_PIN_INPUT_PULLDOWN);
228 omap_mux_init_signal("usbb1_ulpiphy_dat3",
229 OMAP_PIN_INPUT_PULLDOWN);
230 omap_mux_init_signal("usbb1_ulpiphy_dat4",
231 OMAP_PIN_INPUT_PULLDOWN);
232 omap_mux_init_signal("usbb1_ulpiphy_dat5",
233 OMAP_PIN_INPUT_PULLDOWN);
234 omap_mux_init_signal("usbb1_ulpiphy_dat6",
235 OMAP_PIN_INPUT_PULLDOWN);
236 omap_mux_init_signal("usbb1_ulpiphy_dat7",
237 OMAP_PIN_INPUT_PULLDOWN);
238 break;
239 case EHCI_HCD_OMAP_MODE_TLL:
240 omap_mux_init_signal("usbb1_ulpitll_stp",
241 OMAP_PIN_INPUT_PULLUP);
242 omap_mux_init_signal("usbb1_ulpitll_clk",
243 OMAP_PIN_INPUT_PULLDOWN);
244 omap_mux_init_signal("usbb1_ulpitll_dir",
245 OMAP_PIN_INPUT_PULLDOWN);
246 omap_mux_init_signal("usbb1_ulpitll_nxt",
247 OMAP_PIN_INPUT_PULLDOWN);
248 omap_mux_init_signal("usbb1_ulpitll_dat0",
249 OMAP_PIN_INPUT_PULLDOWN);
250 omap_mux_init_signal("usbb1_ulpitll_dat1",
251 OMAP_PIN_INPUT_PULLDOWN);
252 omap_mux_init_signal("usbb1_ulpitll_dat2",
253 OMAP_PIN_INPUT_PULLDOWN);
254 omap_mux_init_signal("usbb1_ulpitll_dat3",
255 OMAP_PIN_INPUT_PULLDOWN);
256 omap_mux_init_signal("usbb1_ulpitll_dat4",
257 OMAP_PIN_INPUT_PULLDOWN);
258 omap_mux_init_signal("usbb1_ulpitll_dat5",
259 OMAP_PIN_INPUT_PULLDOWN);
260 omap_mux_init_signal("usbb1_ulpitll_dat6",
261 OMAP_PIN_INPUT_PULLDOWN);
262 omap_mux_init_signal("usbb1_ulpitll_dat7",
263 OMAP_PIN_INPUT_PULLDOWN);
264 break;
265 case EHCI_HCD_OMAP_MODE_UNKNOWN:
266 default:
267 break;
268 }
269 switch (port_mode[1]) {
270 case EHCI_HCD_OMAP_MODE_PHY:
271 omap_mux_init_signal("usbb2_ulpiphy_stp",
272 OMAP_PIN_OUTPUT);
273 omap_mux_init_signal("usbb2_ulpiphy_clk",
274 OMAP_PIN_INPUT_PULLDOWN);
275 omap_mux_init_signal("usbb2_ulpiphy_dir",
276 OMAP_PIN_INPUT_PULLDOWN);
277 omap_mux_init_signal("usbb2_ulpiphy_nxt",
278 OMAP_PIN_INPUT_PULLDOWN);
279 omap_mux_init_signal("usbb2_ulpiphy_dat0",
280 OMAP_PIN_INPUT_PULLDOWN);
281 omap_mux_init_signal("usbb2_ulpiphy_dat1",
282 OMAP_PIN_INPUT_PULLDOWN);
283 omap_mux_init_signal("usbb2_ulpiphy_dat2",
284 OMAP_PIN_INPUT_PULLDOWN);
285 omap_mux_init_signal("usbb2_ulpiphy_dat3",
286 OMAP_PIN_INPUT_PULLDOWN);
287 omap_mux_init_signal("usbb2_ulpiphy_dat4",
288 OMAP_PIN_INPUT_PULLDOWN);
289 omap_mux_init_signal("usbb2_ulpiphy_dat5",
290 OMAP_PIN_INPUT_PULLDOWN);
291 omap_mux_init_signal("usbb2_ulpiphy_dat6",
292 OMAP_PIN_INPUT_PULLDOWN);
293 omap_mux_init_signal("usbb2_ulpiphy_dat7",
294 OMAP_PIN_INPUT_PULLDOWN);
295 break;
296 case EHCI_HCD_OMAP_MODE_TLL:
297 omap_mux_init_signal("usbb2_ulpitll_stp",
298 OMAP_PIN_INPUT_PULLUP);
299 omap_mux_init_signal("usbb2_ulpitll_clk",
300 OMAP_PIN_INPUT_PULLDOWN);
301 omap_mux_init_signal("usbb2_ulpitll_dir",
302 OMAP_PIN_INPUT_PULLDOWN);
303 omap_mux_init_signal("usbb2_ulpitll_nxt",
304 OMAP_PIN_INPUT_PULLDOWN);
305 omap_mux_init_signal("usbb2_ulpitll_dat0",
306 OMAP_PIN_INPUT_PULLDOWN);
307 omap_mux_init_signal("usbb2_ulpitll_dat1",
308 OMAP_PIN_INPUT_PULLDOWN);
309 omap_mux_init_signal("usbb2_ulpitll_dat2",
310 OMAP_PIN_INPUT_PULLDOWN);
311 omap_mux_init_signal("usbb2_ulpitll_dat3",
312 OMAP_PIN_INPUT_PULLDOWN);
313 omap_mux_init_signal("usbb2_ulpitll_dat4",
314 OMAP_PIN_INPUT_PULLDOWN);
315 omap_mux_init_signal("usbb2_ulpitll_dat5",
316 OMAP_PIN_INPUT_PULLDOWN);
317 omap_mux_init_signal("usbb2_ulpitll_dat6",
318 OMAP_PIN_INPUT_PULLDOWN);
319 omap_mux_init_signal("usbb2_ulpitll_dat7",
320 OMAP_PIN_INPUT_PULLDOWN);
321 break;
322 case EHCI_HCD_OMAP_MODE_UNKNOWN:
323 default:
324 break;
325 }
326}
327
217void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata) 328void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata)
218{ 329{
219 platform_device_add_data(&ehci_device, pdata, sizeof(*pdata)); 330 platform_device_add_data(&ehci_device, pdata, sizeof(*pdata));
220 331
221 /* Setup Pin IO MUX for EHCI */ 332 /* Setup Pin IO MUX for EHCI */
222 if (cpu_is_omap34xx()) 333 if (cpu_is_omap34xx()) {
334 ehci_resources[0].start = OMAP34XX_EHCI_BASE;
335 ehci_resources[0].end = OMAP34XX_EHCI_BASE + SZ_1K - 1;
336 ehci_resources[1].start = OMAP34XX_UHH_CONFIG_BASE;
337 ehci_resources[1].end = OMAP34XX_UHH_CONFIG_BASE + SZ_1K - 1;
338 ehci_resources[2].start = OMAP34XX_USBTLL_BASE;
339 ehci_resources[2].end = OMAP34XX_USBTLL_BASE + SZ_4K - 1;
340 ehci_resources[3].start = INT_34XX_EHCI_IRQ;
223 setup_ehci_io_mux(pdata->port_mode); 341 setup_ehci_io_mux(pdata->port_mode);
342 } else if (cpu_is_omap44xx()) {
343 ehci_resources[0].start = OMAP44XX_HSUSB_EHCI_BASE;
344 ehci_resources[0].end = OMAP44XX_HSUSB_EHCI_BASE + SZ_1K - 1;
345 ehci_resources[1].start = OMAP44XX_UHH_CONFIG_BASE;
346 ehci_resources[1].end = OMAP44XX_UHH_CONFIG_BASE + SZ_2K - 1;
347 ehci_resources[2].start = OMAP44XX_USBTLL_BASE;
348 ehci_resources[2].end = OMAP44XX_USBTLL_BASE + SZ_4K - 1;
349 ehci_resources[3].start = OMAP44XX_IRQ_EHCI;
350 setup_4430ehci_io_mux(pdata->port_mode);
351 }
224 352
225 if (platform_device_register(&ehci_device) < 0) { 353 if (platform_device_register(&ehci_device) < 0) {
226 printk(KERN_ERR "Unable to register HS-USB (EHCI) device\n"); 354 printk(KERN_ERR "Unable to register HS-USB (EHCI) device\n");
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index 72605584bfff..5298949d4b11 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -30,8 +30,101 @@
30#include <mach/irqs.h> 30#include <mach/irqs.h>
31#include <mach/am35xx.h> 31#include <mach/am35xx.h>
32#include <plat/usb.h> 32#include <plat/usb.h>
33#include "control.h"
33 34
34#ifdef CONFIG_USB_MUSB_SOC 35#if defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined (CONFIG_USB_MUSB_AM35X)
36
37static void am35x_musb_reset(void)
38{
39 u32 regval;
40
41 /* Reset the musb interface */
42 regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
43
44 regval |= AM35XX_USBOTGSS_SW_RST;
45 omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET);
46
47 regval &= ~AM35XX_USBOTGSS_SW_RST;
48 omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET);
49
50 regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
51}
52
53static void am35x_musb_phy_power(u8 on)
54{
55 unsigned long timeout = jiffies + msecs_to_jiffies(100);
56 u32 devconf2;
57
58 if (on) {
59 /*
60 * Start the on-chip PHY and its PLL.
61 */
62 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);
63
64 devconf2 &= ~(CONF2_RESET | CONF2_PHYPWRDN | CONF2_OTGPWRDN);
65 devconf2 |= CONF2_PHY_PLLON;
66
67 omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2);
68
69 pr_info(KERN_INFO "Waiting for PHY clock good...\n");
70 while (!(omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2)
71 & CONF2_PHYCLKGD)) {
72 cpu_relax();
73
74 if (time_after(jiffies, timeout)) {
75 pr_err(KERN_ERR "musb PHY clock good timed out\n");
76 break;
77 }
78 }
79 } else {
80 /*
81 * Power down the on-chip PHY.
82 */
83 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);
84
85 devconf2 &= ~CONF2_PHY_PLLON;
86 devconf2 |= CONF2_PHYPWRDN | CONF2_OTGPWRDN;
87 omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2);
88 }
89}
90
91static void am35x_musb_clear_irq(void)
92{
93 u32 regval;
94
95 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
96 regval |= AM35XX_USBOTGSS_INT_CLR;
97 omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
98 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
99}
100
101static void am35x_musb_set_mode(u8 musb_mode)
102{
103 u32 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);
104
105 devconf2 &= ~CONF2_OTGMODE;
106 switch (musb_mode) {
107#ifdef CONFIG_USB_MUSB_HDRC_HCD
108 case MUSB_HOST: /* Force VBUS valid, ID = 0 */
109 devconf2 |= CONF2_FORCE_HOST;
110 break;
111#endif
112#ifdef CONFIG_USB_GADGET_MUSB_HDRC
113 case MUSB_PERIPHERAL: /* Force VBUS valid, ID = 1 */
114 devconf2 |= CONF2_FORCE_DEVICE;
115 break;
116#endif
117#ifdef CONFIG_USB_MUSB_OTG
118 case MUSB_OTG: /* Don't override the VBUS/ID comparators */
119 devconf2 |= CONF2_NO_OVERRIDE;
120 break;
121#endif
122 default:
123 pr_info(KERN_INFO "Unsupported mode %u\n", musb_mode);
124 }
125
126 omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2);
127}
35 128
36static struct resource musb_resources[] = { 129static struct resource musb_resources[] = {
37 [0] = { /* start and end set dynamically */ 130 [0] = { /* start and end set dynamically */
@@ -40,10 +133,12 @@ static struct resource musb_resources[] = {
40 [1] = { /* general IRQ */ 133 [1] = { /* general IRQ */
41 .start = INT_243X_HS_USB_MC, 134 .start = INT_243X_HS_USB_MC,
42 .flags = IORESOURCE_IRQ, 135 .flags = IORESOURCE_IRQ,
136 .name = "mc",
43 }, 137 },
44 [2] = { /* DMA IRQ */ 138 [2] = { /* DMA IRQ */
45 .start = INT_243X_HS_USB_DMA, 139 .start = INT_243X_HS_USB_DMA,
46 .flags = IORESOURCE_IRQ, 140 .flags = IORESOURCE_IRQ,
141 .name = "dma",
47 }, 142 },
48}; 143};
49 144
@@ -75,7 +170,7 @@ static struct musb_hdrc_platform_data musb_plat = {
75static u64 musb_dmamask = DMA_BIT_MASK(32); 170static u64 musb_dmamask = DMA_BIT_MASK(32);
76 171
77static struct platform_device musb_device = { 172static struct platform_device musb_device = {
78 .name = "musb_hdrc", 173 .name = "musb-omap2430",
79 .id = -1, 174 .id = -1,
80 .dev = { 175 .dev = {
81 .dma_mask = &musb_dmamask, 176 .dma_mask = &musb_dmamask,
@@ -91,8 +186,13 @@ void __init usb_musb_init(struct omap_musb_board_data *board_data)
91 if (cpu_is_omap243x()) { 186 if (cpu_is_omap243x()) {
92 musb_resources[0].start = OMAP243X_HS_BASE; 187 musb_resources[0].start = OMAP243X_HS_BASE;
93 } else if (cpu_is_omap3517() || cpu_is_omap3505()) { 188 } else if (cpu_is_omap3517() || cpu_is_omap3505()) {
189 musb_device.name = "musb-am35x";
94 musb_resources[0].start = AM35XX_IPSS_USBOTGSS_BASE; 190 musb_resources[0].start = AM35XX_IPSS_USBOTGSS_BASE;
95 musb_resources[1].start = INT_35XX_USBOTG_IRQ; 191 musb_resources[1].start = INT_35XX_USBOTG_IRQ;
192 board_data->set_phy_power = am35x_musb_phy_power;
193 board_data->clear_irq = am35x_musb_clear_irq;
194 board_data->set_mode = am35x_musb_set_mode;
195 board_data->reset = am35x_musb_reset;
96 } else if (cpu_is_omap34xx()) { 196 } else if (cpu_is_omap34xx()) {
97 musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE; 197 musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE;
98 } else if (cpu_is_omap44xx()) { 198 } else if (cpu_is_omap44xx()) {
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
index 30f112bd3e4d..8a3c05f3c1d6 100644
--- a/arch/arm/mach-omap2/usb-tusb6010.c
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -224,7 +224,7 @@ static struct resource tusb_resources[] = {
224static u64 tusb_dmamask = ~(u32)0; 224static u64 tusb_dmamask = ~(u32)0;
225 225
226static struct platform_device tusb_device = { 226static struct platform_device tusb_device = {
227 .name = "musb_hdrc", 227 .name = "musb-tusb",
228 .id = -1, 228 .id = -1,
229 .dev = { 229 .dev = {
230 .dma_mask = &tusb_dmamask, 230 .dma_mask = &tusb_dmamask,
diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h b/arch/arm/plat-omap/include/plat/omap44xx.h
index 8b3f12ff5cbc..ea2b8a6306e7 100644
--- a/arch/arm/plat-omap/include/plat/omap44xx.h
+++ b/arch/arm/plat-omap/include/plat/omap44xx.h
@@ -52,5 +52,10 @@
52#define OMAP4_MMU1_BASE 0x55082000 52#define OMAP4_MMU1_BASE 0x55082000
53#define OMAP4_MMU2_BASE 0x4A066000 53#define OMAP4_MMU2_BASE 0x4A066000
54 54
55#define OMAP44XX_USBTLL_BASE (L4_44XX_BASE + 0x62000)
56#define OMAP44XX_UHH_CONFIG_BASE (L4_44XX_BASE + 0x64000)
57#define OMAP44XX_HSUSB_OHCI_BASE (L4_44XX_BASE + 0x64800)
58#define OMAP44XX_HSUSB_EHCI_BASE (L4_44XX_BASE + 0x64C00)
59
55#endif /* __ASM_ARCH_OMAP44XX_H */ 60#endif /* __ASM_ARCH_OMAP44XX_H */
56 61
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
index 59c7fe731f28..450a332f1009 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
@@ -11,6 +11,7 @@ enum ehci_hcd_omap_mode {
11 EHCI_HCD_OMAP_MODE_UNKNOWN, 11 EHCI_HCD_OMAP_MODE_UNKNOWN,
12 EHCI_HCD_OMAP_MODE_PHY, 12 EHCI_HCD_OMAP_MODE_PHY,
13 EHCI_HCD_OMAP_MODE_TLL, 13 EHCI_HCD_OMAP_MODE_TLL,
14 EHCI_HCD_OMAP_MODE_HSIC,
14}; 15};
15 16
16enum ohci_omap3_port_mode { 17enum ohci_omap3_port_mode {
@@ -69,6 +70,10 @@ struct omap_musb_board_data {
69 u8 mode; 70 u8 mode;
70 u16 power; 71 u16 power;
71 unsigned extvbus:1; 72 unsigned extvbus:1;
73 void (*set_phy_power)(u8 on);
74 void (*clear_irq)(void);
75 void (*set_mode)(u8 mode);
76 void (*reset)(void);
72}; 77};
73 78
74enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; 79enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
@@ -79,6 +84,11 @@ extern void usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata);
79 84
80extern void usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata); 85extern void usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata);
81 86
87extern int omap4430_phy_power(struct device *dev, int ID, int on);
88extern int omap4430_phy_set_clk(struct device *dev, int on);
89extern int omap4430_phy_init(struct device *dev);
90extern int omap4430_phy_exit(struct device *dev);
91
82#endif 92#endif
83 93
84 94
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index fc767ac76381..52295fff5577 100644
--- a/arch/blackfin/mach-bf527/boards/ad7160eval.c
+++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c
@@ -83,7 +83,7 @@ static struct musb_hdrc_platform_data musb_plat = {
83static u64 musb_dmamask = ~(u32)0; 83static u64 musb_dmamask = ~(u32)0;
84 84
85static struct platform_device musb_device = { 85static struct platform_device musb_device = {
86 .name = "musb_hdrc", 86 .name = "musb-blackfin",
87 .id = 0, 87 .id = 0,
88 .dev = { 88 .dev = {
89 .dma_mask = &musb_dmamask, 89 .dma_mask = &musb_dmamask,
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 2c31af7a320a..50533edc3994 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -82,11 +82,13 @@ static struct resource musb_resources[] = {
82 .start = IRQ_USB_INT0, 82 .start = IRQ_USB_INT0,
83 .end = IRQ_USB_INT0, 83 .end = IRQ_USB_INT0,
84 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 84 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
85 .name = "mc"
85 }, 86 },
86 [2] = { /* DMA IRQ */ 87 [2] = { /* DMA IRQ */
87 .start = IRQ_USB_DMA, 88 .start = IRQ_USB_DMA,
88 .end = IRQ_USB_DMA, 89 .end = IRQ_USB_DMA,
89 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 90 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
91 .name = "dma"
90 }, 92 },
91}; 93};
92 94
@@ -118,7 +120,7 @@ static struct musb_hdrc_platform_data musb_plat = {
118static u64 musb_dmamask = ~(u32)0; 120static u64 musb_dmamask = ~(u32)0;
119 121
120static struct platform_device musb_device = { 122static struct platform_device musb_device = {
121 .name = "musb_hdrc", 123 .name = "musb-blackfin",
122 .id = 0, 124 .id = 0,
123 .dev = { 125 .dev = {
124 .dma_mask = &musb_dmamask, 126 .dma_mask = &musb_dmamask,
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 9a736a850c5c..d06177b5fe22 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -46,11 +46,13 @@ static struct resource musb_resources[] = {
46 .start = IRQ_USB_INT0, 46 .start = IRQ_USB_INT0,
47 .end = IRQ_USB_INT0, 47 .end = IRQ_USB_INT0,
48 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 48 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
49 .name = "mc"
49 }, 50 },
50 [2] = { /* DMA IRQ */ 51 [2] = { /* DMA IRQ */
51 .start = IRQ_USB_DMA, 52 .start = IRQ_USB_DMA,
52 .end = IRQ_USB_DMA, 53 .end = IRQ_USB_DMA,
53 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 54 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
55 .name = "dma"
54 }, 56 },
55}; 57};
56 58
@@ -82,7 +84,7 @@ static struct musb_hdrc_platform_data musb_plat = {
82static u64 musb_dmamask = ~(u32)0; 84static u64 musb_dmamask = ~(u32)0;
83 85
84static struct platform_device musb_device = { 86static struct platform_device musb_device = {
85 .name = "musb_hdrc", 87 .name = "musb-blackfin",
86 .id = 0, 88 .id = 0,
87 .dev = { 89 .dev = {
88 .dma_mask = &musb_dmamask, 90 .dma_mask = &musb_dmamask,
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 9222bc00bbd3..35a88a5a5013 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -86,11 +86,13 @@ static struct resource musb_resources[] = {
86 .start = IRQ_USB_INT0, 86 .start = IRQ_USB_INT0,
87 .end = IRQ_USB_INT0, 87 .end = IRQ_USB_INT0,
88 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 88 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
89 .name = "mc"
89 }, 90 },
90 [2] = { /* DMA IRQ */ 91 [2] = { /* DMA IRQ */
91 .start = IRQ_USB_DMA, 92 .start = IRQ_USB_DMA,
92 .end = IRQ_USB_DMA, 93 .end = IRQ_USB_DMA,
93 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 94 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
95 .name = "dma"
94 }, 96 },
95}; 97};
96 98
@@ -122,7 +124,7 @@ static struct musb_hdrc_platform_data musb_plat = {
122static u64 musb_dmamask = ~(u32)0; 124static u64 musb_dmamask = ~(u32)0;
123 125
124static struct platform_device musb_device = { 126static struct platform_device musb_device = {
125 .name = "musb_hdrc", 127 .name = "musb-blackfin",
126 .id = 0, 128 .id = 0,
127 .dev = { 129 .dev = {
128 .dma_mask = &musb_dmamask, 130 .dma_mask = &musb_dmamask,
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 9ec575729e2c..130861bd2589 100644
--- a/arch/blackfin/mach-bf527/boards/tll6527m.c
+++ b/arch/blackfin/mach-bf527/boards/tll6527m.c
@@ -91,7 +91,7 @@ static struct musb_hdrc_platform_data musb_plat = {
91static u64 musb_dmamask = ~(u32)0; 91static u64 musb_dmamask = ~(u32)0;
92 92
93static struct platform_device musb_device = { 93static struct platform_device musb_device = {
94 .name = "musb_hdrc", 94 .name = "musb-blackfin",
95 .id = 0, 95 .id = 0,
96 .dev = { 96 .dev = {
97 .dma_mask = &musb_dmamask, 97 .dma_mask = &musb_dmamask,
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index f0c0eef95ba8..4c2ee6789099 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -482,11 +482,13 @@ static struct resource musb_resources[] = {
482 .start = IRQ_USB_INT0, 482 .start = IRQ_USB_INT0,
483 .end = IRQ_USB_INT0, 483 .end = IRQ_USB_INT0,
484 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 484 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
485 .name = "mc"
485 }, 486 },
486 [2] = { /* DMA IRQ */ 487 [2] = { /* DMA IRQ */
487 .start = IRQ_USB_DMA, 488 .start = IRQ_USB_DMA,
488 .end = IRQ_USB_DMA, 489 .end = IRQ_USB_DMA,
489 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 490 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
491 .name = "dma"
490 }, 492 },
491}; 493};
492 494
@@ -518,7 +520,7 @@ static struct musb_hdrc_platform_data musb_plat = {
518static u64 musb_dmamask = ~(u32)0; 520static u64 musb_dmamask = ~(u32)0;
519 521
520static struct platform_device musb_device = { 522static struct platform_device musb_device = {
521 .name = "musb_hdrc", 523 .name = "musb-blackfin",
522 .id = 0, 524 .id = 0,
523 .dev = { 525 .dev = {
524 .dma_mask = &musb_dmamask, 526 .dma_mask = &musb_dmamask,
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 216e26999af9..4f03fbc4c9be 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -587,11 +587,13 @@ static struct resource musb_resources[] = {
587 .start = IRQ_USB_INT0, 587 .start = IRQ_USB_INT0,
588 .end = IRQ_USB_INT0, 588 .end = IRQ_USB_INT0,
589 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 589 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
590 .name = "mc"
590 }, 591 },
591 [2] = { /* DMA IRQ */ 592 [2] = { /* DMA IRQ */
592 .start = IRQ_USB_DMA, 593 .start = IRQ_USB_DMA,
593 .end = IRQ_USB_DMA, 594 .end = IRQ_USB_DMA,
594 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 595 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
596 .name = "dma"
595 }, 597 },
596}; 598};
597 599
@@ -623,7 +625,7 @@ static struct musb_hdrc_platform_data musb_plat = {
623static u64 musb_dmamask = ~(u32)0; 625static u64 musb_dmamask = ~(u32)0;
624 626
625static struct platform_device musb_device = { 627static struct platform_device musb_device = {
626 .name = "musb_hdrc", 628 .name = "musb-blackfin",
627 .id = 0, 629 .id = 0,
628 .dev = { 630 .dev = {
629 .dma_mask = &musb_dmamask, 631 .dma_mask = &musb_dmamask,
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index e9e71120040c..fff252209f63 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -349,6 +349,7 @@ config CPU_SUBTYPE_SH7720
349 select CPU_HAS_DSP 349 select CPU_HAS_DSP
350 select SYS_SUPPORTS_CMT 350 select SYS_SUPPORTS_CMT
351 select ARCH_WANT_OPTIONAL_GPIOLIB 351 select ARCH_WANT_OPTIONAL_GPIOLIB
352 select USB_ARCH_HAS_OHCI
352 help 353 help
353 Select SH7720 if you have a SH3-DSP SH7720 CPU. 354 Select SH7720 if you have a SH3-DSP SH7720 CPU.
354 355
@@ -357,6 +358,7 @@ config CPU_SUBTYPE_SH7721
357 select CPU_SH3 358 select CPU_SH3
358 select CPU_HAS_DSP 359 select CPU_HAS_DSP
359 select SYS_SUPPORTS_CMT 360 select SYS_SUPPORTS_CMT
361 select USB_ARCH_HAS_OHCI
360 help 362 help
361 Select SH7721 if you have a SH3-DSP SH7721 CPU. 363 Select SH7721 if you have a SH3-DSP SH7721 CPU.
362 364
@@ -437,6 +439,7 @@ config CPU_SUBTYPE_SH7757
437config CPU_SUBTYPE_SH7763 439config CPU_SUBTYPE_SH7763
438 bool "Support SH7763 processor" 440 bool "Support SH7763 processor"
439 select CPU_SH4A 441 select CPU_SH4A
442 select USB_ARCH_HAS_OHCI
440 help 443 help
441 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU. 444 Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
442 445
@@ -463,6 +466,8 @@ config CPU_SUBTYPE_SH7786
463 select CPU_HAS_PTEAEX 466 select CPU_HAS_PTEAEX
464 select GENERIC_CLOCKEVENTS_BROADCAST if SMP 467 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
465 select ARCH_WANT_OPTIONAL_GPIOLIB 468 select ARCH_WANT_OPTIONAL_GPIOLIB
469 select USB_ARCH_HAS_OHCI
470 select USB_ARCH_HAS_EHCI
466 471
467config CPU_SUBTYPE_SHX3 472config CPU_SUBTYPE_SHX3
468 bool "Support SH-X3 processor" 473 bool "Support SH-X3 processor"
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
index c016c0004714..0170dbda1d00 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
@@ -522,10 +522,37 @@ static struct platform_device dma0_device = {
522 }, 522 },
523}; 523};
524 524
525#define USB_EHCI_START 0xffe70000
526#define USB_OHCI_START 0xffe70400
527
528static struct resource usb_ehci_resources[] = {
529 [0] = {
530 .start = USB_EHCI_START,
531 .end = USB_EHCI_START + 0x3ff,
532 .flags = IORESOURCE_MEM,
533 },
534 [1] = {
535 .start = 77,
536 .end = 77,
537 .flags = IORESOURCE_IRQ,
538 },
539};
540
541static struct platform_device usb_ehci_device = {
542 .name = "sh_ehci",
543 .id = -1,
544 .dev = {
545 .dma_mask = &usb_ehci_device.dev.coherent_dma_mask,
546 .coherent_dma_mask = DMA_BIT_MASK(32),
547 },
548 .num_resources = ARRAY_SIZE(usb_ehci_resources),
549 .resource = usb_ehci_resources,
550};
551
525static struct resource usb_ohci_resources[] = { 552static struct resource usb_ohci_resources[] = {
526 [0] = { 553 [0] = {
527 .start = 0xffe70400, 554 .start = USB_OHCI_START,
528 .end = 0xffe704ff, 555 .end = USB_OHCI_START + 0x3ff,
529 .flags = IORESOURCE_MEM, 556 .flags = IORESOURCE_MEM,
530 }, 557 },
531 [1] = { 558 [1] = {
@@ -535,12 +562,11 @@ static struct resource usb_ohci_resources[] = {
535 }, 562 },
536}; 563};
537 564
538static u64 usb_ohci_dma_mask = DMA_BIT_MASK(32);
539static struct platform_device usb_ohci_device = { 565static struct platform_device usb_ohci_device = {
540 .name = "sh_ohci", 566 .name = "sh_ohci",
541 .id = -1, 567 .id = -1,
542 .dev = { 568 .dev = {
543 .dma_mask = &usb_ohci_dma_mask, 569 .dma_mask = &usb_ohci_device.dev.coherent_dma_mask,
544 .coherent_dma_mask = DMA_BIT_MASK(32), 570 .coherent_dma_mask = DMA_BIT_MASK(32),
545 }, 571 },
546 .num_resources = ARRAY_SIZE(usb_ohci_resources), 572 .num_resources = ARRAY_SIZE(usb_ohci_resources),
@@ -570,6 +596,7 @@ static struct platform_device *sh7786_early_devices[] __initdata = {
570 596
571static struct platform_device *sh7786_devices[] __initdata = { 597static struct platform_device *sh7786_devices[] __initdata = {
572 &dma0_device, 598 &dma0_device,
599 &usb_ehci_device,
573 &usb_ohci_device, 600 &usb_ohci_device,
574}; 601};
575 602