ccio-dma.c (7753a91e78811f6fcefc9f59630286a698b814b2) ccio-dma.c (9b8eeab019762fa43c5ffa6e2f8e1039f8e99157)
1/*
2** ccio-dma.c:
3** DMA management routines for first generation cache-coherent machines.
4** Program U2/Uturn in "Virtual Mode" and use the I/O MMU.
5**
6** (c) Copyright 2000 Grant Grundler
7** (c) Copyright 2000 Ryan Bradetich
8** (c) Copyright 2000 Hewlett-Packard Company

--- 41 unchanged lines hidden (view full) ---

50#include <asm/cache.h> /* for L1_CACHE_BYTES */
51#include <linux/uaccess.h>
52#include <asm/page.h>
53#include <asm/dma.h>
54#include <asm/io.h>
55#include <asm/hardware.h> /* for register_module() */
56#include <asm/parisc-device.h>
57
1/*
2** ccio-dma.c:
3** DMA management routines for first generation cache-coherent machines.
4** Program U2/Uturn in "Virtual Mode" and use the I/O MMU.
5**
6** (c) Copyright 2000 Grant Grundler
7** (c) Copyright 2000 Ryan Bradetich
8** (c) Copyright 2000 Hewlett-Packard Company

--- 41 unchanged lines hidden (view full) ---

50#include <asm/cache.h> /* for L1_CACHE_BYTES */
51#include <linux/uaccess.h>
52#include <asm/page.h>
53#include <asm/dma.h>
54#include <asm/io.h>
55#include <asm/hardware.h> /* for register_module() */
56#include <asm/parisc-device.h>
57
58#include "iommu.h"
59
58/*
59** Choose "ccio" since that's what HP-UX calls it.
60** Make it easier for folks to migrate from one to the other :^)
61*/
62#define MODULE_NAME "ccio"
63
64#undef DEBUG_CCIO_RES
65#undef DEBUG_CCIO_RUN

--- 639 unchanged lines hidden (view full) ---

705ccio_dma_supported(struct device *dev, u64 mask)
706{
707 if(dev == NULL) {
708 printk(KERN_ERR MODULE_NAME ": EISA/ISA/et al not supported\n");
709 BUG();
710 return 0;
711 }
712
60/*
61** Choose "ccio" since that's what HP-UX calls it.
62** Make it easier for folks to migrate from one to the other :^)
63*/
64#define MODULE_NAME "ccio"
65
66#undef DEBUG_CCIO_RES
67#undef DEBUG_CCIO_RUN

--- 639 unchanged lines hidden (view full) ---

707ccio_dma_supported(struct device *dev, u64 mask)
708{
709 if(dev == NULL) {
710 printk(KERN_ERR MODULE_NAME ": EISA/ISA/et al not supported\n");
711 BUG();
712 return 0;
713 }
714
713 /* only support 32-bit or better devices (ie PCI/GSC) */
714 return (int)(mask >= 0xffffffffUL);
715 /* only support 32-bit devices (ie PCI/GSC) */
716 return (int)(mask == 0xffffffffUL);
715}
716
717/**
718 * ccio_map_single - Map an address range into the IOMMU.
719 * @dev: The PCI device.
720 * @addr: The start address of the DMA region.
721 * @size: The length of the DMA region.
722 * @direction: The direction of the DMA transaction (to/from device).

--- 851 unchanged lines hidden ---
717}
718
719/**
720 * ccio_map_single - Map an address range into the IOMMU.
721 * @dev: The PCI device.
722 * @addr: The start address of the DMA region.
723 * @size: The length of the DMA region.
724 * @direction: The direction of the DMA transaction (to/from device).

--- 851 unchanged lines hidden ---