Re: [PATCH_V3 2/3] dma: jz4780: add driver for the Ingenic JZ4780 DMA controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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 devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux