diff options
author | root <root@iss-tomyspiel-l> | 2011-07-04 16:21:23 +0200 |
---|---|---|
committer | root <root@iss-tomyspiel-l> | 2011-07-04 16:21:23 +0200 |
commit | 2e7a7a3534bcf591c0d6c65105b2d845f293112f (patch) | |
tree | d0e5d2f9ea246ff55134205f7ac3af0d9599e641 /driver/base.c | |
parent | 70937611e34577151a6607640050e8b164a54e70 (diff) | |
download | pcitool-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.gz pcitool-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.bz2 pcitool-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.xz pcitool-2e7a7a3534bcf591c0d6c65105b2d845f293112f.zip |
North West Logick DMA implementation
Diffstat (limited to 'driver/base.c')
-rw-r--r-- | driver/base.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/driver/base.c b/driver/base.c index 581e6d5..2c3ff23 100644 --- a/driver/base.c +++ b/driver/base.c @@ -319,6 +319,17 @@ static int __devinit pcidriver_probe(struct pci_dev *pdev, const struct pci_devi mod_info("Couldn't enable device\n"); goto probe_pcien_fail; } + + /* Bus master & dma */ + if ((id->vendor == PCIE_XILINX_VENDOR_ID)&&(id->device == PCIE_IPECAMERA_DEVICE_ID)) { + pci_set_master(pdev); + + err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); + if (err < 0) { + printk(KERN_ERR "pci_set_dma_mask failed\n"); + goto probe_dma_fail; + } + } /* Set Memory-Write-Invalidate support */ if ((err = pci_set_mwi(pdev)) != 0) @@ -404,6 +415,7 @@ probe_irq_probe_fail: probe_nomem: atomic_dec(&pcidriver_deviceCount); probe_maxdevices_fail: +probe_dma_fail: pci_disable_device(pdev); probe_pcien_fail: return err; |