aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@nokia.com>2009-03-23 21:07:49 -0400
committerTony Lindgren <tony@atomide.com>2009-03-23 21:51:20 -0400
commitb0b5aa3f4c17c6a21423b9728d701216ab2e1ff1 (patch)
tree7af51785fa8be881c8b3f00071a1ae2c8d46c741 /arch/arm/mach-omap2
parent52176e70837d56cd238d6edc04cc403f1ffa86c6 (diff)
ARM: OMAP: get rid of OMAP_TAG_USB, v2
OMAP_TAGS should vanish soon since they're not generic arm tags. Most of them can be converted to a platform_data or parsed from a command line like e.g. serial tag. For OMAP_TAG_USB we just let boards call omap_usb_init() passing a pointer to omap_usb_config. Patch updated by Tony for mainline, basically make n770 and h4 compile. Also folded in a fix for OSK by David Brownell <dbrownell@users.sourceforge.net>. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/mach-omap2/board-h4.c34
2 files changed, 35 insertions, 1 deletions
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
274static struct omap_board_config_kernel apollon_config[] = { 274static 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
305static void __init omap_apollon_init(void) 305static 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
382static 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
382static struct omap_board_config_kernel h4_config[] = { 415static 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