diff options
Diffstat (limited to 'arch/sparc/kernel/ioport.c')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index a2846f5e32d8..0f094db918c7 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -55,17 +55,13 @@ const struct sparc32_dma_ops *sparc32_dma_ops; | |||
55 | /* This function must make sure that caches and memory are coherent after DMA | 55 | /* This function must make sure that caches and memory are coherent after DMA |
56 | * On LEON systems without cache snooping it flushes the entire D-CACHE. | 56 | * On LEON systems without cache snooping it flushes the entire D-CACHE. |
57 | */ | 57 | */ |
58 | #ifndef CONFIG_SPARC_LEON | ||
59 | static inline void dma_make_coherent(unsigned long pa, unsigned long len) | 58 | static inline void dma_make_coherent(unsigned long pa, unsigned long len) |
60 | { | 59 | { |
60 | if (sparc_cpu_model == sparc_leon) { | ||
61 | if (!sparc_leon3_snooping_enabled()) | ||
62 | leon_flush_dcache_all(); | ||
63 | } | ||
61 | } | 64 | } |
62 | #else | ||
63 | static inline void dma_make_coherent(unsigned long pa, unsigned long len) | ||
64 | { | ||
65 | if (!sparc_leon3_snooping_enabled()) | ||
66 | leon_flush_dcache_all(); | ||
67 | } | ||
68 | #endif | ||
69 | 65 | ||
70 | static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz); | 66 | static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz); |
71 | static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys, | 67 | static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys, |
@@ -427,9 +423,6 @@ arch_initcall(sparc_register_ioport); | |||
427 | #endif /* CONFIG_SBUS */ | 423 | #endif /* CONFIG_SBUS */ |
428 | 424 | ||
429 | 425 | ||
430 | /* LEON reuses PCI DMA ops */ | ||
431 | #if defined(CONFIG_PCI) || defined(CONFIG_SPARC_LEON) | ||
432 | |||
433 | /* Allocate and map kernel buffer using consistent mode DMA for a device. | 426 | /* Allocate and map kernel buffer using consistent mode DMA for a device. |
434 | * hwdev should be valid struct pci_dev pointer for PCI devices. | 427 | * hwdev should be valid struct pci_dev pointer for PCI devices. |
435 | */ | 428 | */ |
@@ -657,14 +650,11 @@ struct dma_map_ops pci32_dma_ops = { | |||
657 | }; | 650 | }; |
658 | EXPORT_SYMBOL(pci32_dma_ops); | 651 | EXPORT_SYMBOL(pci32_dma_ops); |
659 | 652 | ||
660 | #endif /* CONFIG_PCI || CONFIG_SPARC_LEON */ | 653 | /* leon re-uses pci32_dma_ops */ |
654 | struct dma_map_ops *leon_dma_ops = &pci32_dma_ops; | ||
655 | EXPORT_SYMBOL(leon_dma_ops); | ||
661 | 656 | ||
662 | #ifdef CONFIG_SPARC_LEON | ||
663 | struct dma_map_ops *dma_ops = &pci32_dma_ops; | ||
664 | #elif defined(CONFIG_SBUS) | ||
665 | struct dma_map_ops *dma_ops = &sbus_dma_ops; | 657 | struct dma_map_ops *dma_ops = &sbus_dma_ops; |
666 | #endif | ||
667 | |||
668 | EXPORT_SYMBOL(dma_ops); | 658 | EXPORT_SYMBOL(dma_ops); |
669 | 659 | ||
670 | 660 | ||