2014-11-27 16:24:32 +00:00
|
|
|
--- a/drivers/spi/Kconfig
|
|
|
|
+++ b/drivers/spi/Kconfig
|
2016-01-18 22:38:23 +00:00
|
|
|
@@ -183,6 +183,13 @@ config SPI_CLPS711X
|
2014-11-27 16:24:32 +00:00
|
|
|
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
|
2016-01-18 22:38:23 +00:00
|
|
|
@@ -26,6 +26,7 @@ obj-$(CONFIG_SPI_BITBANG) += spi-bitban
|
2014-11-27 16:24:32 +00:00
|
|
|
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
|
2016-01-18 22:38:23 +00:00
|
|
|
obj-$(CONFIG_SPI_DLN2) += spi-dln2.o
|
2014-11-27 16:24:32 +00:00
|
|
|
--- a/include/linux/spi/spi.h
|
|
|
|
+++ b/include/linux/spi/spi.h
|
2016-05-08 19:57:27 +00:00
|
|
|
@@ -703,6 +703,10 @@ struct spi_transfer {
|
2014-11-27 16:24:32 +00:00
|
|
|
u32 speed_hz;
|
|
|
|
|
|
|
|
struct list_head transfer_list;
|
|
|
|
+
|
|
|
|
+#ifdef CONFIG_ARCH_CNS3XXX
|
|
|
|
+ unsigned last_in_message_list;
|
|
|
|
+#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2016-01-18 22:38:23 +00:00
|
|
|
--- a/drivers/spi/spi.c
|
|
|
|
+++ b/drivers/spi/spi.c
|
|
|
|
@@ -933,6 +933,9 @@ static int spi_transfer_one_message(stru
|
|
|
|
list_for_each_entry(xfer, &msg->transfers, transfer_list) {
|
|
|
|
trace_spi_transfer_start(msg, xfer);
|
|
|
|
|
|
|
|
+ xfer->last_in_message_list =
|
|
|
|
+ list_is_last(&xfer->transfer_list, &msg->transfers);
|
|
|
|
+
|
|
|
|
spi_statistics_add_transfer_stats(statm, xfer, master);
|
|
|
|
spi_statistics_add_transfer_stats(stats, xfer, master);
|
|
|
|
|