]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
MUSB: Add more TUSB endpoints
authorDavid Brownell <dbrownell@users.sourceforge.net>
Fri, 8 Sep 2006 10:56:11 +0000 (13:56 +0300)
committerTony Lindgren <tony@atomide.com>
Fri, 8 Sep 2006 10:56:11 +0000 (13:56 +0300)
Add a new fifo configuration that makes better use of the memory
available for use as TUSB fifos, and all the endpoint hardware.
Now almost every endpoint is available, and that's the default
setup.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
drivers/usb/musb/plat_uds.c

index 2d684c0870c9387380768c4b789117add36c9713..2b081c3c4bc1c26440979eadb34fb01362bf28f8 100644 (file)
@@ -767,7 +767,11 @@ static void musb_shutdown(struct platform_device *pdev)
 #define        can_dynfifo()   0
 #endif
 
+#ifdef CONFIG_USB_TUSB6010
+static ushort __devinitdata fifo_mode = 4;
+#else
 static ushort __devinitdata fifo_mode = 2;
+#endif
 
 /* "modprobe ... fifo_mode=1" etc */
 module_param(fifo_mode, ushort, 0);
@@ -829,6 +833,38 @@ static const struct fifo_cfg __devinitdata mode_3_cfg[] = {
 { .hw_ep_num = 4, .style = FIFO_RXTX, .maxpacket = 256, },
 };
 
+/* mode 4 - fits in 16KB */
+static const struct fifo_cfg __devinitdata mode_4_cfg[] = {
+{ .hw_ep_num =  1, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num =  1, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num =  2, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num =  2, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num =  3, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num =  3, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num =  4, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num =  4, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num =  5, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num =  5, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num =  6, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num =  6, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num =  7, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num =  7, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num =  8, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num =  8, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num =  9, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num =  9, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num = 10, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num = 10, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num = 11, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num = 11, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num = 12, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num = 12, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num = 13, .style = FIFO_TX,   .maxpacket = 512, },
+{ .hw_ep_num = 13, .style = FIFO_RX,   .maxpacket = 512, },
+{ .hw_ep_num = 14, .style = FIFO_RXTX, .maxpacket = 1024, },
+{ .hw_ep_num = 15, .style = FIFO_RXTX, .maxpacket = 1024, },
+};
+
 
 /*
  * configure a fifo; for non-shared endpoints, this may be called
@@ -939,6 +975,10 @@ static int __devinit ep_config_from_table(struct musb *musb)
                cfg = mode_3_cfg;
                n = ARRAY_SIZE(mode_3_cfg);
                break;
+       case 4:
+               cfg = mode_4_cfg;
+               n = ARRAY_SIZE(mode_4_cfg);
+               break;
        }
 
        printk(KERN_DEBUG "%s: setup fifo_mode %d\n",