linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] staging: comedi: addi_apci_1564: remove eeprom support code
@ 2014-04-27  1:35 Chase Southwood
  2014-04-27  1:36 ` [PATCH 2/6] staging: comedi: addi_apci_1564: remove unnecessary include Chase Southwood
                   ` (5 more replies)
  0 siblings, 6 replies; 29+ messages in thread
From: Chase Southwood @ 2014-04-27  1:35 UTC (permalink / raw)
  To: gregkh; +Cc: abbotti, hsweeten, devel, linux-kernel, Chase Southwood

Reading the eeprom on this board is not necessary.  All information
required is in the boardinfo.

Remove the eeprom support code which is not really useful here.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
---
 drivers/staging/comedi/drivers/addi_apci_1564.c | 46 +------------------------
 1 file changed, 1 insertion(+), 45 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
index 5f6d3b5..df8833b 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -7,7 +7,6 @@
 
 #include "addi-data/addi_common.h"
 
-#include "addi-data/addi_eeprom.c"
 #include "addi-data/hwdrv_apci1564.c"
 
 static const struct addi_board apci1564_boardtypes[] = {
@@ -33,23 +32,6 @@ static const struct addi_board apci1564_boardtypes[] = {
 	},
 };
 
-static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev,
-				     struct comedi_subdevice *s,
-				     struct comedi_insn *insn,
-				     unsigned int *data)
-{
-	const struct addi_board *this_board = comedi_board(dev);
-	struct addi_private *devpriv = dev->private;
-	unsigned short w_Address = CR_CHAN(insn->chanspec);
-	unsigned short w_Data;
-
-	w_Data = addi_eeprom_readw(devpriv->i_IobaseAmcc,
-		this_board->pc_EepromChip, 2 * w_Address);
-	data[0] = w_Data;
-
-	return insn->n;
-}
-
 static irqreturn_t v_ADDI_Interrupt(int irq, void *d)
 {
 	struct comedi_device *dev = d;
@@ -75,7 +57,6 @@ static int apci1564_auto_attach(struct comedi_device *dev,
 	struct addi_private *devpriv;
 	struct comedi_subdevice *s;
 	int ret, n_subdevices;
-	unsigned int dw_Dummy;
 
 	dev->board_name = this_board->pc_DriverName;
 
@@ -120,23 +101,6 @@ static int apci1564_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));
-	}
-
 	n_subdevices = 7;
 	ret = comedi_alloc_subdevices(dev, n_subdevices);
 	if (ret)
@@ -212,15 +176,7 @@ static int apci1564_auto_attach(struct comedi_device *dev,
 
 	/* EEPROM */
 	s = &dev->subdevices[6];
-	if (this_board->i_PCIEeprom) {
-		s->type = COMEDI_SUBD_MEMORY;
-		s->subdev_flags = SDF_READABLE | SDF_INTERNAL;
-		s->n_chan = 256;
-		s->maxdata = 0xffff;
-		s->insn_read = i_ADDIDATA_InsnReadEeprom;
-	} else {
-		s->type = COMEDI_SUBD_UNUSED;
-	}
+	s->type = COMEDI_SUBD_UNUSED;
 
 	i_ADDI_Reset(dev);
 	return 0;
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2014-05-04 19:48 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-27  1:35 [PATCH 1/6] staging: comedi: addi_apci_1564: remove eeprom support code Chase Southwood
2014-04-27  1:36 ` [PATCH 2/6] staging: comedi: addi_apci_1564: remove unnecessary include Chase Southwood
2014-04-27  1:37 ` [PATCH 3/6] staging: comedi: addi_apci_1032: board has 32 digital inputs Chase Southwood
     [not found]   ` <DC148C5AA1CEBA4E87973D432B1C2D8825E1F7F8@P3PWEX4MB008.ex4.secureserver.net>
2014-04-28 21:57     ` Ian Abbott
2014-04-29  8:34   ` [PATCH 3/6 v2] staging: comedi: addi_apci_1564: " Chase Southwood
2014-04-29 13:15     ` Ian Abbott
2014-04-27  1:37 ` [PATCH 4/6] staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the unused bars Chase Southwood
2014-04-28 10:19   ` Ian Abbott
2014-04-28 11:10     ` Ian Abbott
     [not found]   ` <DC148C5AA1CEBA4E87973D432B1C2D8825E1F7CD@P3PWEX4MB008.ex4.secureserver.net>
2014-04-29  8:22     ` Chase Southwood
2014-04-29  8:35   ` [PATCH 4/6 v2] " Chase Southwood
2014-04-29 13:19     ` Ian Abbott
2014-04-30  7:57   ` [PATCH 4/6 v3] " Chase Southwood
2014-04-30  8:47     ` Ian Abbott
2014-04-27  1:38 ` [PATCH 5/6] staging: comedi: addi_apci_2032: remove unnecessary info from boardinfo Chase Southwood
2014-04-29  8:37   ` [PATCH 5/6 v2] staging: comedi: addi_apci_1564: " Chase Southwood
2014-04-29 13:17     ` Ian Abbott
2014-04-27  1:38 ` [PATCH 6/6] staging: comedi: addi_apci_2032: remove use of devpriv->s_EeParameters Chase Southwood
     [not found]   ` <DC148C5AA1CEBA4E87973D432B1C2D8825E1F6C5@P3PWEX4MB008.ex4.secureserver.net>
2014-04-29  8:16     ` Chase Southwood
2014-04-29  8:38   ` [PATCH 6/6 v2] staging: comedi: addi_apci_1564: " Chase Southwood
2014-04-29 13:20     ` Ian Abbott
2014-04-29 20:33     ` Hartley Sweeten
2014-04-30  7:52       ` Chase Southwood
2014-04-30 16:58         ` Hartley Sweeten
2014-05-01  3:32           ` Chase Southwood
2014-05-03  7:49     ` [PATCH 6/6 v3] " Chase Southwood
2014-04-28  9:40 ` [PATCH 1/6] staging: comedi: addi_apci_1564: remove eeprom support code Dan Carpenter
2014-05-03 23:52   ` Greg KH
2014-05-04 19:48     ` Chase Southwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).