pastebin - collaborative debugging tool
eckelmann.kpaste.net RSS


Quantron SPI transfer debug patch
Posted by Anonymous on Fri 1st Nov 2019 15:09
raw | new post

  1. diff --git a/ptxdist/configs/ecu01/patches/linux-3.10.108/series b/ptxdist/configs/ecu01/patches/linux-3.10.108/series
  2. index c27bc22..08e033f 100644
  3. --- a/ptxdist/configs/ecu01/patches/linux-3.10.108/series
  4. +++ b/ptxdist/configs/ecu01/patches/linux-3.10.108/series
  5. @@ -24,3 +24,4 @@
  6.  0024-0022-Changing-MXC-Timer-Source-to-GPT3.patch
  7.  0025-sync-ro-remount-after-blocking-writers.patch
  8.  patch-3.10.108-rt123.patch
  9. +spi_print_tid_debug.patch
  10. diff --git a/ptxdist/configs/ecu01/patches/linux-3.10.108/series.ecu01 b/ptxdist/configs/ecu01/patches/linux-3.10.108/series.ecu01
  11. index c27bc22..08e033f 100644
  12. --- a/ptxdist/configs/ecu01/patches/linux-3.10.108/series.ecu01
  13. +++ b/ptxdist/configs/ecu01/patches/linux-3.10.108/series.ecu01
  14. @@ -24,3 +24,4 @@
  15.  0024-0022-Changing-MXC-Timer-Source-to-GPT3.patch
  16.  0025-sync-ro-remount-after-blocking-writers.patch
  17.  patch-3.10.108-rt123.patch
  18. +spi_print_tid_debug.patch
  19. diff --git a/ptxdist/configs/ecu01/patches/linux-3.10.108/spi_print_tid_debug.patch b/ptxdist/configs/ecu01/patches/linux-3.10.108/spi_print_tid_debug.patch
  20. new file mode 100644
  21. index 0000000..7602b65
  22. --- /dev/null
  23. +++ b/ptxdist/configs/ecu01/patches/linux-3.10.108/spi_print_tid_debug.patch
  24. @@ -0,0 +1,33 @@
  25. +diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
  26. +index f7cd065..f4fd8a2 100644
  27. +--- a/drivers/spi/spi-imx.c
  28. ++++ b/drivers/spi/spi-imx.c
  29. +@@ -709,11 +709,28 @@ static int spi_imx_setupxfer(struct spi_device *spi,
  30. +       return 0;
  31. + }
  32. +
  33. ++static
  34. ++void print_transfer_tid(struct spi_device *spi)
  35. ++{
  36. ++      static pid_t old_tid = (pid_t)-1; static long count = 0L;
  37. ++      pid_t tid = current->pid;
  38. ++
  39. ++      if (old_tid != tid)
  40. ++      {
  41. ++              (void)printk(KERN_ERR "spi_imx_transfer: spi=%lx, spi->dev.init_name=%s, old_tid=%ld, tid=%ld, count=%ld\n",
  42. ++                      (long)spi, spi->dev.init_name, (long)old_tid,
  43. ++                      (long)tid, count);
  44. ++              old_tid = tid; count = 0L;
  45. ++      } else { count++; }
  46. ++}
  47. ++
  48. + static int spi_imx_transfer(struct spi_device *spi,
  49. +                               struct spi_transfer *transfer)
  50. + {
  51. +       struct spi_imx_data *spi_imx = spi_master_get_devdata(spi->master);
  52. +
  53. ++      print_transfer_tid(spi);
  54. ++
  55. +       spi_imx->tx_buf = transfer->tx_buf;
  56. +       spi_imx->rx_buf = transfer->rx_buf;
  57. +       spi_imx->count = transfer->len;

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at