diff options
Diffstat (limited to 'arch/mips/mips-boards/generic/pci-dma.c')
-rw-r--r-- | arch/mips/mips-boards/generic/pci-dma.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/arch/mips/mips-boards/generic/pci-dma.c b/arch/mips/mips-boards/generic/pci-dma.c deleted file mode 100644 index 316ec9029..000000000 --- a/arch/mips/mips-boards/generic/pci-dma.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Carsten Langgaard, carstenl@mips.com - * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. - * - * ######################################################################## - * - * This program is free software; you can distribute it and/or modify it - * under the terms of the GNU General Public License (Version 2) as - * published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * ######################################################################## - * - * Dynamic DMA mapping support. - * - */ -#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; - - if (hwdev == NULL || hwdev->dma_mask != 0xffffffff) - gfp |= GFP_DMA; - ret = (void *) __get_free_pages(gfp, get_order(size)); - - if (ret != NULL) { - memset(ret, 0, size); - *dma_handle = virt_to_bus(ret); - } - - dma_cache_wback_inv((unsigned long)ret, size); - 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) KSEG0ADDR(vaddr), get_order(size)); -} - - |