From: David Brownell Date: Wed, 28 May 2008 02:24:20 +0000 (-0700) Subject: USB: at91_udc: updated fifo sizes X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bb24280ffce6a8bc6b03d29a43ec16ac14e9ec85;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Greg Kroah-Hartman --- 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;