kernel updates: 4.1.12-ti-r27 (BBB all spi/spidev users rejoice)

The journey into spi & dma..

So for awhile now, we've had a bug for spi users, where the system
would hardlock at the "160" byte threashold:

debian@beaglebone:~$ sudo dd if=/dev/zero of=/dev/spidev1.0 bs=159 count=1
1+0 records in
1+0 records out
159 bytes (159 B) copied, 0.000508833 s, 312 kB/s
debian@beaglebone:/sys$ dd if=/dev/zero of=/dev/spidev1.0 bs=160 count=1
^C

(hangs..)

"160" happens to be a the magic number where DMA takes over from PIO mode...

Well as of yesterday:

debian@beaglebone:~$ sudo dd if=/dev/zero of=/dev/spidev1.0 bs=320 count=1
1+0 records in
1+0 records out
320 bytes (320 B) copied, 0.00266366 s, 120 kB/s

So here's the deal, it looks to be a spi/overlay bug, as we don't seem
to get the correct dma tx/rx channels..

What interesting, when the "spi" node is enabled in the main dtb:

https://github.com/RobertCNelson/dtb-rebuilder/blob/4.1-ti/src/arm/am335x-boneblack-spi0.dts#L120-L137

it works fine in dma mode...

So with "4.1.12-ti-r27" spi-dma is now disabled..

*btw:

Late last night i wrote a better fix (will be r28)

where you can disable "spi-dma" via the dt option:

ti,pio-mode;

https://github.com/beagleboard/bb.org-overlays/commit/48d33d4d22f284103db83626b343724cf18c578d

Regards,

Nice work, Robert.

Are the recent PRU-related changes in this update?

Well everything part of "r26" is still there in r27:

http://processors.wiki.ti.com/index.php/PRU-ICSS

https://github.com/dinuxbg/pru-gcc-examples

Regards,

Thanks for your efforts!

drivers/staging/fbtft now works for me. Here is example of using
Adafruit 1.8" TFT LCD as a Framebuffer with 4.1.12-ti-r27 kernel:

https://gist.github.com/pdp7/6607665262fda38b8099#file-fbtft-works-4-1-12-ti-r27

Thanks, I lost track of where things were.

Hi Robert,

about this bug, are you also fixing the kernel am33x-rt-v4.1 ?

I’m interested also by the spi in the kernel am33x-rt-v4.1.

Micka,

ToDate:

4.1.12-ti-r27+
4.1.12-ti-rt-r27+

and what will become "4.4-rc1"..

Haven't had a chance to apply it "everywhere"..

Regards,

It is very long time ago, but now I am running into performance issues
with SPI. I see the DMA is still disabled in current bb.org-overlays.
So is the bug for blocks > 160 still there (what about kernel 4.4.x?)

Thanks in advance

Andreas