Commit 293e4170 authored by David Brownell's avatar David Brownell Committed by Tony Lindgren

MUSB: Add more TUSB endpoints

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
parent 37151b14
...@@ -767,7 +767,11 @@ static void musb_shutdown(struct platform_device *pdev) ...@@ -767,7 +767,11 @@ static void musb_shutdown(struct platform_device *pdev)
#define can_dynfifo() 0 #define can_dynfifo() 0
#endif #endif
#ifdef CONFIG_USB_TUSB6010
static ushort __devinitdata fifo_mode = 4;
#else
static ushort __devinitdata fifo_mode = 2; static ushort __devinitdata fifo_mode = 2;
#endif
/* "modprobe ... fifo_mode=1" etc */ /* "modprobe ... fifo_mode=1" etc */
module_param(fifo_mode, ushort, 0); module_param(fifo_mode, ushort, 0);
...@@ -829,6 +833,38 @@ static const struct fifo_cfg __devinitdata mode_3_cfg[] = { ...@@ -829,6 +833,38 @@ static const struct fifo_cfg __devinitdata mode_3_cfg[] = {
{ .hw_ep_num = 4, .style = FIFO_RXTX, .maxpacket = 256, }, { .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 * 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) ...@@ -939,6 +975,10 @@ static int __devinit ep_config_from_table(struct musb *musb)
cfg = mode_3_cfg; cfg = mode_3_cfg;
n = ARRAY_SIZE(mode_3_cfg); n = ARRAY_SIZE(mode_3_cfg);
break; break;
case 4:
cfg = mode_4_cfg;
n = ARRAY_SIZE(mode_4_cfg);
break;
} }
printk(KERN_DEBUG "%s: setup fifo_mode %d\n", printk(KERN_DEBUG "%s: setup fifo_mode %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment