X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fgadget%2Fat91_udc.c;h=9b913afb2e6dab7beb727a7400516247b4863a59;hb=441b62c1edb986827154768d89bbac0ba779984f;hp=a83e8b798ec9d30d70ca38bd7cebc37576c217ba;hpb=8f859016ea49cd8d7c743533bd1ab3db9a813ffa;p=linux-2.6-omap-h63xx.git diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index a83e8b798ec..9b913afb2e6 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -389,6 +389,7 @@ static int write_fifo(struct at91_ep *ep, struct at91_request *req) u32 csr = __raw_readl(creg); u8 __iomem *dreg = ep->creg + (AT91_UDP_FDR(0) - AT91_UDP_CSR(0)); unsigned total, count, is_last; + u8 *buf; /* * TODO: allow for writing two packets to the fifo ... that'll @@ -413,6 +414,8 @@ static int write_fifo(struct at91_ep *ep, struct at91_request *req) return 0; } + buf = req->req.buf + req->req.actual; + prefetch(buf); total = req->req.length - req->req.actual; if (ep->ep.maxpacket < total) { count = ep->ep.maxpacket; @@ -435,7 +438,7 @@ static int write_fifo(struct at91_ep *ep, struct at91_request *req) * recover when the actual bytecount matters (e.g. for USB Test * and Measurement Class devices). */ - __raw_writesb(dreg, req->req.buf + req->req.actual, count); + __raw_writesb(dreg, buf, count); csr &= ~SET_FX; csr |= CLR_FX | AT91_UDP_TXPKTRDY; __raw_writel(csr, creg); @@ -457,7 +460,7 @@ static void nuke(struct at91_ep *ep, int status) if (list_empty(&ep->queue)) return; - VDBG("%s %s\n", __FUNCTION__, ep->ep.name); + VDBG("%s %s\n", __func__, ep->ep.name); while (!list_empty(&ep->queue)) { req = list_entry(ep->queue.next, struct at91_request, queue); done(ep, req, status); @@ -792,7 +795,7 @@ static int at91_wakeup(struct usb_gadget *gadget) int status = -EINVAL; unsigned long flags; - DBG("%s\n", __FUNCTION__ ); + DBG("%s\n", __func__ ); local_irq_save(flags); if (!udc->clocked || !udc->suspended) @@ -1884,3 +1887,4 @@ module_exit(udc_exit_module); MODULE_DESCRIPTION("AT91 udc driver"); MODULE_AUTHOR("Thomas Rathbone, David Brownell"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:at91_udc");