aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/cns3xxx/patches-3.14/075-spi_support.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-11-26 18:01:29 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-11-26 18:01:29 +0000
commit2c22edd98f3d88925b7e76c0d4451d256fd08879 (patch)
tree69da99e42b8e3084e47027c85990faa7f5665e58 /target/linux/cns3xxx/patches-3.14/075-spi_support.patch
parent9035847d75d9453f4f55eef1c6f5a8fffa29800c (diff)
downloadmaster-187ad058-2c22edd98f3d88925b7e76c0d4451d256fd08879.tar.gz
master-187ad058-2c22edd98f3d88925b7e76c0d4451d256fd08879.tar.bz2
master-187ad058-2c22edd98f3d88925b7e76c0d4451d256fd08879.zip
cns3xxx: update to linux 3.14
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43397 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/cns3xxx/patches-3.14/075-spi_support.patch')
-rw-r--r--target/linux/cns3xxx/patches-3.14/075-spi_support.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/target/linux/cns3xxx/patches-3.14/075-spi_support.patch b/target/linux/cns3xxx/patches-3.14/075-spi_support.patch
new file mode 100644
index 0000000000..2828e7175e
--- /dev/null
+++ b/target/linux/cns3xxx/patches-3.14/075-spi_support.patch
@@ -0,0 +1,55 @@
+--- a/drivers/spi/Kconfig
++++ b/drivers/spi/Kconfig
+@@ -155,6 +155,13 @@ config SPI_CLPS711X
+ This enables dedicated general purpose SPI/Microwire1-compatible
+ master mode interface (SSI1) for CLPS711X-based CPUs.
+
++config SPI_CNS3XXX
++ tristate "CNS3XXX SPI controller"
++ depends on ARCH_CNS3XXX && SPI_MASTER
++ select SPI_BITBANG
++ help
++ This enables using the CNS3XXX SPI controller in master mode.
++
+ config SPI_COLDFIRE_QSPI
+ tristate "Freescale Coldfire QSPI controller"
+ depends on (M520x || M523x || M5249 || M525x || M527x || M528x || M532x)
+--- a/drivers/spi/Makefile
++++ b/drivers/spi/Makefile
+@@ -22,6 +22,7 @@ obj-$(CONFIG_SPI_BFIN_V3)
+ obj-$(CONFIG_SPI_BFIN_SPORT) += spi-bfin-sport.o
+ obj-$(CONFIG_SPI_BITBANG) += spi-bitbang.o
+ obj-$(CONFIG_SPI_BUTTERFLY) += spi-butterfly.o
++obj-$(CONFIG_SPI_CNS3XXX) += spi-cns3xxx.o
+ obj-$(CONFIG_SPI_CLPS711X) += spi-clps711x.o
+ obj-$(CONFIG_SPI_COLDFIRE_QSPI) += spi-coldfire-qspi.o
+ obj-$(CONFIG_SPI_DAVINCI) += spi-davinci.o
+--- a/drivers/spi/spi-bitbang.c
++++ b/drivers/spi/spi-bitbang.c
+@@ -333,6 +333,10 @@ static int spi_bitbang_transfer_one(stru
+ */
+ if (!m->is_dma_mapped)
+ t->rx_dma = t->tx_dma = 0;
++
++ t->last_in_message_list =
++ list_is_last(&t->transfer_list, &m->transfers);
++
+ status = bitbang->txrx_bufs(spi, t);
+ }
+ if (status > 0)
+--- a/include/linux/spi/spi.h
++++ b/include/linux/spi/spi.h
+@@ -591,6 +591,13 @@ struct spi_transfer {
+ u32 speed_hz;
+
+ struct list_head transfer_list;
++
++#ifdef CONFIG_ARCH_CNS3XXX
++ unsigned last_in_message_list;
++#ifdef CONFIG_SPI_CNS3XXX_2IOREAD
++ u8 dio_read;
++#endif
++#endif
+ };
+
+ /**