USB: at91_udc: updated fifo sizes
authorDavid Brownell <dbrownell@users.sourceforge.net>
Wed, 28 May 2008 02:24:20 +0000 (19:24 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Jul 2008 22:15:58 +0000 (15:15 -0700)
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>
drivers/usb/gadget/at91_udc.c

index b6b2a0a..e2d8a5d 100644 (file)
@@ -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;