Re: spi-imx: wait_for_completion should timeout even in non-DMA transfer cases

2015-09-22 Thread Mark Brown
On Mon, Sep 21, 2015 at 11:08:55AM +0200, Jean-Michel Hautbois wrote: > 2015-09-19 19:56 GMT+02:00 Mark Brown : > > A calculated timeout is probably best. > Well, it depends... > If you have a 20MHz clock, then you can transfer a byte in 4µs. > As most of the time pio_transfer is used for 8 to 32

Re: spi-imx: wait_for_completion should timeout even in non-DMA transfer cases

2015-09-21 Thread Jean-Michel Hautbois
2015-09-19 19:56 GMT+02:00 Mark Brown : > On Fri, Sep 18, 2015 at 02:38:27PM +0200, Jean-Michel Hautbois wrote: >> Hi, >> >> I am wondering why in spi-imx the spi_imx_pio_transfer() function is >> calling wait_for_completion() and not wait_for_completion_timeout() as >> in the spi_imx_dma_transfer(

Re: spi-imx: wait_for_completion should timeout even in non-DMA transfer cases

2015-09-19 Thread Mark Brown
On Fri, Sep 18, 2015 at 02:38:27PM +0200, Jean-Michel Hautbois wrote: > Hi, > > I am wondering why in spi-imx the spi_imx_pio_transfer() function is > calling wait_for_completion() and not wait_for_completion_timeout() as > in the spi_imx_dma_transfer() one. > I can't see a good reason for this, m