mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
901a7fa067
Changelog: * https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.17 Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 46150
56 lines
1.6 KiB
Diff
56 lines
1.6 KiB
Diff
--- a/drivers/spi/Kconfig
|
|
+++ b/drivers/spi/Kconfig
|
|
@@ -171,6 +171,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
|
|
@@ -25,6 +25,7 @@ obj-$(CONFIG_SPI_BITBANG) += spi-bitban
|
|
obj-$(CONFIG_SPI_BUTTERFLY) += spi-butterfly.o
|
|
obj-$(CONFIG_SPI_CADENCE) += spi-cadence.o
|
|
obj-$(CONFIG_SPI_CLPS711X) += spi-clps711x.o
|
|
+obj-$(CONFIG_SPI_CNS3XXX) += spi-cns3xxx.o
|
|
obj-$(CONFIG_SPI_COLDFIRE_QSPI) += spi-coldfire-qspi.o
|
|
obj-$(CONFIG_SPI_DAVINCI) += spi-davinci.o
|
|
obj-$(CONFIG_SPI_DESIGNWARE) += spi-dw.o
|
|
--- a/drivers/spi/spi-bitbang.c
|
|
+++ b/drivers/spi/spi-bitbang.c
|
|
@@ -335,6 +335,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
|
|
@@ -628,6 +628,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
|
|
};
|
|
|
|
/**
|