diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-generic.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-innovator.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-nokia770.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmte.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmtt.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-palmz71.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-sx1.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-voiceblue.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-apollon.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-h4.c | 34 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/board.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/usb.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/usb.c | 25 |
17 files changed, 56 insertions, 46 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 2e618391cc51..8b40aace9db4 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -175,7 +175,6 @@ static struct omap_usb_config ams_delta_usb_config __initdata = { | |||
175 | static struct omap_board_config_kernel ams_delta_config[] = { | 175 | static struct omap_board_config_kernel ams_delta_config[] = { |
176 | { OMAP_TAG_LCD, &ams_delta_lcd_config }, | 176 | { OMAP_TAG_LCD, &ams_delta_lcd_config }, |
177 | { OMAP_TAG_UART, &ams_delta_uart_config }, | 177 | { OMAP_TAG_UART, &ams_delta_uart_config }, |
178 | { OMAP_TAG_USB, &ams_delta_usb_config }, | ||
179 | }; | 178 | }; |
180 | 179 | ||
181 | static struct resource ams_delta_kp_resources[] = { | 180 | static struct resource ams_delta_kp_resources[] = { |
@@ -232,6 +231,7 @@ static void __init ams_delta_init(void) | |||
232 | /* Clear latch2 (NAND, LCD, modem enable) */ | 231 | /* Clear latch2 (NAND, LCD, modem enable) */ |
233 | ams_delta_latch2_write(~0, 0); | 232 | ams_delta_latch2_write(~0, 0); |
234 | 233 | ||
234 | omap_usb_init(&ams_delta_usb_config); | ||
235 | platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); | 235 | platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); |
236 | } | 236 | } |
237 | 237 | ||
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index 7d2670205373..e724940e86f2 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c | |||
@@ -62,7 +62,6 @@ static struct omap_uart_config generic_uart_config __initdata = { | |||
62 | }; | 62 | }; |
63 | 63 | ||
64 | static struct omap_board_config_kernel generic_config[] __initdata = { | 64 | static struct omap_board_config_kernel generic_config[] __initdata = { |
65 | { OMAP_TAG_USB, NULL }, | ||
66 | { OMAP_TAG_UART, &generic_uart_config }, | 65 | { OMAP_TAG_UART, &generic_uart_config }, |
67 | }; | 66 | }; |
68 | 67 | ||
@@ -70,12 +69,12 @@ static void __init omap_generic_init(void) | |||
70 | { | 69 | { |
71 | #ifdef CONFIG_ARCH_OMAP15XX | 70 | #ifdef CONFIG_ARCH_OMAP15XX |
72 | if (cpu_is_omap15xx()) { | 71 | if (cpu_is_omap15xx()) { |
73 | generic_config[0].data = &generic1510_usb_config; | 72 | omap_usb_init(&generic1510_usb_config); |
74 | } | 73 | } |
75 | #endif | 74 | #endif |
76 | #if defined(CONFIG_ARCH_OMAP16XX) | 75 | #if defined(CONFIG_ARCH_OMAP16XX) |
77 | if (!cpu_is_omap1510()) { | 76 | if (!cpu_is_omap1510()) { |
78 | generic_config[0].data = &generic1610_usb_config; | 77 | omap_usb_init(&generic1610_usb_config); |
79 | } | 78 | } |
80 | #endif | 79 | #endif |
81 | 80 | ||
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index b31b6d9b2e3f..f695aa053ac8 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -369,7 +369,6 @@ static struct omap_lcd_config h2_lcd_config __initdata = { | |||
369 | }; | 369 | }; |
370 | 370 | ||
371 | static struct omap_board_config_kernel h2_config[] __initdata = { | 371 | static struct omap_board_config_kernel h2_config[] __initdata = { |
372 | { OMAP_TAG_USB, &h2_usb_config }, | ||
373 | { OMAP_TAG_UART, &h2_uart_config }, | 372 | { OMAP_TAG_UART, &h2_uart_config }, |
374 | { OMAP_TAG_LCD, &h2_lcd_config }, | 373 | { OMAP_TAG_LCD, &h2_lcd_config }, |
375 | }; | 374 | }; |
@@ -418,6 +417,7 @@ static void __init h2_init(void) | |||
418 | omap_serial_init(); | 417 | omap_serial_init(); |
419 | omap_register_i2c_bus(1, 100, h2_i2c_board_info, | 418 | omap_register_i2c_bus(1, 100, h2_i2c_board_info, |
420 | ARRAY_SIZE(h2_i2c_board_info)); | 419 | ARRAY_SIZE(h2_i2c_board_info)); |
420 | omap_usb_init(&h2_usb_config); | ||
421 | h2_mmc_init(); | 421 | h2_mmc_init(); |
422 | } | 422 | } |
423 | 423 | ||
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 4b872f3822b5..4695965114c4 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -423,7 +423,6 @@ static struct omap_lcd_config h3_lcd_config __initdata = { | |||
423 | }; | 423 | }; |
424 | 424 | ||
425 | static struct omap_board_config_kernel h3_config[] __initdata = { | 425 | static struct omap_board_config_kernel h3_config[] __initdata = { |
426 | { OMAP_TAG_USB, &h3_usb_config }, | ||
427 | { OMAP_TAG_UART, &h3_uart_config }, | 426 | { OMAP_TAG_UART, &h3_uart_config }, |
428 | { OMAP_TAG_LCD, &h3_lcd_config }, | 427 | { OMAP_TAG_LCD, &h3_lcd_config }, |
429 | }; | 428 | }; |
@@ -477,6 +476,7 @@ static void __init h3_init(void) | |||
477 | omap_serial_init(); | 476 | omap_serial_init(); |
478 | omap_register_i2c_bus(1, 100, h3_i2c_board_info, | 477 | omap_register_i2c_bus(1, 100, h3_i2c_board_info, |
479 | ARRAY_SIZE(h3_i2c_board_info)); | 478 | ARRAY_SIZE(h3_i2c_board_info)); |
479 | omap_usb_init(&h3_usb_config); | ||
480 | h3_mmc_init(); | 480 | h3_mmc_init(); |
481 | } | 481 | } |
482 | 482 | ||
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 714a08f79e90..2fd98260ea49 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -373,7 +373,6 @@ static struct omap_uart_config innovator_uart_config __initdata = { | |||
373 | }; | 373 | }; |
374 | 374 | ||
375 | static struct omap_board_config_kernel innovator_config[] = { | 375 | static struct omap_board_config_kernel innovator_config[] = { |
376 | { OMAP_TAG_USB, NULL }, | ||
377 | { OMAP_TAG_LCD, NULL }, | 376 | { OMAP_TAG_LCD, NULL }, |
378 | { OMAP_TAG_UART, &innovator_uart_config }, | 377 | { OMAP_TAG_UART, &innovator_uart_config }, |
379 | }; | 378 | }; |
@@ -395,13 +394,13 @@ static void __init innovator_init(void) | |||
395 | 394 | ||
396 | #ifdef CONFIG_ARCH_OMAP15XX | 395 | #ifdef CONFIG_ARCH_OMAP15XX |
397 | if (cpu_is_omap1510()) { | 396 | if (cpu_is_omap1510()) { |
398 | innovator_config[0].data = &innovator1510_usb_config; | 397 | omap_usb_init(&innovator1510_usb_config); |
399 | innovator_config[1].data = &innovator1510_lcd_config; | 398 | innovator_config[1].data = &innovator1510_lcd_config; |
400 | } | 399 | } |
401 | #endif | 400 | #endif |
402 | #ifdef CONFIG_ARCH_OMAP16XX | 401 | #ifdef CONFIG_ARCH_OMAP16XX |
403 | if (cpu_is_omap1610()) { | 402 | if (cpu_is_omap1610()) { |
404 | innovator_config[0].data = &h2_usb_config; | 403 | omap_usb_init(&h2_usb_config); |
405 | innovator_config[1].data = &innovator1610_lcd_config; | 404 | innovator_config[1].data = &innovator1610_lcd_config; |
406 | } | 405 | } |
407 | #endif | 406 | #endif |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index af51e0b180f2..7bc7a3cb9c51 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -233,10 +233,6 @@ static inline void nokia770_mmc_init(void) | |||
233 | } | 233 | } |
234 | #endif | 234 | #endif |
235 | 235 | ||
236 | static struct omap_board_config_kernel nokia770_config[] __initdata = { | ||
237 | { OMAP_TAG_USB, NULL }, | ||
238 | }; | ||
239 | |||
240 | #if defined(CONFIG_OMAP_DSP) | 236 | #if defined(CONFIG_OMAP_DSP) |
241 | /* | 237 | /* |
242 | * audio power control | 238 | * audio power control |
@@ -371,19 +367,16 @@ static __init int omap_dsp_init(void) | |||
371 | 367 | ||
372 | static void __init omap_nokia770_init(void) | 368 | static void __init omap_nokia770_init(void) |
373 | { | 369 | { |
374 | nokia770_config[0].data = &nokia770_usb_config; | ||
375 | |||
376 | platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices)); | 370 | platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices)); |
377 | spi_register_board_info(nokia770_spi_board_info, | 371 | spi_register_board_info(nokia770_spi_board_info, |
378 | ARRAY_SIZE(nokia770_spi_board_info)); | 372 | ARRAY_SIZE(nokia770_spi_board_info)); |
379 | omap_board_config = nokia770_config; | ||
380 | omap_board_config_size = ARRAY_SIZE(nokia770_config); | ||
381 | omap_gpio_init(); | 373 | omap_gpio_init(); |
382 | omap_serial_init(); | 374 | omap_serial_init(); |
383 | omap_register_i2c_bus(1, 100, NULL, 0); | 375 | omap_register_i2c_bus(1, 100, NULL, 0); |
384 | omap_dsp_init(); | 376 | omap_dsp_init(); |
385 | ads7846_dev_init(); | 377 | ads7846_dev_init(); |
386 | mipid_dev_init(); | 378 | mipid_dev_init(); |
379 | omap_usb_init(&nokia770_usb_config); | ||
387 | nokia770_mmc_init(); | 380 | nokia770_mmc_init(); |
388 | } | 381 | } |
389 | 382 | ||
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 9c4cac274cc0..cf3247b15f87 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -304,7 +304,6 @@ static struct omap_lcd_config osk_lcd_config __initdata = { | |||
304 | #endif | 304 | #endif |
305 | 305 | ||
306 | static struct omap_board_config_kernel osk_config[] __initdata = { | 306 | static struct omap_board_config_kernel osk_config[] __initdata = { |
307 | { OMAP_TAG_USB, &osk_usb_config }, | ||
308 | { OMAP_TAG_UART, &osk_uart_config }, | 307 | { OMAP_TAG_UART, &osk_uart_config }, |
309 | #ifdef CONFIG_OMAP_OSK_MISTRAL | 308 | #ifdef CONFIG_OMAP_OSK_MISTRAL |
310 | { OMAP_TAG_LCD, &osk_lcd_config }, | 309 | { OMAP_TAG_LCD, &osk_lcd_config }, |
@@ -555,6 +554,8 @@ static void __init osk_init(void) | |||
555 | l |= (3 << 1); | 554 | l |= (3 << 1); |
556 | omap_writel(l, USB_TRANSCEIVER_CTRL); | 555 | omap_writel(l, USB_TRANSCEIVER_CTRL); |
557 | 556 | ||
557 | omap_usb_init(&osk_usb_config); | ||
558 | |||
558 | /* irq for tps65010 chip */ | 559 | /* irq for tps65010 chip */ |
559 | /* bootloader effectively does: omap_cfg_reg(U19_1610_MPUIO1); */ | 560 | /* bootloader effectively does: omap_cfg_reg(U19_1610_MPUIO1); */ |
560 | if (gpio_request(OMAP_MPUIO(1), "tps65010") == 0) | 561 | if (gpio_request(OMAP_MPUIO(1), "tps65010") == 0) |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 55d524b78e2a..886b4c0569bd 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -301,7 +301,6 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery) | |||
301 | #endif | 301 | #endif |
302 | 302 | ||
303 | static struct omap_board_config_kernel palmte_config[] __initdata = { | 303 | static struct omap_board_config_kernel palmte_config[] __initdata = { |
304 | { OMAP_TAG_USB, &palmte_usb_config }, | ||
305 | { OMAP_TAG_LCD, &palmte_lcd_config }, | 304 | { OMAP_TAG_LCD, &palmte_lcd_config }, |
306 | { OMAP_TAG_UART, &palmte_uart_config }, | 305 | { OMAP_TAG_UART, &palmte_uart_config }, |
307 | }; | 306 | }; |
@@ -356,6 +355,7 @@ static void __init omap_palmte_init(void) | |||
356 | spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info)); | 355 | spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info)); |
357 | palmte_misc_gpio_setup(); | 356 | palmte_misc_gpio_setup(); |
358 | omap_serial_init(); | 357 | omap_serial_init(); |
358 | omap_usb_init(&palmte_usb_config); | ||
359 | omap_register_i2c_bus(1, 100, NULL, 0); | 359 | omap_register_i2c_bus(1, 100, NULL, 0); |
360 | } | 360 | } |
361 | 361 | ||
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index 9dc9d7931b55..4f1b44831d37 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c | |||
@@ -279,7 +279,6 @@ static struct omap_uart_config palmtt_uart_config __initdata = { | |||
279 | }; | 279 | }; |
280 | 280 | ||
281 | static struct omap_board_config_kernel palmtt_config[] __initdata = { | 281 | static struct omap_board_config_kernel palmtt_config[] __initdata = { |
282 | { OMAP_TAG_USB, &palmtt_usb_config }, | ||
283 | { OMAP_TAG_LCD, &palmtt_lcd_config }, | 282 | { OMAP_TAG_LCD, &palmtt_lcd_config }, |
284 | { OMAP_TAG_UART, &palmtt_uart_config }, | 283 | { OMAP_TAG_UART, &palmtt_uart_config }, |
285 | }; | 284 | }; |
@@ -304,6 +303,7 @@ static void __init omap_palmtt_init(void) | |||
304 | 303 | ||
305 | spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo)); | 304 | spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo)); |
306 | omap_serial_init(); | 305 | omap_serial_init(); |
306 | omap_usb_init(&palmtt_usb_config); | ||
307 | omap_register_i2c_bus(1, 100, NULL, 0); | 307 | omap_register_i2c_bus(1, 100, NULL, 0); |
308 | } | 308 | } |
309 | 309 | ||
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index a2f99a46e7b4..9a55c3c58218 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -249,7 +249,6 @@ static struct omap_uart_config palmz71_uart_config __initdata = { | |||
249 | }; | 249 | }; |
250 | 250 | ||
251 | static struct omap_board_config_kernel palmz71_config[] __initdata = { | 251 | static struct omap_board_config_kernel palmz71_config[] __initdata = { |
252 | {OMAP_TAG_USB, &palmz71_usb_config}, | ||
253 | {OMAP_TAG_LCD, &palmz71_lcd_config}, | 252 | {OMAP_TAG_LCD, &palmz71_lcd_config}, |
254 | {OMAP_TAG_UART, &palmz71_uart_config}, | 253 | {OMAP_TAG_UART, &palmz71_uart_config}, |
255 | }; | 254 | }; |
@@ -323,6 +322,7 @@ omap_palmz71_init(void) | |||
323 | 322 | ||
324 | spi_register_board_info(palmz71_boardinfo, | 323 | spi_register_board_info(palmz71_boardinfo, |
325 | ARRAY_SIZE(palmz71_boardinfo)); | 324 | ARRAY_SIZE(palmz71_boardinfo)); |
325 | omap_usb_init(&palmz71_usb_config); | ||
326 | omap_serial_init(); | 326 | omap_serial_init(); |
327 | omap_register_i2c_bus(1, 100, NULL, 0); | 327 | omap_register_i2c_bus(1, 100, NULL, 0); |
328 | palmz71_gpio_setup(0); | 328 | palmz71_gpio_setup(0); |
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index ab277d42f302..c096577695fe 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -374,7 +374,6 @@ static struct omap_uart_config sx1_uart_config __initdata = { | |||
374 | }; | 374 | }; |
375 | 375 | ||
376 | static struct omap_board_config_kernel sx1_config[] __initdata = { | 376 | static struct omap_board_config_kernel sx1_config[] __initdata = { |
377 | { OMAP_TAG_USB, &sx1_usb_config }, | ||
378 | { OMAP_TAG_LCD, &sx1_lcd_config }, | 377 | { OMAP_TAG_LCD, &sx1_lcd_config }, |
379 | { OMAP_TAG_UART, &sx1_uart_config }, | 378 | { OMAP_TAG_UART, &sx1_uart_config }, |
380 | }; | 379 | }; |
@@ -389,6 +388,7 @@ static void __init omap_sx1_init(void) | |||
389 | omap_board_config_size = ARRAY_SIZE(sx1_config); | 388 | omap_board_config_size = ARRAY_SIZE(sx1_config); |
390 | omap_serial_init(); | 389 | omap_serial_init(); |
391 | omap_register_i2c_bus(1, 100, NULL, 0); | 390 | omap_register_i2c_bus(1, 100, NULL, 0); |
391 | omap_usb_init(&sx1_usb_config); | ||
392 | sx1_mmc_init(); | 392 | sx1_mmc_init(); |
393 | 393 | ||
394 | /* turn on USB power */ | 394 | /* turn on USB power */ |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index a7653542a2b0..98275e03dad1 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -145,7 +145,6 @@ static struct omap_uart_config voiceblue_uart_config __initdata = { | |||
145 | }; | 145 | }; |
146 | 146 | ||
147 | static struct omap_board_config_kernel voiceblue_config[] = { | 147 | static struct omap_board_config_kernel voiceblue_config[] = { |
148 | { OMAP_TAG_USB, &voiceblue_usb_config }, | ||
149 | { OMAP_TAG_UART, &voiceblue_uart_config }, | 148 | { OMAP_TAG_UART, &voiceblue_uart_config }, |
150 | }; | 149 | }; |
151 | 150 | ||
@@ -185,6 +184,7 @@ static void __init voiceblue_init(void) | |||
185 | omap_board_config = voiceblue_config; | 184 | omap_board_config = voiceblue_config; |
186 | omap_board_config_size = ARRAY_SIZE(voiceblue_config); | 185 | omap_board_config_size = ARRAY_SIZE(voiceblue_config); |
187 | omap_serial_init(); | 186 | omap_serial_init(); |
187 | omap_usb_init(&voiceblue_usb_config); | ||
188 | omap_register_i2c_bus(1, 100, NULL, 0); | 188 | omap_register_i2c_bus(1, 100, NULL, 0); |
189 | 189 | ||
190 | /* There is a good chance board is going up, so enable power LED | 190 | /* There is a good chance board is going up, so enable power LED |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 64561247d93a..41823538d36a 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
@@ -273,7 +273,6 @@ static struct omap_lcd_config apollon_lcd_config __initdata = { | |||
273 | 273 | ||
274 | static struct omap_board_config_kernel apollon_config[] = { | 274 | static struct omap_board_config_kernel apollon_config[] = { |
275 | { OMAP_TAG_UART, &apollon_uart_config }, | 275 | { OMAP_TAG_UART, &apollon_uart_config }, |
276 | { OMAP_TAG_USB, &apollon_usb_config }, | ||
277 | { OMAP_TAG_LCD, &apollon_lcd_config }, | 276 | { OMAP_TAG_LCD, &apollon_lcd_config }, |
278 | }; | 277 | }; |
279 | 278 | ||
@@ -300,6 +299,7 @@ static void __init apollon_usb_init(void) | |||
300 | omap_cfg_reg(P21_242X_GPIO12); | 299 | omap_cfg_reg(P21_242X_GPIO12); |
301 | gpio_request(12, "USB suspend"); | 300 | gpio_request(12, "USB suspend"); |
302 | gpio_direction_output(12, 0); | 301 | gpio_direction_output(12, 0); |
302 | omap_usb_init(&apollon_usb_config); | ||
303 | } | 303 | } |
304 | 304 | ||
305 | static void __init omap_apollon_init(void) | 305 | static void __init omap_apollon_init(void) |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 71226973eee7..1343cebd19a1 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -379,6 +379,39 @@ static struct omap_lcd_config h4_lcd_config __initdata = { | |||
379 | .ctrl_name = "internal", | 379 | .ctrl_name = "internal", |
380 | }; | 380 | }; |
381 | 381 | ||
382 | static struct omap_usb_config h4_usb_config __initdata = { | ||
383 | #ifdef CONFIG_MACH_OMAP2_H4_USB1 | ||
384 | /* NOTE: usb1 could also be used with 3 wire signaling */ | ||
385 | .pins[1] = 4, | ||
386 | #endif | ||
387 | |||
388 | #ifdef CONFIG_MACH_OMAP_H4_OTG | ||
389 | /* S1.10 ON -- USB OTG port | ||
390 | * usb0 switched to Mini-AB port and isp1301 transceiver; | ||
391 | * S2.POS3 = OFF, S2.POS4 = ON ... to allow battery charging | ||
392 | */ | ||
393 | .otg = 1, | ||
394 | .pins[0] = 4, | ||
395 | #ifdef CONFIG_USB_GADGET_OMAP | ||
396 | /* use OTG cable, or standard A-to-MiniB */ | ||
397 | .hmc_mode = 0x14, /* 0:dev/otg 1:host 2:disable */ | ||
398 | #elif defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | ||
399 | /* use OTG cable, or NONSTANDARD (B-to-MiniB) */ | ||
400 | .hmc_mode = 0x11, /* 0:host 1:host 2:disable */ | ||
401 | #endif /* XX */ | ||
402 | |||
403 | #else | ||
404 | /* S1.10 OFF -- usb "download port" | ||
405 | * usb0 switched to Mini-B port and isp1105 transceiver; | ||
406 | * S2.POS3 = ON, S2.POS4 = OFF ... to enable battery charging | ||
407 | */ | ||
408 | .register_dev = 1, | ||
409 | .pins[0] = 3, | ||
410 | /* .hmc_mode = 0x14,*/ /* 0:dev 1:host 2:disable */ | ||
411 | .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */ | ||
412 | #endif | ||
413 | }; | ||
414 | |||
382 | static struct omap_board_config_kernel h4_config[] = { | 415 | static struct omap_board_config_kernel h4_config[] = { |
383 | { OMAP_TAG_UART, &h4_uart_config }, | 416 | { OMAP_TAG_UART, &h4_uart_config }, |
384 | { OMAP_TAG_LCD, &h4_lcd_config }, | 417 | { OMAP_TAG_LCD, &h4_lcd_config }, |
@@ -430,6 +463,7 @@ static void __init omap_h4_init(void) | |||
430 | platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices)); | 463 | platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices)); |
431 | omap_board_config = h4_config; | 464 | omap_board_config = h4_config; |
432 | omap_board_config_size = ARRAY_SIZE(h4_config); | 465 | omap_board_config_size = ARRAY_SIZE(h4_config); |
466 | omap_usb_init(&h4_usb_config); | ||
433 | omap_serial_init(); | 467 | omap_serial_init(); |
434 | } | 468 | } |
435 | 469 | ||
diff --git a/arch/arm/plat-omap/include/mach/board.h b/arch/arm/plat-omap/include/mach/board.h index 4a0afd2366e8..50ea79a0efa2 100644 --- a/arch/arm/plat-omap/include/mach/board.h +++ b/arch/arm/plat-omap/include/mach/board.h | |||
@@ -17,7 +17,6 @@ | |||
17 | /* Different peripheral ids */ | 17 | /* Different peripheral ids */ |
18 | #define OMAP_TAG_CLOCK 0x4f01 | 18 | #define OMAP_TAG_CLOCK 0x4f01 |
19 | #define OMAP_TAG_SERIAL_CONSOLE 0x4f03 | 19 | #define OMAP_TAG_SERIAL_CONSOLE 0x4f03 |
20 | #define OMAP_TAG_USB 0x4f04 | ||
21 | #define OMAP_TAG_LCD 0x4f05 | 20 | #define OMAP_TAG_LCD 0x4f05 |
22 | #define OMAP_TAG_GPIO_SWITCH 0x4f06 | 21 | #define OMAP_TAG_GPIO_SWITCH 0x4f06 |
23 | #define OMAP_TAG_UART 0x4f07 | 22 | #define OMAP_TAG_UART 0x4f07 |
diff --git a/arch/arm/plat-omap/include/mach/usb.h b/arch/arm/plat-omap/include/mach/usb.h index a56a610950c2..e033e51d4bad 100644 --- a/arch/arm/plat-omap/include/mach/usb.h +++ b/arch/arm/plat-omap/include/mach/usb.h | |||
@@ -29,6 +29,8 @@ | |||
29 | 29 | ||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | void omap_usb_init(struct omap_usb_config *pdata); | ||
33 | |||
32 | /*-------------------------------------------------------------------------*/ | 34 | /*-------------------------------------------------------------------------*/ |
33 | 35 | ||
34 | /* | 36 | /* |
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c index e278de6862ae..509f2ed99e21 100644 --- a/arch/arm/plat-omap/usb.c +++ b/arch/arm/plat-omap/usb.c | |||
@@ -729,30 +729,13 @@ static inline void omap_1510_usb_init(struct omap_usb_config *config) {} | |||
729 | 729 | ||
730 | /*-------------------------------------------------------------------------*/ | 730 | /*-------------------------------------------------------------------------*/ |
731 | 731 | ||
732 | static struct omap_usb_config platform_data; | 732 | void __init omap_usb_init(struct omap_usb_config *pdata) |
733 | |||
734 | static int __init | ||
735 | omap_usb_init(void) | ||
736 | { | 733 | { |
737 | const struct omap_usb_config *config; | ||
738 | |||
739 | config = omap_get_config(OMAP_TAG_USB, struct omap_usb_config); | ||
740 | if (config == NULL) { | ||
741 | printk(KERN_ERR "USB: No board-specific " | ||
742 | "platform config found\n"); | ||
743 | return -ENODEV; | ||
744 | } | ||
745 | platform_data = *config; | ||
746 | |||
747 | if (cpu_is_omap730() || cpu_is_omap16xx() || cpu_is_omap24xx()) | 734 | if (cpu_is_omap730() || cpu_is_omap16xx() || cpu_is_omap24xx()) |
748 | omap_otg_init(&platform_data); | 735 | omap_otg_init(pdata); |
749 | else if (cpu_is_omap15xx()) | 736 | else if (cpu_is_omap15xx()) |
750 | omap_1510_usb_init(&platform_data); | 737 | omap_1510_usb_init(pdata); |
751 | else { | 738 | else |
752 | printk(KERN_ERR "USB: No init for your chip yet\n"); | 739 | printk(KERN_ERR "USB: No init for your chip yet\n"); |
753 | return -ENODEV; | ||
754 | } | ||
755 | return 0; | ||
756 | } | 740 | } |
757 | 741 | ||
758 | subsys_initcall(omap_usb_init); | ||