aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c8
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c8
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c8
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c8
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c8
-rw-r--r--arch/arm/mach-omap2/board-ldp.c8
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c8
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c8
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c8
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c8
-rw-r--r--arch/arm/mach-omap2/board-overo.c8
-rw-r--r--arch/arm/mach-omap2/board-rx51.c8
-rwxr-xr-xarch/arm/mach-omap2/board-zoom-peripherals.c8
-rw-r--r--arch/arm/mach-omap2/usb-musb.c7
-rw-r--r--arch/arm/plat-omap/include/plat/usb.h11
15 files changed, 106 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index d6f55ef9059d..01d113ff9fcf 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -193,6 +193,12 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
193 {} /* Terminator */ 193 {} /* Terminator */
194}; 194};
195 195
196static struct omap_musb_board_data musb_board_data = {
197 .interface_type = MUSB_INTERFACE_ULPI,
198 .mode = MUSB_OTG,
199 .power = 100,
200};
201
196static void __init omap_2430sdp_init(void) 202static void __init omap_2430sdp_init(void)
197{ 203{
198 int ret; 204 int ret;
@@ -202,7 +208,7 @@ static void __init omap_2430sdp_init(void)
202 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); 208 platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
203 omap_serial_init(); 209 omap_serial_init();
204 omap2_hsmmc_init(mmc); 210 omap2_hsmmc_init(mmc);
205 usb_musb_init(); 211 usb_musb_init(&musb_board_data);
206 board_smc91x_init(); 212 board_smc91x_init();
207 213
208 /* Turn off secondary LCD backlight */ 214 /* Turn off secondary LCD backlight */
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 5adef517a2b3..a10e96f48aea 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -760,6 +760,12 @@ static struct flash_partitions sdp_flash_partitions[] = {
760 }, 760 },
761}; 761};
762 762
763static struct omap_musb_board_data musb_board_data = {
764 .interface_type = MUSB_INTERFACE_ULPI,
765 .mode = MUSB_OTG,
766 .power = 100,
767};
768
763static void __init omap_3430sdp_init(void) 769static void __init omap_3430sdp_init(void)
764{ 770{
765 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 771 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -774,7 +780,7 @@ static void __init omap_3430sdp_init(void)
774 ARRAY_SIZE(sdp3430_spi_board_info)); 780 ARRAY_SIZE(sdp3430_spi_board_info));
775 ads7846_dev_init(); 781 ads7846_dev_init();
776 omap_serial_init(); 782 omap_serial_init();
777 usb_musb_init(); 783 usb_musb_init(&musb_board_data);
778 board_smc91x_init(); 784 board_smc91x_init();
779 sdp_flash_init(sdp_flash_partitions); 785 sdp_flash_init(sdp_flash_partitions);
780 sdp3430_display_init(); 786 sdp3430_display_init();
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 8659c3e2ef6e..afa77caaff4d 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -811,6 +811,12 @@ static struct omap_board_mux board_mux[] __initdata = {
811 { .reg_offset = OMAP_MUX_TERMINATOR }, 811 { .reg_offset = OMAP_MUX_TERMINATOR },
812}; 812};
813 813
814static struct omap_musb_board_data musb_board_data = {
815 .interface_type = MUSB_INTERFACE_ULPI,
816 .mode = MUSB_OTG,
817 .power = 100,
818};
819
814static void __init cm_t35_init(void) 820static void __init cm_t35_init(void)
815{ 821{
816 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); 822 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
@@ -822,7 +828,7 @@ static void __init cm_t35_init(void)
822 cm_t35_init_led(); 828 cm_t35_init_led();
823 cm_t35_init_display(); 829 cm_t35_init_display();
824 830
825 usb_musb_init(); 831 usb_musb_init(&musb_board_data);
826} 832}
827 833
828MACHINE_START(CM_T35, "Compulab CM-T35") 834MACHINE_START(CM_T35, "Compulab CM-T35")
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 89a55f1d07e3..371019054b49 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -630,6 +630,12 @@ static void __init devkit8000_flash_init(void)
630 } 630 }
631} 631}
632 632
633static struct omap_musb_board_data musb_board_data = {
634 .interface_type = MUSB_INTERFACE_ULPI,
635 .mode = MUSB_OTG,
636 .power = 100,
637};
638
633static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 639static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
634 640
635 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, 641 .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
@@ -665,7 +671,7 @@ static void __init devkit8000_init(void)
665 /* REVISIT leave DVI powered down until it's needed ... */ 671 /* REVISIT leave DVI powered down until it's needed ... */
666 gpio_direction_output(170, true); 672 gpio_direction_output(170, true);
667 673
668 usb_musb_init(); 674 usb_musb_init(&musb_board_data);
669 usb_ehci_init(&ehci_pdata); 675 usb_ehci_init(&ehci_pdata);
670 devkit8000_flash_init(); 676 devkit8000_flash_init();
671 677
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 748f418ba442..9958987a3d0a 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -436,6 +436,12 @@ static int __init igep2_i2c_init(void)
436 return 0; 436 return 0;
437} 437}
438 438
439static struct omap_musb_board_data musb_board_data = {
440 .interface_type = MUSB_INTERFACE_ULPI,
441 .mode = MUSB_OTG,
442 .power = 100,
443};
444
439static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 445static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
440 .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, 446 .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
441 .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, 447 .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
@@ -461,7 +467,7 @@ static void __init igep2_init(void)
461 igep2_i2c_init(); 467 igep2_i2c_init();
462 platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices)); 468 platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
463 omap_serial_init(); 469 omap_serial_init();
464 usb_musb_init(); 470 usb_musb_init(&musb_board_data);
465 usb_ehci_init(&ehci_pdata); 471 usb_ehci_init(&ehci_pdata);
466 472
467 igep2_flash_init(); 473 igep2_flash_init();
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 095adcb642b8..5fcb52e71298 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -383,6 +383,12 @@ static struct omap_board_mux board_mux[] __initdata = {
383#define board_mux NULL 383#define board_mux NULL
384#endif 384#endif
385 385
386static struct omap_musb_board_data musb_board_data = {
387 .interface_type = MUSB_INTERFACE_ULPI,
388 .mode = MUSB_OTG,
389 .power = 100,
390};
391
386static void __init omap_ldp_init(void) 392static void __init omap_ldp_init(void)
387{ 393{
388 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 394 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -394,7 +400,7 @@ static void __init omap_ldp_init(void)
394 ARRAY_SIZE(ldp_spi_board_info)); 400 ARRAY_SIZE(ldp_spi_board_info));
395 ads7846_dev_init(); 401 ads7846_dev_init();
396 omap_serial_init(); 402 omap_serial_init();
397 usb_musb_init(); 403 usb_musb_init(&musb_board_data);
398 404
399 omap2_hsmmc_init(mmc); 405 omap2_hsmmc_init(mmc);
400 /* link regulators to MMC adapters */ 406 /* link regulators to MMC adapters */
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 1bae69913376..6eb77e1f7c82 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -430,6 +430,12 @@ static struct omap_board_mux board_mux[] __initdata = {
430#define board_mux NULL 430#define board_mux NULL
431#endif 431#endif
432 432
433static struct omap_musb_board_data musb_board_data = {
434 .interface_type = MUSB_INTERFACE_ULPI,
435 .mode = MUSB_OTG,
436 .power = 100,
437};
438
433static void __init omap3_beagle_init(void) 439static void __init omap3_beagle_init(void)
434{ 440{
435 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 441 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -443,7 +449,7 @@ static void __init omap3_beagle_init(void)
443 /* REVISIT leave DVI powered down until it's needed ... */ 449 /* REVISIT leave DVI powered down until it's needed ... */
444 gpio_direction_output(170, true); 450 gpio_direction_output(170, true);
445 451
446 usb_musb_init(); 452 usb_musb_init(&musb_board_data);
447 usb_ehci_init(&ehci_pdata); 453 usb_ehci_init(&ehci_pdata);
448 omap3beagle_flash_init(); 454 omap3beagle_flash_init();
449 455
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 57506da4e433..d6bc88c426b5 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -662,6 +662,12 @@ static struct omap_board_mux board_mux[] __initdata = {
662#define board_mux NULL 662#define board_mux NULL
663#endif 663#endif
664 664
665static struct omap_musb_board_data musb_board_data = {
666 .interface_type = MUSB_INTERFACE_ULPI,
667 .mode = MUSB_OTG,
668 .power = 100,
669};
670
665static void __init omap3_evm_init(void) 671static void __init omap3_evm_init(void)
666{ 672{
667 omap3_evm_get_revision(); 673 omap3_evm_get_revision();
@@ -701,7 +707,7 @@ static void __init omap3_evm_init(void)
701 omap_mux_init_gpio(135, OMAP_PIN_OUTPUT); 707 omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
702 ehci_pdata.reset_gpio_port[1] = 135; 708 ehci_pdata.reset_gpio_port[1] = 135;
703 } 709 }
704 usb_musb_init(); 710 usb_musb_init(&musb_board_data);
705 usb_ehci_init(&ehci_pdata); 711 usb_ehci_init(&ehci_pdata);
706 ads7846_dev_init(); 712 ads7846_dev_init();
707 omap3evm_init_smsc911x(); 713 omap3evm_init_smsc911x();
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index a0acf8d1e806..4827f4658df3 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -557,6 +557,12 @@ static struct omap_board_mux board_mux[] __initdata = {
557#define board_mux NULL 557#define board_mux NULL
558#endif 558#endif
559 559
560static struct omap_musb_board_data musb_board_data = {
561 .interface_type = MUSB_INTERFACE_ULPI,
562 .mode = MUSB_OTG,
563 .power = 100,
564};
565
560static void __init omap3pandora_init(void) 566static void __init omap3pandora_init(void)
561{ 567{
562 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 568 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -569,7 +575,7 @@ static void __init omap3pandora_init(void)
569 omap3pandora_ads7846_init(); 575 omap3pandora_ads7846_init();
570 usb_ehci_init(&ehci_pdata); 576 usb_ehci_init(&ehci_pdata);
571 pandora_keys_gpio_init(); 577 pandora_keys_gpio_init();
572 usb_musb_init(); 578 usb_musb_init(&musb_board_data);
573 579
574 /* Ensure SDRC pins are mux'd for self-refresh */ 580 /* Ensure SDRC pins are mux'd for self-refresh */
575 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); 581 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 8252ba49a664..3943d0f8322c 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -527,6 +527,12 @@ static void __init early_touchbook_revision(char **p)
527} 527}
528__early_param("tbr=", early_touchbook_revision); 528__early_param("tbr=", early_touchbook_revision);
529 529
530static struct omap_musb_board_data musb_board_data = {
531 .interface_type = MUSB_INTERFACE_ULPI,
532 .mode = MUSB_OTG,
533 .power = 100,
534};
535
530static void __init omap3_touchbook_init(void) 536static void __init omap3_touchbook_init(void)
531{ 537{
532 pm_power_off = omap3_touchbook_poweroff; 538 pm_power_off = omap3_touchbook_poweroff;
@@ -545,7 +551,7 @@ static void __init omap3_touchbook_init(void)
545 spi_register_board_info(omap3_ads7846_spi_board_info, 551 spi_register_board_info(omap3_ads7846_spi_board_info,
546 ARRAY_SIZE(omap3_ads7846_spi_board_info)); 552 ARRAY_SIZE(omap3_ads7846_spi_board_info));
547 omap3_ads7846_init(); 553 omap3_ads7846_init();
548 usb_musb_init(); 554 usb_musb_init(&musb_board_data);
549 usb_ehci_init(&ehci_pdata); 555 usb_ehci_init(&ehci_pdata);
550 omap3touchbook_flash_init(); 556 omap3touchbook_flash_init();
551 557
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 7e6aa8292746..50872a42bec7 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -413,6 +413,12 @@ static struct omap_board_mux board_mux[] __initdata = {
413#define board_mux NULL 413#define board_mux NULL
414#endif 414#endif
415 415
416static struct omap_musb_board_data musb_board_data = {
417 .interface_type = MUSB_INTERFACE_ULPI,
418 .mode = MUSB_OTG,
419 .power = 100,
420};
421
416static void __init overo_init(void) 422static void __init overo_init(void)
417{ 423{
418 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 424 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -420,7 +426,7 @@ static void __init overo_init(void)
420 platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices)); 426 platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
421 omap_serial_init(); 427 omap_serial_init();
422 overo_flash_init(); 428 overo_flash_init();
423 usb_musb_init(); 429 usb_musb_init(&musb_board_data);
424 usb_ehci_init(&ehci_pdata); 430 usb_ehci_init(&ehci_pdata);
425 overo_ads7846_init(); 431 overo_ads7846_init();
426 overo_init_smsc911x(); 432 overo_init_smsc911x();
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 6a49f916103d..0ccb8b46d157 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -78,11 +78,17 @@ static struct omap_board_mux board_mux[] __initdata = {
78#define board_mux NULL 78#define board_mux NULL
79#endif 79#endif
80 80
81static struct omap_musb_board_data musb_board_data = {
82 .interface_type = MUSB_INTERFACE_ULPI,
83 .mode = MUSB_PERIPHERAL,
84 .power = 0,
85};
86
81static void __init rx51_init(void) 87static void __init rx51_init(void)
82{ 88{
83 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 89 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
84 omap_serial_init(); 90 omap_serial_init();
85 usb_musb_init(); 91 usb_musb_init(&musb_board_data);
86 rx51_peripherals_init(); 92 rx51_peripherals_init();
87 93
88 /* Ensure SDRC pins are mux'd for self-refresh */ 94 /* Ensure SDRC pins are mux'd for self-refresh */
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 9a0821fb7ea0..ca95d8d64136 100755
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -264,6 +264,12 @@ static int __init omap_i2c_init(void)
264 return 0; 264 return 0;
265} 265}
266 266
267static struct omap_musb_board_data musb_board_data = {
268 .interface_type = MUSB_INTERFACE_ULPI,
269 .mode = MUSB_OTG,
270 .power = 100,
271};
272
267static void enable_board_wakeup_source(void) 273static void enable_board_wakeup_source(void)
268{ 274{
269 /* T2 interrupt line (keypad) */ 275 /* T2 interrupt line (keypad) */
@@ -275,6 +281,6 @@ void __init zoom_peripherals_init(void)
275{ 281{
276 omap_i2c_init(); 282 omap_i2c_init();
277 omap_serial_init(); 283 omap_serial_init();
278 usb_musb_init(); 284 usb_musb_init(&musb_board_data);
279 enable_board_wakeup_source(); 285 enable_board_wakeup_source();
280} 286}
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index ba71f762db71..2ddc316d9394 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -146,7 +146,7 @@ static struct platform_device musb_device = {
146 .resource = musb_resources, 146 .resource = musb_resources,
147}; 147};
148 148
149void __init usb_musb_init(void) 149void __init usb_musb_init(struct omap_musb_board_data *board_data)
150{ 150{
151 if (cpu_is_omap243x()) 151 if (cpu_is_omap243x())
152 musb_resources[0].start = OMAP243X_HS_BASE; 152 musb_resources[0].start = OMAP243X_HS_BASE;
@@ -159,6 +159,9 @@ void __init usb_musb_init(void)
159 * musb_core.c have been converted to use use clkdev. 159 * musb_core.c have been converted to use use clkdev.
160 */ 160 */
161 musb_plat.clock = "ick"; 161 musb_plat.clock = "ick";
162 musb_plat.board_data = board_data;
163 musb_plat.power = board_data->power >> 1;
164 musb_plat.mode = board_data->mode;
162 165
163 if (platform_device_register(&musb_device) < 0) { 166 if (platform_device_register(&musb_device) < 0) {
164 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); 167 printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
@@ -167,7 +170,7 @@ void __init usb_musb_init(void)
167} 170}
168 171
169#else 172#else
170void __init usb_musb_init(void) 173void __init usb_musb_init(struct omap_musb_board_data *board_data)
171{ 174{
172} 175}
173#endif /* CONFIG_USB_MUSB_SOC */ 176#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 33a500eb2f93..288e29e1c06f 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
@@ -3,6 +3,7 @@
3#ifndef __ASM_ARCH_OMAP_USB_H 3#ifndef __ASM_ARCH_OMAP_USB_H
4#define __ASM_ARCH_OMAP_USB_H 4#define __ASM_ARCH_OMAP_USB_H
5 5
6#include <linux/usb/musb.h>
6#include <plat/board.h> 7#include <plat/board.h>
7 8
8#define OMAP3_HS_USB_PORTS 3 9#define OMAP3_HS_USB_PORTS 3
@@ -42,7 +43,15 @@ struct ehci_hcd_omap_platform_data {
42#define UDC_BASE OMAP2_UDC_BASE 43#define UDC_BASE OMAP2_UDC_BASE
43#define OMAP_OHCI_BASE OMAP2_OHCI_BASE 44#define OMAP_OHCI_BASE OMAP2_OHCI_BASE
44 45
45extern void usb_musb_init(void); 46struct omap_musb_board_data {
47 u8 interface_type;
48 u8 mode;
49 u8 power;
50};
51
52enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
53
54extern void usb_musb_init(struct omap_musb_board_data *board_data);
46 55
47extern void usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata); 56extern void usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata);
48 57