aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/ioport.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/ioport.c')
-rw-r--r--arch/sparc/kernel/ioport.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 1b9f07c07640..b81748119cf7 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -409,9 +409,6 @@ struct dma_map_ops sbus_dma_ops = {
409 .sync_sg_for_device = sbus_sync_sg_for_device, 409 .sync_sg_for_device = sbus_sync_sg_for_device,
410}; 410};
411 411
412struct dma_map_ops *dma_ops = &sbus_dma_ops;
413EXPORT_SYMBOL(dma_ops);
414
415static int __init sparc_register_ioport(void) 412static int __init sparc_register_ioport(void)
416{ 413{
417 register_proc_sparc_ioport(); 414 register_proc_sparc_ioport();
@@ -423,7 +420,9 @@ arch_initcall(sparc_register_ioport);
423 420
424#endif /* CONFIG_SBUS */ 421#endif /* CONFIG_SBUS */
425 422
426#ifdef CONFIG_PCI 423
424/* LEON reuses PCI DMA ops */
425#if defined(CONFIG_PCI) || defined(CONFIG_SPARC_LEON)
427 426
428/* Allocate and map kernel buffer using consistent mode DMA for a device. 427/* Allocate and map kernel buffer using consistent mode DMA for a device.
429 * hwdev should be valid struct pci_dev pointer for PCI devices. 428 * hwdev should be valid struct pci_dev pointer for PCI devices.
@@ -663,7 +662,16 @@ struct dma_map_ops pci32_dma_ops = {
663}; 662};
664EXPORT_SYMBOL(pci32_dma_ops); 663EXPORT_SYMBOL(pci32_dma_ops);
665 664
666#endif /* CONFIG_PCI */ 665#endif /* CONFIG_PCI || CONFIG_SPARC_LEON */
666
667#ifdef CONFIG_SPARC_LEON
668struct dma_map_ops *dma_ops = &pci32_dma_ops;
669#elif defined(CONFIG_SBUS)
670struct dma_map_ops *dma_ops = &sbus_dma_ops;
671#endif
672
673EXPORT_SYMBOL(dma_ops);
674
667 675
668/* 676/*
669 * Return whether the given PCI device DMA address mask can be 677 * Return whether the given PCI device DMA address mask can be