From: H Hartley Sweeten Date: Mon, 10 Nov 2014 23:20:11 +0000 (-0700) Subject: staging: comedi: addi_apci_1564: detect PLD revision for I/O mapping X-Git-Tag: omap-for-v3.19/fixes-rc1~73^2~167 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=951fd40b28444e273404c2fb0b28d8e3cf5660b2;p=pandora-kernel.git staging: comedi: addi_apci_1564: detect PLD revision for I/O mapping The APCI-1564 has different I/O mapping depending on if the PLD revision is Rev 1.0 or Rev 2.x. The revision can be determined by reading the EEPROM register at offset 0x00 of PCI BAR 0 and checking the value of bits 7 to 4. Add this check to apci1564_auto_attach(). Currently this driver is coded to work with the Rev 2.x I/O mapping. For now, fail the attach if a Rev 1.0 PLD is detected. Document the I/O mapping for both revisions. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed