On Fri, 05 Aug 2005 06:34:53 -0700
[EMAIL PROTECTED] wrote:

> > +static void *mq_alloc_buffer (struct usb_ep *_ep, unsigned bytes,
> > +                            dma_addr_t *dma, int gfp_flags)
> > +{
> > +   return kmalloc (bytes, gfp_flags);
> > +}
> > +
> > +static void mq_free_buffer (struct usb_ep *_ep, void *buf,
> > dma_addr_t dma,
> > +                       unsigned bytes)
> > +{
> > +   kfree (buf);
> > +}
> This isn't actually correct except on machines where all data
> caches are DMA-coherent.  The PXA chips are, and I know this
> driver is currently in use mostly on those chips.   However, it
> can be configured for non-PXA chips ... it's worth at least a
> comment about that assumption, which can easily be wrong.
Nope, its correct for all platforms. MediaQ 11xx can send/receive data
only from/to its internal memory (PXA DMA isn't used, it has internal
DMA), alas the internal buffer is so small (256K plus about 160K is
eaten by the framebuffer) that I didn't dare to allocate UDC buffers
directly in MediaQ internal memory; instead it allocates two cyclic
buffers in internal RAM and copies sent/received data from/to those
buffers with simple memcpy().

-- 
Greetings,
   Andrew


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to