Re: [U-Boot] [PATCH 1/2] common: make bouncebuf work for non-DMA transfers

2017-11-16 Thread Vignesh R
On Thursday 16 November 2017 04:21 PM, Goldschmidt Simon wrote: > Hi Vignesh, > > Vignesh R wrote: >> [..] >> Its not actually unaligned access, cadence QSPI IP on TI platforms do >> not support non-byte accesses except for the last word. As per the TRM: >> "The external master is only

Re: [U-Boot] [PATCH 1/2] common: make bouncebuf work for non-DMA transfers

2017-11-16 Thread Goldschmidt Simon
Hi Vignesh, Vignesh R wrote: > [..] > Its not actually unaligned access, cadence QSPI IP on TI platforms do > not support non-byte accesses except for the last word. As per the TRM: > "The external master is only permitted to issue 32-bit data interface > writes until the last word of an indirect

Re: [U-Boot] [PATCH 1/2] common: make bouncebuf work for non-DMA transfers

2017-11-16 Thread Vignesh R
Hi Simon, On Thursday 16 November 2017 03:39 PM, Goldschmidt Simon wrote: [...] > > This 32-bit spi transfer mode does not seem to be used too often, all > other drivers I looked at are transferring byte by byte and thus can > not be used as an example. > > Additionally, the TI platform Vignesh

Re: [U-Boot] [PATCH 1/2] common: make bouncebuf work for non-DMA transfers

2017-11-16 Thread Goldschmidt Simon
Simon Goldschmidt wrote: >Marek Vasut wrote: >> So what alignment problems do you observe ? If you copy using the CPU >> only, why do you need the bounce buffer at all ? I don't quite get it. > > Sorry for not explaining it good enough: > I don't observe any alignment problems. mach-socfpga can

Re: [U-Boot] [PATCH 1/2] common: make bouncebuf work for non-DMA transfers

2017-11-15 Thread Goldschmidt Simon
Marek Vasut wrote: > So what alignment problems do you observe ? If you copy using the CPU > only, why do you need the bounce buffer at all ? I don't quite get it. Sorry for not explaining it good enough: I don't observe any alignment problems. mach-socfpga can do unaligned accesses as well. This

Re: [U-Boot] [PATCH 1/2] common: make bouncebuf work for non-DMA transfers

2017-11-15 Thread Marek Vasut
On 11/15/2017 05:18 PM, Goldschmidt Simon wrote: > Marek Vasut wrote: >> Why don't you just fix the cache operations in the driver ? > > This driver is copying CPU only. There are no cache operations involved! > Vignesh added the bounce buffer obviously to fix alignment issues on > his platform.

Re: [U-Boot] [PATCH 1/2] common: make bouncebuf work for non-DMA transfers

2017-11-15 Thread Goldschmidt Simon
Marek Vasut wrote: > Why don't you just fix the cache operations in the driver ? This driver is copying CPU only. There are no cache operations involved! Vignesh added the bounce buffer obviously to fix alignment issues on his platform. > This bounce-buffer for only CPU operations is just

Re: [U-Boot] [PATCH 1/2] common: make bouncebuf work for non-DMA transfers

2017-11-15 Thread Marek Vasut
On 11/15/2017 03:17 PM, Goldschmidt Simon wrote: > Bounce buffer may be used for CPU-only transfers (this is currently > the case for cadence_qspi). However, in this case, invalidating the > data cache might throw away copied data that is still in the cache > only. > > To make CPU-only transfers

[U-Boot] [PATCH 1/2] common: make bouncebuf work for non-DMA transfers

2017-11-15 Thread Goldschmidt Simon
Bounce buffer may be used for CPU-only transfers (this is currently the case for cadence_qspi). However, in this case, invalidating the data cache might throw away copied data that is still in the cache only. To make CPU-only transfers work with bouncebuf (but still take advantage of having