]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/sn/pci/pci_dma.c
[PATCH] PCI: altix: msi support
[linux-2.6-omap-h63xx.git] / arch / ia64 / sn / pci / pci_dma.c
index 5a36292388eb79d420db590c0ab0655bd9649afa..7a291a27151186abb95eefb79f16091ebb44a4b7 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <linux/module.h>
 #include <asm/dma.h>
-#include <asm/sn/pcibr_provider.h>
+#include <asm/sn/intr.h>
 #include <asm/sn/pcibus_provider_defs.h>
 #include <asm/sn/pcidev.h>
 #include <asm/sn/sn_sal.h>
@@ -113,7 +113,8 @@ void *sn_dma_alloc_coherent(struct device *dev, size_t size,
         * resources.
         */
 
-       *dma_handle = provider->dma_map_consistent(pdev, phys_addr, size);
+       *dma_handle = provider->dma_map_consistent(pdev, phys_addr, size,
+                                                  SN_DMA_ADDR_PHYS);
        if (!*dma_handle) {
                printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__);
                free_pages((unsigned long)cpuaddr, get_order(size));
@@ -176,7 +177,7 @@ dma_addr_t sn_dma_map_single(struct device *dev, void *cpu_addr, size_t size,
        BUG_ON(dev->bus != &pci_bus_type);
 
        phys_addr = __pa(cpu_addr);
-       dma_addr = provider->dma_map(pdev, phys_addr, size);
+       dma_addr = provider->dma_map(pdev, phys_addr, size, SN_DMA_ADDR_PHYS);
        if (!dma_addr) {
                printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__);
                return 0;
@@ -260,7 +261,8 @@ int sn_dma_map_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
        for (i = 0; i < nhwentries; i++, sg++) {
                phys_addr = SG_ENT_PHYS_ADDRESS(sg);
                sg->dma_address = provider->dma_map(pdev,
-                                                   phys_addr, sg->length);
+                                                   phys_addr, sg->length,
+                                                   SN_DMA_ADDR_PHYS);
 
                if (!sg->dma_address) {
                        printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__);
@@ -335,10 +337,10 @@ int sn_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
         */
 
        SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE,
-               pci_domain_nr(bus), bus->number,
-               0, /* io */
-               0, /* read */
-               port, size, __pa(val));
+                pci_domain_nr(bus), bus->number,
+                0, /* io */
+                0, /* read */
+                port, size, __pa(val));
 
        if (isrv.status == 0)
                return size;
@@ -381,10 +383,10 @@ int sn_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
         */
 
        SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE,
-               pci_domain_nr(bus), bus->number,
-               0, /* io */
-               1, /* write */
-               port, size, __pa(&val));
+                pci_domain_nr(bus), bus->number,
+                0, /* io */
+                1, /* write */
+                port, size, __pa(&val));
 
        if (isrv.status == 0)
                return size;