[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150318111927.GJ32683@intel.com>
Date: Wed, 18 Mar 2015 16:49:27 +0530
From: Vinod Koul <vinod.koul@...el.com>
To: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@...tec.com>
Cc: dan.j.williams@...el.com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, alex@...x-smith.me.uk
Subject: Re: [PATCH_V3 2/3] dma: jz4780: add driver for the Ingenic JZ4780
DMA controller
On Tue, Mar 17, 2015 at 06:07:36PM +0000, Zubair Lutfullah Kakakhel wrote:
> >> +static uint32_t jz4780_dma_transfer_size(unsigned long val, int *ord)
> >> +{
> >> + *ord = ffs(val) - 1;
> >> +
> >> + /* 8 byte transfer sizes unsupported so fall back on 4. */
> > okay falling back is not a good idea, same applies for default in
> > jz4780_dma_width(). The slave dma parameters are match with devices, so
> > programming something which you dont support, falling back or using defaults
> > is not a good idea
> How bad of an idea is it and what is a better way?
> I see similar stuff in imx-dma and dma-jz4740.
>
> And my jz4740-mmc driver (I add jz4780 support and use it to test this dma driver mainly)
> falls back on defaults after it requests a larger transfer size.
Well emmc it might work, but consider you did fall back on audio playback,
you will get crapped out audio, or a SPI transfer.
That is why falling back causes issues, so right way would be return error
and have driver fixed for it
--
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists