Commit a9851cc3 authored by Alexander Ivanov's avatar Alexander Ivanov
Browse files

map.c has fix added for DAC modules with PEX8111 interface chips ie

all those boards that are native PCIe and not PCM cards (older revs).



git-svn-id: https://redoubt.ligo-wa.caltech.edu/svn/advLigoRTS/branches/branch-2.3@2797 6dcd42c9-f523-4c6d-aada-af552506706e
parent 0588e01d
......@@ -607,6 +607,28 @@ unsigned int readInputCDIO6464l(CDS_HARDWARE *pHardware, int modNum)
return out;
}
void set_8111_prefetch(struct pci_dev *dacdev) {
struct pci_dev *dev = dacdev->bus->self;
printk("set_8111_prefetch: subsys=0x%x; vendor=0x%x\n", dev->device, dev->vendor);
if ((dev->device == 0x8111) && (dev->vendor == PLX_VID)) {
unsigned int reg;
// Handle PEX 8111 setup, enable prefetch, set pref size to 64
// These numbers come from reverse engineering the GSC pxe8111 driver
// and using their prefetch program to enable the prefetch and set pref size to 64
pci_write_config_dword(dev,132, 72);
pci_read_config_dword(dev,136, &reg);
pci_write_config_dword(dev,136, reg);
pci_write_config_dword(dev,132, 72);
pci_read_config_dword(dev,136, &reg);
pci_write_config_dword(dev,136, reg | 1);
pci_write_config_dword(dev,132, 12);
pci_read_config_dword(dev,136, &reg);
pci_write_config_dword(dev,136, reg | 0x8000000);
}
}
// *****************************************************************************
// Routine to initialize DAC modules
// *****************************************************************************
......@@ -671,6 +693,8 @@ int mapDac(CDS_HARDWARE *pHardware, struct pci_dev *dacdev)
pHardware->dacConfig[devNum] = (int) (dacPtr[devNum]->ASSC);
pHardware->dacType[devNum] = GSC_16AO16;
pHardware->dacCount ++;
set_8111_prefetch(dacdev);
return(0);
}
......@@ -744,6 +768,8 @@ int map18bitDac(CDS_HARDWARE *pHardware, struct pci_dev *dacdev)
pHardware->dacConfig[devNum] = (int) (dac18bitPtr->ASY_CONFIG);
pHardware->dacType[devNum] = GSC_18AO8;
pHardware->dacCount ++;
set_8111_prefetch(dacdev);
return(0);
}
......
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