[POWERPC] Xilinx: hwicap: Verify sync before reading idcode.
authorStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Mon, 17 Mar 2008 17:36:31 +0000 (04:36 +1100)
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>
Wed, 26 Mar 2008 12:27:21 +0000 (07:27 -0500)
commit4c58f8fe2e84ba76a4bef01cbd987b5ce62771c3
tree6cad4a17085b51e29e757fdd0b39cca3775beb34
parent6b06fdbaf9eb9f208a83540265a6a82bf1049a41
[POWERPC] Xilinx: hwicap: Verify sync before reading idcode.

It appears that in some cases, the sync word might not be recognized
by the hardware correctly.  If this happens, then attempting to read
from the port results in an unrecoverable error because of the design
of the FPGA core.  This patch updates the code to check the status of
the device before reading the IDCODE, in order to avoid entering this
unrecoverable state.  This patch also adds additional NOOP commands
into the sychronization sequence, which appears to be necessary to
avoid the condition on some hardware.

Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
drivers/char/xilinx_hwicap/xilinx_hwicap.c