lantiq: Print the status register whenever an error occurs
authorJohn Crispin <john@openwrt.org>
Mon, 19 Oct 2015 10:08:29 +0000 (10:08 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 19 Oct 2015 10:08:29 +0000 (10:08 +0000)
This should help finding potential problems with the SPI driver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
SVN-Revision: 47209

target/linux/lantiq/patches-3.18/0033-SPI-MIPS-lantiq-adds-spi-xway.patch
target/linux/lantiq/patches-4.1/0033-SPI-MIPS-lantiq-adds-spi-xway.patch

index 9cc9349a71a133951c3abd4fd1f7d44d9403d26f..81e5d39f21f8029d52999eba9b4699f11c02e847 100644 (file)
@@ -42,7 +42,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +obj-$(CONFIG_SPI_XWAY)                        += spi-xway.o
 --- /dev/null
 +++ b/drivers/spi/spi-xway.c
-@@ -0,0 +1,975 @@
+@@ -0,0 +1,977 @@
 +/*
 + * Lantiq SoC SPI controller
 + *
@@ -744,6 +744,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      /* Disable all interrupts */
 +      ltq_spi_reg_clearbit(hw, LTQ_SPI_IRNEN_ALL, LTQ_SPI_IRNEN);
 +
++      dev_err(hw->dev, "error %x\n", ltq_spi_reg_read(hw, LTQ_SPI_STAT));
++
 +      /* Clear all error flags */
 +      ltq_spi_reg_write(hw, LTQ_SPI_WHBSTATE_CLR_ERRORS, LTQ_SPI_WHBSTATE);
 +
index ffcc95ed5537bddeb60afd6bd875245a818615e7..5325b8337394e55f2579aa174a8a1a087af9751a 100644 (file)
@@ -42,7 +42,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +obj-$(CONFIG_SPI_XWAY)                        += spi-xway.o
 --- /dev/null
 +++ b/drivers/spi/spi-xway.c
-@@ -0,0 +1,989 @@
+@@ -0,0 +1,991 @@
 +/*
 + * Lantiq SoC SPI controller
 + *
@@ -750,6 +750,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      /* Disable all interrupts */
 +      ltq_spi_reg_clearbit(hw, LTQ_SPI_IRNEN_ALL, LTQ_SPI_IRNEN);
 +
++      dev_err(hw->dev, "error %x\n", ltq_spi_reg_read(hw, LTQ_SPI_STAT));
++
 +      /* Clear all error flags */
 +      ltq_spi_reg_write(hw, LTQ_SPI_WHBSTATE_CLR_ERRORS, LTQ_SPI_WHBSTATE);
 +