summaryrefslogtreecommitdiff
path: root/drivers/fpga/xilinx-spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/fpga/xilinx-spi.c')
-rw-r--r--drivers/fpga/xilinx-spi.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/fpga/xilinx-spi.c b/drivers/fpga/xilinx-spi.c
index 52aab5a1f0ba..824abbbd631e 100644
--- a/drivers/fpga/xilinx-spi.c
+++ b/drivers/fpga/xilinx-spi.c
@@ -195,7 +195,21 @@ static int xilinx_spi_write_complete(struct fpga_manager *mgr,
return 0;
}
- dev_err(&mgr->dev, "Timeout after config data transfer\n");
+ if (conf->init_b) {
+ ret = gpiod_get_value(conf->init_b);
+
+ if (ret < 0) {
+ dev_err(&mgr->dev, "Error reading INIT_B (%d)\n", ret);
+ return ret;
+ }
+
+ dev_err(&mgr->dev,
+ ret ? "CRC error or invalid device\n"
+ : "Missing sync word or incomplete bitstream\n");
+ } else {
+ dev_err(&mgr->dev, "Timeout after config data transfer\n");
+ }
+
return -ETIMEDOUT;
}