lkml.org 
[lkml]   [2012]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] spi: omap2-mcspi: In case of dma errors fall back to pio
* Shubhrajyoti D <shubhrajyoti@ti.com> [120724 23:26]:
> In case there are dma errors currently the driver exits.
> Make the spi driver fall back to pio mode in case of dma errors.
>
> If the DMA engine is not selected the driver
> exits.This patch makes the spi fall back to pio in that case.
>
> Also adds a field dma_unusable to struct omap2_mcspi.
>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> ---
> drivers/spi/spi-omap2-mcspi.c | 21 +++++++++++++--------
> 1 files changed, 13 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
> index bc47781..f243a39 100644
> --- a/drivers/spi/spi-omap2-mcspi.c
> +++ b/drivers/spi/spi-omap2-mcspi.c
> @@ -129,6 +129,7 @@ struct omap2_mcspi {
> struct omap2_mcspi_dma *dma_channels;
> struct device *dev;
> struct omap2_mcspi_regs ctx;
> + int dma_unusable;
> };

Don't you need to check separately for rx and tx dma? There's a slight
chance that you get a channel for one but not for the other..

Tony


\
 
 \ /
  Last update: 2012-08-07 10:22    [W:0.081 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site