Re: [PATCH] can: mcp251x: Use dmam_alloc_coherent

From: christian pellegrin
Date: Tue Aug 05 2014 - 07:02:57 EST


Hi all,

BTW the reason that use of DMA is selectable by a parameter is that on
some architectures (for example the venerable S3C24x0) the cost for
its setup is so high that it doesn't make sense for smaller transfers.
I absolutely agree with Stefano and Alexander, the SPI master driver
is in the best position to decide if DMA is worth or not.


On Tue, Aug 5, 2014 at 10:23 AM, Stefano Babic <sbabic@xxxxxxx> wrote:
>> Just for information: On my opinion, all SPI DMA stuff should be going into SPI layer.
>> It is not a good idea to keep this into this driver.
>
> If I can add my two cents, I agree with Alexander. An underlying SPI
> (master) controller driver can or cannot support DMA transfer, and this
> should be transparent to the CAN layer. The mcp251x driver works with
> both of them, taking advantage when DMA is available.




--
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/