summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-01-23 19:39:06 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 20:00:28 (GMT)
commitd5255afb932aca4d64fedfc791fd1142defdd5dd (patch)
tree9ef251861788b78ad6431da2821b738db3ddf2d7
parentb2b82184c9c9a82553bfd49e7940ebc67fe655a8 (diff)
downloadlinux-d5255afb932aca4d64fedfc791fd1142defdd5dd.tar.xz
staging: comedi: addi_apci_3501: simplify eeprom read
This driver needs to read the on-board eeprom to determine the number of analog output channels (4 or 8) on the board. But, sinde we know the board has an eeprom and the PCI controller chip is an AMCC S5933, we can simplify the code and remove the code that sets the extra wait state neede for the AMCC S5920. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_3501.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c
index 3c82596..0c57d70 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3501.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3501.c
@@ -173,7 +173,6 @@ static int apci3501_auto_attach(struct comedi_device *dev,
struct addi_private *devpriv;
struct comedi_subdevice *s;
int ret, n_subdevices;
- unsigned int dw_Dummy;
this_board = addi_find_boardinfo(dev, pcidev);
if (!this_board)
@@ -224,22 +223,7 @@ static int apci3501_auto_attach(struct comedi_device *dev,
dev->irq = pcidev->irq;
}
- /* Read eepeom and fill addi_board Structure */
-
- if (this_board->i_PCIEeprom) {
- if (!(strcmp(this_board->pc_EepromChip, "S5920"))) {
- /* Set 3 wait stait */
- if (!(strcmp(dev->board_name, "apci035")))
- outl(0x80808082, devpriv->i_IobaseAmcc + 0x60);
- else
- outl(0x83838383, devpriv->i_IobaseAmcc + 0x60);
-
- /* Enable the interrupt for the controller */
- dw_Dummy = inl(devpriv->i_IobaseAmcc + 0x38);
- outl(dw_Dummy | 0x2000, devpriv->i_IobaseAmcc + 0x38);
- }
- addi_eeprom_read_info(dev, pci_resource_start(pcidev, 0));
- }
+ addi_eeprom_read_info(dev, pci_resource_start(pcidev, 0));
n_subdevices = 7;
ret = comedi_alloc_subdevices(dev, n_subdevices);