diff options
author | Magnus Damm <magnus.damm@gmail.com> | 2008-01-24 10:40:50 +0100 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-28 05:19:04 +0100 |
commit | a724605cb7a66d423a494a395f9a8ba871b8a1eb (patch) | |
tree | 4f6345db7b6fb3001782c688c6fd1f07ae9be1b6 /arch/sh/drivers/pci/fixups-dreamcast.c | |
parent | sh: declared coherent memory support V2 (diff) | |
download | linux-a724605cb7a66d423a494a395f9a8ba871b8a1eb.tar.xz linux-a724605cb7a66d423a494a395f9a8ba871b8a1eb.zip |
sh: use declared coherent memory for dreamcast pci ethernet adapter
This patch makes the dreamcast use the recently added declared coherent
memory functions to point out the memory window suitable for dma.
Apart from cleaning up, this gives the dreamcast a proper memory allocator
for pci dma memory.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci/fixups-dreamcast.c')
-rw-r--r-- | arch/sh/drivers/pci/fixups-dreamcast.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sh/drivers/pci/fixups-dreamcast.c b/arch/sh/drivers/pci/fixups-dreamcast.c index 6f53f8200dc3..c44699301eeb 100644 --- a/arch/sh/drivers/pci/fixups-dreamcast.c +++ b/arch/sh/drivers/pci/fixups-dreamcast.c @@ -22,6 +22,7 @@ #include <linux/init.h> #include <linux/irq.h> #include <linux/pci.h> +#include <linux/dma-mapping.h> #include <asm/io.h> #include <asm/irq.h> @@ -40,6 +41,15 @@ static void __init gapspci_fixup_resources(struct pci_dev *dev) */ dev->resource[1].start = p->io_resource->start + 0x100; dev->resource[1].end = dev->resource[1].start + 0x200 - 1; + /* + * Redirect dma memory allocations to special memory window. + */ + BUG_ON(!dma_declare_coherent_memory(&dev->dev, + GAPSPCI_DMA_BASE, + GAPSPCI_DMA_BASE, + GAPSPCI_DMA_SIZE, + DMA_MEMORY_MAP | + DMA_MEMORY_EXCLUSIVE)); break; default: printk("PCI: Failed resource fixup\n"); |