split spi patch, follow mainline file naming
[openwrt/openwrt.git] / target / linux / cns3xxx / patches-3.3 / 052-cns3xxx_spi.patch
1 --- a/drivers/spi/Kconfig
2 +++ b/drivers/spi/Kconfig
3 @@ -117,6 +117,13 @@ config SPI_BUTTERFLY
4 inexpensive battery powered microcontroller evaluation board.
5 This same cable can be used to flash new firmware.
6
7 +config SPI_CNS3XXX
8 + tristate "CNS3XXX SPI controller"
9 + depends on ARCH_CNS3XXX && SPI_MASTER
10 + select SPI_BITBANG
11 + help
12 + This enables using the CNS3XXX SPI controller in master mode.
13 +
14 config SPI_COLDFIRE_QSPI
15 tristate "Freescale Coldfire QSPI controller"
16 depends on (M520x || M523x || M5249 || M527x || M528x || M532x)
17 --- a/drivers/spi/Makefile
18 +++ b/drivers/spi/Makefile
19 @@ -18,6 +18,7 @@ obj-$(CONFIG_SPI_BFIN) += spi-bfin5xx.
20 obj-$(CONFIG_SPI_BFIN_SPORT) += spi-bfin-sport.o
21 obj-$(CONFIG_SPI_BITBANG) += spi-bitbang.o
22 obj-$(CONFIG_SPI_BUTTERFLY) += spi-butterfly.o
23 +obj-$(CONFIG_SPI_CNS3XXX) += spi-cns3xxx.o
24 obj-$(CONFIG_SPI_COLDFIRE_QSPI) += spi-coldfire-qspi.o
25 obj-$(CONFIG_SPI_DAVINCI) += spi-davinci.o
26 obj-$(CONFIG_SPI_DESIGNWARE) += spi-dw.o
27 --- a/drivers/spi/spi-bitbang.c
28 +++ b/drivers/spi/spi-bitbang.c
29 @@ -330,6 +330,12 @@ static void bitbang_work(struct work_str
30 */
31 if (!m->is_dma_mapped)
32 t->rx_dma = t->tx_dma = 0;
33 +
34 + if (t->transfer_list.next == &m->transfers)
35 + t->last_in_message_list = 1;
36 + else
37 + t->last_in_message_list = 0;
38 +
39 status = bitbang->txrx_bufs(spi, t);
40 }
41 if (status > 0)