]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
h63xx: usb gadget driver support for allowing network over usb.
authorMika Laitio <lamikr@pilppa.org>
Mon, 19 Jan 2009 23:08:25 +0000 (01:08 +0200)
committerMika Laitio <lamikr@pilppa.org>
Mon, 19 Jan 2009 23:08:25 +0000 (01:08 +0200)
arch/arm/mach-omap1/board-h6300.c
drivers/usb/gadget/omap_udc.c

index 90b000bd694f19d12933ad612e4ebe6f40a70d6c..14173037593b9699b5ffa40d3196d97e69769a8e 100644 (file)
@@ -46,9 +46,17 @@ static struct omap_uart_config h6300_uart_config __initdata = {
        .enabled_uarts  = ((1 << 0) | (1 << 1) | (1 << 2)),
 };
 
+/* assume no Mini-AB port */
+static struct omap_usb_config h6300_usb_config __initdata = {
+       .hmc_mode       = 0,
+       .register_dev   = 1,
+       .pins[0]        = 0,
+};
+
 static struct omap_board_config_kernel h6300_config[] = {
        { OMAP_TAG_LCD,         &h6300_lcd_config },
        { OMAP_TAG_UART,        &h6300_uart_config },
+       { OMAP_TAG_USB,         &h6300_usb_config },
 };
 
 static void __init h6300_init_irq(void)
index f2b065fd28ba15ddf2d866dafb2111e3c0ad6bd6..975a54fb0dc475ff1ad3a1a71801490b53981fa1 100644 (file)
 #undef USB_TRACE
 
 /* bulk DMA seems to be behaving for both IN and OUT */
+#ifdef CONFIG_MACH_OMAP_H6300
+#undef USE_DMA
+#else
 #define        USE_DMA
+#endif
 
 /* ISO too */
 #define        USE_ISO
@@ -2147,7 +2151,7 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver)
        /* boards that don't have VBUS sensing can't autogate 48MHz;
         * can't enter deep sleep while a gadget driver is active.
         */
-       if (machine_is_omap_innovator() || machine_is_omap_osk())
+       if (machine_is_omap_innovator() || machine_is_omap_osk() || machine_is_omap_h6300())
                omap_vbus_session(&udc->gadget, 1);
 
 done:
@@ -2170,7 +2174,7 @@ int usb_gadget_unregister_driver (struct usb_gadget_driver *driver)
        if (udc->dc_clk != NULL)
                omap_udc_enable_clock(1);
 
-       if (machine_is_omap_innovator() || machine_is_omap_osk())
+       if (machine_is_omap_innovator() || machine_is_omap_osk() || machine_is_omap_h6300())
                omap_vbus_session(&udc->gadget, 0);
 
        if (udc->transceiver)
@@ -2791,7 +2795,7 @@ static int __init omap_udc_probe(struct platform_device *pdev)
                hmc = HMC_1510;
                type = "(unknown)";
 
-               if (machine_is_omap_innovator()) {
+               if (machine_is_omap_innovator() || machine_is_omap_h6300()) {
                        /* just set up software VBUS detect, and then
                         * later rig it so we always report VBUS.
                         * FIXME without really sensing VBUS, we can't