On 20/10/14 18:57, H Hartley Sweeten wrote:
This driver currently passes the timer "channel" in a manner that violates
the comedi API. Fix the timer subdevice so that the timers "channels" are
correctly used from the insn->chanspec.
Fix the I/O access for the boards registers. Currently the iobase used to
access the counters and the main board registers are incorrect. According
to the ADDI-DATA datasheet the PCI BARs are:
PCI BAR0 - amcc chip registers
PCI BAR1 - main board registers
PCI BAR2 - counter registers
Move the register map defines from the included hwdrv_apci1564.c file to
the main driver source file.
H Hartley Sweeten (9):
staging: comedi: addi_apci_1564: remove APCI1564_COUNTER[1234] defines
staging: comedi: addi_apci_1564: remove private data 'mode_select_register'
staging: comedi: addi_apci_1564: fix counter register access
staging: comedi: addi_apci_1564: board has 4 timers
staging: comedi: addi_apci_1564: fix board register access
staging: comedi: addi_apci_1564: tidy up private data 'amcc_iobase'
staging: comedi: addi_apci_1564: move register map defines to driver
staging: comedi: addi_apci_1564: move APCI1564_DI_IRQ_REG bit defines
staging: comedi: addi_apci_1564: move APCI1564_DO_INT_CTRL/STATUS_REG bit
defines
.../comedi/drivers/addi-data/hwdrv_apci1564.c | 155 ++++++------------
drivers/staging/comedi/drivers/addi_apci_1564.c | 179 +++++++++++++--------
2 files changed, 159 insertions(+), 175 deletions(-)
The changes to PCI BARs worry me. Perhaps the old PCI BARs worked with
older models of the card. Presumably they stopped using the AMCC chip
some years ago as it's no longer available. They might have moved the
registers around and changed the PCI IDs at the same time, or possibly
moved the registers around and *not* changed the PCI IDs! (That nearly
happened with the MeasurementComputing/ComputerBoards PCI-DIO48H which
is now in the comedi 8255_pci driver, except it did turn out that they
changed the PCI subdevice IDs after switching from the AMCC S5933 (I
think) to a PLX PCI9050/PCI9052.)
Well, ADDI-DATA have their own Linux driver for this board which only
seems to use BAR0 and BAR1, so something fishy is going on.
http://www.addi-data.com/treiber/linux/kernel_ioctl_api/apci1564_r1283.tar.bz2
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbo...@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel