075-spi_support.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --- a/drivers/spi/Kconfig
  2. +++ b/drivers/spi/Kconfig
  3. @@ -183,6 +183,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. @@ -26,6 +26,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_DLN2) += spi-dln2.o
  26. --- a/include/linux/spi/spi.h
  27. +++ b/include/linux/spi/spi.h
  28. @@ -703,6 +703,10 @@ struct spi_transfer {
  29. u32 speed_hz;
  30. struct list_head transfer_list;
  31. +
  32. +#ifdef CONFIG_ARCH_CNS3XXX
  33. + unsigned last_in_message_list;
  34. +#endif
  35. };
  36. /**
  37. --- a/drivers/spi/spi.c
  38. +++ b/drivers/spi/spi.c
  39. @@ -941,6 +941,9 @@ static int spi_transfer_one_message(stru
  40. list_for_each_entry(xfer, &msg->transfers, transfer_list) {
  41. trace_spi_transfer_start(msg, xfer);
  42. + xfer->last_in_message_list =
  43. + list_is_last(&xfer->transfer_list, &msg->transfers);
  44. +
  45. spi_statistics_add_transfer_stats(statm, xfer, master);
  46. spi_statistics_add_transfer_stats(stats, xfer, master);