diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-11-24 01:16:40 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-11-24 01:16:40 +0000 |
commit | 85296f5e0eea548ce591b07bbf1994eb787ce7dc (patch) | |
tree | cbba265277e25fa8f2587c1979f48efc4f26dff0 /arch/mips/sni | |
parent | 9008d8ec28fc34ead99061698b0491f47c624cb9 (diff) |
Cleanup PCI DMA for RM200C also.
Diffstat (limited to 'arch/mips/sni')
-rw-r--r-- | arch/mips/sni/Makefile | 3 | ||||
-rw-r--r-- | arch/mips/sni/dma.c | 42 |
2 files changed, 1 insertions, 44 deletions
diff --git a/arch/mips/sni/Makefile b/arch/mips/sni/Makefile index 6589a47c6..50c04359a 100644 --- a/arch/mips/sni/Makefile +++ b/arch/mips/sni/Makefile @@ -1,4 +1,3 @@ -# $Id: Makefile,v 1.3 1999/01/04 16:03:57 ralf Exp $ # # Makefile for the SNI specific part of the kernel # @@ -14,7 +13,7 @@ all: sni.o O_TARGET := sni.o -O_OBJS := dma.o int-handler.o io.o irq.o pci.o pcimt_scache.o reset.o setup.o +O_OBJS := int-handler.o io.o irq.o pci.o pcimt_scache.o reset.o setup.o int-handler.o: int-handler.S diff --git a/arch/mips/sni/dma.c b/arch/mips/sni/dma.c deleted file mode 100644 index 2f092abf4..000000000 --- a/arch/mips/sni/dma.c +++ /dev/null @@ -1,42 +0,0 @@ -/* $Id: dma.c,v 1.1 2000/02/18 00:24:30 ralf Exp $ - * - * Dynamic DMA mapping support. - * - * On RM200 there is no hardware dynamic DMA address translation, - * so consistent alloc/free are merely page allocation/freeing. - * The rest of the dynamic DMA mapping interface is implemented - * in <asm/pci.h>. - * - * These routines assume that the RM has all it's memory at physical - * addresses of < 512mb. - */ -#include <linux/types.h> -#include <linux/mm.h> -#include <linux/string.h> -#include <linux/pci.h> -#include <asm/io.h> - -void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, - dma_addr_t *dma_handle) -{ - void *ret; - int gfp = GFP_ATOMIC; - int order = get_order(size); - - if (hwdev == NULL || hwdev->dma_mask != 0xffffffff) - gfp |= GFP_DMA; - ret = (void *)__get_free_pages(gfp, order); - - if (ret != NULL) { - memset(ret, 0, size); - *dma_handle = virt_to_bus(ret); - } - dma_cache_wback_inv(ret, PAGE_SIZE << order); - return KSEG1ADDR(ret); -} - -void pci_free_consistent(struct pci_dev *hwdev, size_t size, - void *vaddr, dma_addr_t dma_handle) -{ - free_pages((unsigned long)vaddr, get_order(size)); -} |