075-spi_support.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --- a/drivers/spi/Kconfig
  2. +++ b/drivers/spi/Kconfig
  3. @@ -171,6 +171,13 @@ config SPI_CLPS711X
  4. This enables dedicated general purpose SPI/Microwire1-compatible
  5. master mode interface (SSI1) for CLPS711X-based CPUs.
  6. +config SPI_CNS3XXX
  7. + tristate "CNS3XXX SPI controller"
  8. + depends on ARCH_CNS3XXX && SPI_MASTER
  9. + select SPI_BITBANG
  10. + help
  11. + This enables using the CNS3XXX SPI controller in master mode.
  12. +
  13. config SPI_COLDFIRE_QSPI
  14. tristate "Freescale Coldfire QSPI controller"
  15. depends on (M520x || M523x || M5249 || M525x || M527x || M528x || M532x)
  16. --- a/drivers/spi/Makefile
  17. +++ b/drivers/spi/Makefile
  18. @@ -25,6 +25,7 @@ obj-$(CONFIG_SPI_BITBANG) += spi-bitban
  19. obj-$(CONFIG_SPI_BUTTERFLY) += spi-butterfly.o
  20. obj-$(CONFIG_SPI_CADENCE) += spi-cadence.o
  21. obj-$(CONFIG_SPI_CLPS711X) += spi-clps711x.o
  22. +obj-$(CONFIG_SPI_CNS3XXX) += spi-cns3xxx.o
  23. obj-$(CONFIG_SPI_COLDFIRE_QSPI) += spi-coldfire-qspi.o
  24. obj-$(CONFIG_SPI_DAVINCI) += spi-davinci.o
  25. obj-$(CONFIG_SPI_DESIGNWARE) += spi-dw.o
  26. --- a/drivers/spi/spi-bitbang.c
  27. +++ b/drivers/spi/spi-bitbang.c
  28. @@ -335,6 +335,10 @@ static int spi_bitbang_transfer_one(stru
  29. */
  30. if (!m->is_dma_mapped)
  31. t->rx_dma = t->tx_dma = 0;
  32. +
  33. + t->last_in_message_list =
  34. + list_is_last(&t->transfer_list, &m->transfers);
  35. +
  36. status = bitbang->txrx_bufs(spi, t);
  37. }
  38. if (status > 0)
  39. --- a/include/linux/spi/spi.h
  40. +++ b/include/linux/spi/spi.h
  41. @@ -630,6 +630,13 @@ struct spi_transfer {
  42. u32 speed_hz;
  43. struct list_head transfer_list;
  44. +
  45. +#ifdef CONFIG_ARCH_CNS3XXX
  46. + unsigned last_in_message_list;
  47. +#ifdef CONFIG_SPI_CNS3XXX_2IOREAD
  48. + u8 dio_read;
  49. +#endif
  50. +#endif
  51. };
  52. /**