Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-06 Thread Simon Glass
Hi Marek, On 6 April 2017 at 09:33, Marek Vasut wrote: > On 04/06/2017 04:06 PM, Simon Glass wrote: >> Hi Marek, >> >> On 6 April 2017 at 04:22, Marek Vasut wrote: >>> On 04/06/2017 04:40 AM, Simon Glass wrote: Hi Marek, On 5 April 2017 at 19:32, Marek Vasut wrote: > On 04/06

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-06 Thread Marek Vasut
On 04/06/2017 04:06 PM, Simon Glass wrote: > Hi Marek, > > On 6 April 2017 at 04:22, Marek Vasut wrote: >> On 04/06/2017 04:40 AM, Simon Glass wrote: >>> Hi Marek, >>> >>> On 5 April 2017 at 19:32, Marek Vasut wrote: On 04/06/2017 03:24 AM, Simon Glass wrote: > Hi Marek, > > On

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-06 Thread Simon Glass
Hi Marek, On 6 April 2017 at 04:22, Marek Vasut wrote: > On 04/06/2017 04:40 AM, Simon Glass wrote: >> Hi Marek, >> >> On 5 April 2017 at 19:32, Marek Vasut wrote: >>> On 04/06/2017 03:24 AM, Simon Glass wrote: Hi Marek, On 5 April 2017 at 15:34, Marek Vasut wrote: > On 04/05

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-06 Thread Marek Vasut
On 04/06/2017 04:40 AM, Simon Glass wrote: > Hi Marek, > > On 5 April 2017 at 19:32, Marek Vasut wrote: >> On 04/06/2017 03:24 AM, Simon Glass wrote: >>> Hi Marek, >>> >>> On 5 April 2017 at 15:34, Marek Vasut wrote: On 04/05/2017 05:03 PM, Simon Glass wrote: > +Tom > > Hi Marek

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-05 Thread Simon Glass
Hi Marek, On 5 April 2017 at 19:32, Marek Vasut wrote: > On 04/06/2017 03:24 AM, Simon Glass wrote: >> Hi Marek, >> >> On 5 April 2017 at 15:34, Marek Vasut wrote: >>> On 04/05/2017 05:03 PM, Simon Glass wrote: +Tom Hi Marek, On 5 April 2017 at 04:21, Marek Vasut wrote:

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-05 Thread Marek Vasut
On 04/06/2017 03:24 AM, Simon Glass wrote: > Hi Marek, > > On 5 April 2017 at 15:34, Marek Vasut wrote: >> On 04/05/2017 05:03 PM, Simon Glass wrote: >>> +Tom >>> >>> Hi Marek, >>> >>> On 5 April 2017 at 04:21, Marek Vasut wrote: On 04/05/2017 12:08 PM, Simon Glass wrote: > Hi Marek, >>

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-05 Thread Simon Glass
Hi Marek, On 5 April 2017 at 15:34, Marek Vasut wrote: > On 04/05/2017 05:03 PM, Simon Glass wrote: >> +Tom >> >> Hi Marek, >> >> On 5 April 2017 at 04:21, Marek Vasut wrote: >>> On 04/05/2017 12:08 PM, Simon Glass wrote: Hi Marek, On 5 April 2017 at 03:35, Marek Vasut wrote: >>>

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-05 Thread Marek Vasut
On 04/05/2017 05:03 PM, Simon Glass wrote: > +Tom > > Hi Marek, > > On 5 April 2017 at 04:21, Marek Vasut wrote: >> On 04/05/2017 12:08 PM, Simon Glass wrote: >>> Hi Marek, >>> >>> On 5 April 2017 at 03:35, Marek Vasut wrote: On 04/05/2017 04:21 AM, Simon Glass wrote: > Hi, > >

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-05 Thread Simon Glass
+Tom Hi Marek, On 5 April 2017 at 04:21, Marek Vasut wrote: > On 04/05/2017 12:08 PM, Simon Glass wrote: >> Hi Marek, >> >> On 5 April 2017 at 03:35, Marek Vasut wrote: >>> On 04/05/2017 04:21 AM, Simon Glass wrote: Hi, On 4 April 2017 at 19:26, Kever Yang wrote: > Hi Eddie,

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-05 Thread Marek Vasut
On 04/05/2017 12:08 PM, Simon Glass wrote: > Hi Marek, > > On 5 April 2017 at 03:35, Marek Vasut wrote: >> On 04/05/2017 04:21 AM, Simon Glass wrote: >>> Hi, >>> >>> On 4 April 2017 at 19:26, Kever Yang wrote: Hi Eddie, We should only need to do only one time cache operat

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-05 Thread Simon Glass
Hi Marek, On 5 April 2017 at 03:35, Marek Vasut wrote: > On 04/05/2017 04:21 AM, Simon Glass wrote: >> Hi, >> >> On 4 April 2017 at 19:26, Kever Yang wrote: >>> Hi Eddie, >>> >>> >>> We should only need to do only one time cache operation for a buffer >>> >>> ready to do DMA transfer, so you

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-05 Thread Marek Vasut
On 04/05/2017 04:21 AM, Simon Glass wrote: > Hi, > > On 4 April 2017 at 19:26, Kever Yang wrote: >> Hi Eddie, >> >> >> We should only need to do only one time cache operation for a buffer >> >> ready to do DMA transfer, so you need to remove another cache invalidate >> >> operation for the sa

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-04 Thread Simon Glass
Hi, On 4 April 2017 at 19:26, Kever Yang wrote: > Hi Eddie, > > > We should only need to do only one time cache operation for a buffer > > ready to do DMA transfer, so you need to remove another cache invalidate > > operation for the same buffer in the same function. I think this is a more g

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-04 Thread Kever Yang
Hi Eddie, We should only need to do only one time cache operation for a buffer ready to do DMA transfer, so you need to remove another cache invalidate operation for the same buffer in the same function. Thanks, - Kever On 04/01/2017 02:51 PM, Eddie Cai wrote: We should invalidate the d

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-03 Thread Marek Vasut
On 04/03/2017 04:43 PM, Brüns, Stefan wrote: > On Samstag, 1. April 2017 08:51:39 CEST Eddie Cai wrote: >> We should invalidate the dcache before starting the DMA. In case there are >> any dirty lines from the DMA buffer in the cache, subsequent cache-line >> replacements may corrupt the buffer in

Re: [U-Boot] usb: dwc2: invalidate the dcache before starting the DMA

2017-04-03 Thread Brüns , Stefan
On Samstag, 1. April 2017 08:51:39 CEST Eddie Cai wrote: > We should invalidate the dcache before starting the DMA. In case there are > any dirty lines from the DMA buffer in the cache, subsequent cache-line > replacements may corrupt the buffer in memory while the DMA is still going > on. Cache-li