* [PATCH 3/6 V3] sparc/leon: Add LEON dma_ops.
@ 2011-01-18 14:10 Kristoffer Glembo
2011-01-18 19:38 ` Sam Ravnborg
2011-01-22 0:51 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Kristoffer Glembo @ 2011-01-18 14:10 UTC (permalink / raw)
To: sparclinux
This patch sets the dma_ops structure for LEON. It reuses the pci32_dma_ops.
Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
---
arch/sparc/kernel/ioport.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 1b9f07c..b817481 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -409,9 +409,6 @@ struct dma_map_ops sbus_dma_ops = {
.sync_sg_for_device = sbus_sync_sg_for_device,
};
-struct dma_map_ops *dma_ops = &sbus_dma_ops;
-EXPORT_SYMBOL(dma_ops);
-
static int __init sparc_register_ioport(void)
{
register_proc_sparc_ioport();
@@ -423,7 +420,9 @@ arch_initcall(sparc_register_ioport);
#endif /* CONFIG_SBUS */
-#ifdef CONFIG_PCI
+
+/* LEON reuses PCI DMA ops */
+#if defined(CONFIG_PCI) || defined(CONFIG_SPARC_LEON)
/* Allocate and map kernel buffer using consistent mode DMA for a device.
* hwdev should be valid struct pci_dev pointer for PCI devices.
@@ -663,7 +662,16 @@ struct dma_map_ops pci32_dma_ops = {
};
EXPORT_SYMBOL(pci32_dma_ops);
-#endif /* CONFIG_PCI */
+#endif /* CONFIG_PCI || CONFIG_SPARC_LEON */
+
+#ifdef CONFIG_SPARC_LEON
+struct dma_map_ops *dma_ops = &pci32_dma_ops;
+#elif defined(CONFIG_SBUS)
+struct dma_map_ops *dma_ops = &sbus_dma_ops;
+#endif
+
+EXPORT_SYMBOL(dma_ops);
+
/*
* Return whether the given PCI device DMA address mask can be
--
1.6.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 3/6 V3] sparc/leon: Add LEON dma_ops.
2011-01-18 14:10 [PATCH 3/6 V3] sparc/leon: Add LEON dma_ops Kristoffer Glembo
@ 2011-01-18 19:38 ` Sam Ravnborg
2011-01-22 0:51 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2011-01-18 19:38 UTC (permalink / raw)
To: sparclinux
On Tue, Jan 18, 2011 at 03:10:26PM +0100, Kristoffer Glembo wrote:
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/6 V3] sparc/leon: Add LEON dma_ops.
2011-01-18 14:10 [PATCH 3/6 V3] sparc/leon: Add LEON dma_ops Kristoffer Glembo
2011-01-18 19:38 ` Sam Ravnborg
@ 2011-01-22 0:51 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2011-01-22 0:51 UTC (permalink / raw)
To: sparclinux
From: Sam Ravnborg <sam@ravnborg.org>
Date: Tue, 18 Jan 2011 20:38:55 +0100
> On Tue, Jan 18, 2011 at 03:10:26PM +0100, Kristoffer Glembo wrote:
>> 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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-22 0:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18 14:10 [PATCH 3/6 V3] sparc/leon: Add LEON dma_ops Kristoffer Glembo
2011-01-18 19:38 ` Sam Ravnborg
2011-01-22 0:51 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.