Commit 158f8511 authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] ia64: kill snia_pciio_*

These strange mixups of Linux and IRIX PCI interfaces were used in SGI's
2.4 tree for their port of the IRIX scsi code.  They have no business to
stgay in 2.6.
parent 7737ac5e
......@@ -14,6 +14,7 @@
#include <linux/sched.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <asm/sn/sgi.h>
#include <asm/sn/xtalk/xbow.h> /* Must be before iograph.h to get MAX_PORT_NUM */
#include <asm/sn/iograph.h>
......@@ -1399,27 +1400,10 @@ pciio_info_type1_get(pciio_info_t pci_info)
return(0);
}
/*
* These are complementary Linux interfaces that takes in a pci_dev * as the
* first arguement instead of vertex_hdl_t.
* XXX: should probably be called __sn2_pci_rrb_alloc
*/
iopaddr_t snia_pciio_dmatrans_addr(struct pci_dev *, device_desc_t, paddr_t, size_t, unsigned);
pciio_dmamap_t snia_pciio_dmamap_alloc(struct pci_dev *, device_desc_t, size_t, unsigned);
void snia_pciio_dmamap_free(pciio_dmamap_t);
iopaddr_t snia_pciio_dmamap_addr(pciio_dmamap_t, paddr_t, size_t);
void snia_pciio_dmamap_done(pciio_dmamap_t);
pciio_endian_t snia_pciio_endian_set(struct pci_dev *pci_dev, pciio_endian_t device_end,
pciio_endian_t desired_end);
#include <linux/module.h>
EXPORT_SYMBOL(snia_pciio_dmatrans_addr);
EXPORT_SYMBOL(snia_pciio_dmamap_alloc);
EXPORT_SYMBOL(snia_pciio_dmamap_free);
EXPORT_SYMBOL(snia_pciio_dmamap_addr);
EXPORT_SYMBOL(snia_pciio_dmamap_done);
EXPORT_SYMBOL(snia_pciio_endian_set);
/* used by qla1280 */
int
snia_pcibr_rrb_alloc(struct pci_dev *pci_dev,
int *count_vchan0,
......@@ -1431,6 +1415,13 @@ snia_pcibr_rrb_alloc(struct pci_dev *pci_dev,
}
EXPORT_SYMBOL(snia_pcibr_rrb_alloc);
/*
* XXX: interface should be more like
*
* int __sn2_pci_enable_bwswap(struct pci_dev *dev);
* void __sn2_pci_disable_bswap(struct pci_dev *dev);
*/
/* used by ioc4 ide */
pciio_endian_t
snia_pciio_endian_set(struct pci_dev *pci_dev,
pciio_endian_t device_end,
......@@ -1441,62 +1432,4 @@ snia_pciio_endian_set(struct pci_dev *pci_dev,
return DEV_FUNC(dev, endian_set)
(dev, device_end, desired_end);
}
iopaddr_t
snia_pciio_dmatrans_addr(struct pci_dev *pci_dev, /* translate for this device */
device_desc_t dev_desc, /* device descriptor */
paddr_t paddr, /* system physical address */
size_t byte_count, /* length */
unsigned flags)
{ /* defined in dma.h */
vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev);
/*
* If the device is not a PIC, we always want the PCIIO_BYTE_STREAM to be
* set. Otherwise, it must not be set. This applies to SN1 and SN2.
*/
return DEV_FUNC(dev, dmatrans_addr)
(dev, dev_desc, paddr, byte_count, (IS_PIC_DEVICE(pci_dev)) ? (flags & ~PCIIO_BYTE_STREAM) : flags | PCIIO_BYTE_STREAM);
}
pciio_dmamap_t
snia_pciio_dmamap_alloc(struct pci_dev *pci_dev, /* set up mappings for this device */
device_desc_t dev_desc, /* device descriptor */
size_t byte_count_max, /* max size of a mapping */
unsigned flags)
{ /* defined in dma.h */
vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev);
/*
* If the device is not a PIC, we always want the PCIIO_BYTE_STREAM to be
* set. Otherwise, it must not be set. This applies to SN1 and SN2.
*/
return (pciio_dmamap_t) DEV_FUNC(dev, dmamap_alloc)
(dev, dev_desc, byte_count_max, (IS_PIC_DEVICE(pci_dev)) ? (flags & ~PCIIO_BYTE_STREAM) : flags | PCIIO_BYTE_STREAM);
}
void
snia_pciio_dmamap_free(pciio_dmamap_t pciio_dmamap)
{
DMAMAP_FUNC(pciio_dmamap, dmamap_free)
(CAST_DMAMAP(pciio_dmamap));
}
iopaddr_t
snia_pciio_dmamap_addr(pciio_dmamap_t pciio_dmamap, /* use these mapping resources */
paddr_t paddr, /* map for this address */
size_t byte_count)
{ /* map this many bytes */
return DMAMAP_FUNC(pciio_dmamap, dmamap_addr)
(CAST_DMAMAP(pciio_dmamap), paddr, byte_count);
}
void
snia_pciio_dmamap_done(pciio_dmamap_t pciio_dmamap)
{
DMAMAP_FUNC(pciio_dmamap, dmamap_done)
(CAST_DMAMAP(pciio_dmamap));
}
EXPORT_SYMBOL(snia_pciio_endian_set);
......@@ -60,11 +60,6 @@ struct sn_device_sysdata {
volatile unsigned int *xbow_buf_sync;
};
struct sn_dma_maps_s{
struct pcibr_dmamap_s dma_map;
dma_addr_t dma_addr;
};
struct ioports_to_tlbs_s {
unsigned long p:1,
rv_1:1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment