Skip to content

Commit

Permalink
sparc32: support leon + sun in dma_make_coherent()
Browse files Browse the repository at this point in the history
No need for two implementations - we check the cpu model.

Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Daniel Hellstrom <[email protected]>
Cc: Konrad Eisele <[email protected]>
  • Loading branch information
sravnborg authored and davem330 committed May 28, 2012
1 parent 87e677c commit 9583533
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions arch/sparc/kernel/ioport.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,13 @@ const struct sparc32_dma_ops *sparc32_dma_ops;
/* This function must make sure that caches and memory are coherent after DMA
* On LEON systems without cache snooping it flushes the entire D-CACHE.
*/
#ifndef CONFIG_SPARC_LEON
static inline void dma_make_coherent(unsigned long pa, unsigned long len)
{
if (sparc_cpu_model == sparc_leon) {
if (!sparc_leon3_snooping_enabled())
leon_flush_dcache_all();
}
}
#else
static inline void dma_make_coherent(unsigned long pa, unsigned long len)
{
if (!sparc_leon3_snooping_enabled())
leon_flush_dcache_all();
}
#endif

static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz);
static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys,
Expand Down

0 comments on commit 9583533

Please sign in to comment.