Re: [PATCH v3 3/3] dma: omap-dma: add support for pause of non-cyclic transfers

2015-08-11 Thread Peter Ujfalusi
On 08/11/2015 03:30 PM, Russell King - ARM Linux wrote: > On Tue, Aug 11, 2015 at 03:02:44PM +0300, Peter Ujfalusi wrote: >> On 08/07/2015 11:00 PM, Sebastian Andrzej Siewior wrote: >>> + /* >>> +* We do not allow DMA_MEM_TO_DEV transfers to be paused. >>> +* From the AM572x TRM, 16.1.4.1

Re: [PATCH v3 3/3] dma: omap-dma: add support for pause of non-cyclic transfers

2015-08-11 Thread Russell King - ARM Linux
On Tue, Aug 11, 2015 at 03:02:44PM +0300, Peter Ujfalusi wrote: > On 08/07/2015 11:00 PM, Sebastian Andrzej Siewior wrote: > > + /* > > +* We do not allow DMA_MEM_TO_DEV transfers to be paused. > > +* From the AM572x TRM, 16.1.4.18 Disabling a Channel During Transfer: > > +* "When a c

Re: [PATCH v3 3/3] dma: omap-dma: add support for pause of non-cyclic transfers

2015-08-11 Thread Peter Ujfalusi
On 08/07/2015 11:00 PM, Sebastian Andrzej Siewior wrote: > -static void omap_dma_stop(struct omap_chan *c) > +static void omap_dma_drain_chan(struct omap_chan *c) > +{ > + int i; > + uint32_t val; > + > + /* Wait for sDMA FIFO to drain */ > + for (i = 0; ; i++) { > + val

[PATCH v3 3/3] dma: omap-dma: add support for pause of non-cyclic transfers

2015-08-07 Thread Sebastian Andrzej Siewior
This DMA driver is used by 8250-omap on DRA7-evm. There is one requirement that is to pause a transfer. This is currently used on the RX side. It is possible that the UART HW aborted the RX (UART's RX-timeout) but the DMA controller starts the transfer shortly after. Before we can manually purge th