Re: [PATCH] can: mcp251x: Use dmam_alloc_coherent

From: Stefano Babic
Date: Tue Aug 05 2014 - 04:23:18 EST


Hi Himangi,

On 02/08/2014 16:07, Alexander Shiyan wrote:
> Sat, 2 Aug 2014 19:22:04 +0530 ÐÑ Himangi Saraogi <himangi774@xxxxxxxxx>:
>> This patch moves the data allocated using dma_alloc_coherent to the
>> corresponding managed interface and does away with the calls to free the
>> allocated memory in the probe and remove functions.
>
> 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.

Best regards,
Stefano Babic


--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@xxxxxxx
=====================================================================
--
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/