[U-Boot] [PATCH 2/6] usb:udc:samsung: Remove redundant cache operation from Samsung UDC driver

Marek Vasut
2014-02-03T18:06:59Z

On Monday, February 03, 2014 at 09:05:06 AM, Lukasz Majewski wrote:

[...]

> > > To sum up:
> > >
> > > 1. s3c_udc_ep0_zlp - EP0 ZLP packets don't need to invalidate the
> > > cache (since it is zero length transmission)
> > >
> > > 2. s3c_udc_pre_setup - cache invalidation is not needed when I setup
> > > buffer for OUT EP0 transmission.
> > >
> > > The above two invalidation calls had been added by me, and are mine
> > > mistakes. Those don't contribute to transmission speed up (and
> > > shall be regarded as a cosmetic changes)
> > >
> > > 3. setdma_rx - here I invalidate parts of the s3c UDC driver's
> > > internal buffer. This call is not needed anymore since we reuse the
> > > buffers passed from gadgets.
> >
> > And you do correct cache management on those in the UDC driver or in
> > the gadget driver ?
>
> For download, buffers are allocated in gadgets. Then buffer is passed
> to the UDC driver in a USB request.
> After receiving data via USB the UDC driver takes care to invalidate
> cache, hence the gadget can work on the data.
>
> Cache management is performed in the UDC driver.

OK, this is the correct place. I just wanted to make sure about this. Thanks :)

> > > This is the key speed improvement here.
> >
> > This should be in the commit message really ;-)
>
> I wrongly assumed, that code explains what was the rationale :-). I'm
> going to prepare more verbose commit message for v2.

Please do, thanks!

Best regards,
Marek Vasut