kernel: update kernel 4.1 to version 4.1.11
[openwrt.git] / target / linux / lantiq / patches-4.1 / 0033-SPI-MIPS-lantiq-adds-spi-xway.patch
index 13a1d9a..7806f64 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 
 --- a/drivers/spi/Kconfig
 +++ b/drivers/spi/Kconfig
-@@ -626,6 +626,14 @@
+@@ -626,6 +626,14 @@ config SPI_NUC900
        help
          SPI driver for Nuvoton NUC900 series ARM SoCs
  
@@ -35,14 +35,14 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  #
 --- a/drivers/spi/Makefile
 +++ b/drivers/spi/Makefile
-@@ -90,3 +90,4 @@
+@@ -90,3 +90,4 @@ obj-$(CONFIG_SPI_TXX9)                       += spi-txx9.o
  obj-$(CONFIG_SPI_XCOMM)               += spi-xcomm.o
  obj-$(CONFIG_SPI_XILINX)              += spi-xilinx.o
  obj-$(CONFIG_SPI_XTENSA_XTFPGA)               += spi-xtensa-xtfpga.o
 +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);
 +
@@ -927,7 +929,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      /* Read module capabilities */
 +      id = ltq_spi_reg_read(hw, LTQ_SPI_ID);
 +      hw->txfs = (id >> LTQ_SPI_ID_TXFS_SHIFT) & LTQ_SPI_ID_TXFS_MASK;
-+      hw->rxfs = (id >> LTQ_SPI_ID_TXFS_SHIFT) & LTQ_SPI_ID_TXFS_MASK;
++      hw->rxfs = (id >> LTQ_SPI_ID_RXFS_SHIFT) & LTQ_SPI_ID_RXFS_MASK;
 +      hw->dma_support = (id & LTQ_SPI_ID_CFG) ? 1 : 0;
 +
 +      ltq_spi_config_mode_set(hw);