aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorKristoffer Glembo <kristoffer@gaisler.com>2011-01-17 23:10:26 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-16 21:18:58 -0400
commit1830474696bb01a77a3cfff477c34e0aa087ecce (patch)
tree281c3273fc6cfa0956f74095a71eb23838c7d992 /arch/sparc
parentb8682cefb861c61ced6ca2300a5ef96e91c6dbff (diff)
sparc/leon: Add LEON dma_ops.
This patch sets the dma_ops structure for LEON. It reuses the pci32_dma_ops. Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-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