summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/at91_udc.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-05-28 06:24:20 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-22 02:15:58 +0400
commitbb24280ffce6a8bc6b03d29a43ec16ac14e9ec85 (patch)
treec344f66890f16a386429b72245bb4443c5e94906 /drivers/usb/gadget/at91_udc.c
parente184d5fcaac9676bd83a956a774a04a72bf2b28b (diff)
downloadlinux-bb24280ffce6a8bc6b03d29a43ec16ac14e9ec85.tar.xz
USB: at91_udc: updated fifo sizes
It turns out newer versions of the AT91 UDC hardware have increased sizes of some of the FIFOs. Reporting that is a Good Thing. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/at91_udc.c')
-rw-r--r--drivers/usb/gadget/at91_udc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index b6b2a0a5ba37..e2d8a5d86c40 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1687,6 +1687,19 @@ static int __init at91udc_probe(struct platform_device *pdev)
udc->board.pullup_active_low);
}
+ /* newer chips have more FIFO memory than rm9200 */
+ if (cpu_is_at91sam9260()) {
+ udc->ep[0].maxpacket = 64;
+ udc->ep[3].maxpacket = 64;
+ udc->ep[4].maxpacket = 512;
+ udc->ep[5].maxpacket = 512;
+ } else if (cpu_is_at91sam9261()) {
+ udc->ep[3].maxpacket = 64;
+ } else if (cpu_is_at91sam9263()) {
+ udc->ep[0].maxpacket = 64;
+ udc->ep[3].maxpacket = 64;
+ }
+
udc->udp_baseaddr = ioremap(res->start, res->end - res->start + 1);
if (!udc->udp_baseaddr) {
retval = -ENOMEM;