Re: [PATCH 3/4 V2] Add for MCF54xx a virtual non cached zone usable for data exchange with DMA

Philippe De Muyter
2012-10-16T11:23:56Z

Hi Stany and Greg,

On Tue, Oct 16, 2012 at 12:46:02PM +0200, Stany MARCEL wrote:
>
> It might not be the usual approach in Linux, but after reading the MCF548x Reference Manual,
> I think that is the best approach for this family of MCU.

Maybe we should keep Stany's approach of reserving part of the memory
as uncached and use dma_alloc_coherent() or dma_pool_create().

Have a look at Documentation/DMA-API.txt

Best regards

Philippe

>
> Regards,
>
> Stany
>
>
> -----Original Message-----
> From: Greg Ungerer [mailto:gerg@snapgear.com]
> Sent: Tue 10/16/2012 7:15 AM
> To: Stany MARCEL
> Cc: linux-m68k@vger.kernel.org; gerg@uclinux.org
> Subject: Re: [PATCH 3/4 V2] Add for MCF54xx a virtual non cached zone usable for data exchange with DMA
>
> Hi Stany,
>
> On 15/10/12 23:22, Stany MARCEL wrote:
> > This permit to share data with DMA without caching issues. M54xx DMA bypass
> > cache so exchanged data must be flushed before DMA operation. But M54xx cache
> > opperation does not permit to easily flush concerned data. So this patch permit
> > to have a non cached zone used for GFP_DMA allocated data.
>
> Interesting, but I think this is the wrong approach.
>
> We don't want to bypass the cache. Admittedly the current cache support
> code we have for ColdFire is not great, it could be improved a lot. So
> lets do that, not work around it.
>
> Regards
> Greg