• Christoph Hellwig's avatar
    net: fec: use dma_alloc_noncoherent for data cache enabled coldfire · ffd32a92
    Christoph Hellwig authored
    Coldfire platforms with data caches can't properly implement
    dma_alloc_coherent and currently just return noncoherent memory from
    dma_alloc_coherent.
    
    The fec driver than works around this with a flush of all caches in the
    receive path. Make this hack a little less bad by using the explicit
    dma_alloc_noncoherent API and documenting the hacky cache flushes so
    that the DMA API level hack can be removed.
    
    Also replace the check for CONFIG_M532x for said hack with a check
    for COLDFIRE && !COLDFIRE_COHERENT_DMA.  While m532x is the only such
    platform with a fec module, this makes the code more consistent and
    easier to follow.
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
    Tested-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
    ffd32a92
fec_main.c 126 KB