RE: [PATCH 0/9] staging: comedi: addi_apci_1564: additional clean up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, October 21, 2014 9:29 AM, Ian Abbott wrote:
> 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,

The I/O Mapping document I have from ADDI-DATA is dated 27.02.2004.
It was modified on 29.07.08 with the counter information.

The ADD-DATA driver only using PCI BARS 0 and 1 makes sense if that driver
does not have any counter support.

As messed up as the ADDI-DATA drivers were, my guess is the PCI BAR issue
was initially a screw up when the drivers were initially merged.

I will ask ADDI-DATA about the PCI BARs to see if they have any additional
information.

Regards,
Hartley

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux