-
Notifications
You must be signed in to change notification settings - Fork 494
beaglebone black: hung task in SPI code #337
Comments
|
thanks @notro I will try out spidev_test.c. Thanks for the tip. However, I found this beagleboard mailing list discussion which indicates that this is an issue in the BeagleBone SPI driver and not related to fbtft: |
From the log I see that it hangs on the first transfer that is big enough to trigger a dma transfer in the spi master driver. You should be able to force pio on all transfers by doing this in spi-omap2-mcspi: -#define DMA_MIN_BYTES 160
+#define DMA_MIN_BYTES ~0 If it works, then it's a dma problem like the report you linked to indicates. |
Thanks @notro , it worked! |
I'm going to close this now. This issue is due to the driver for BeagleBone's SPI bus, and @notro's tip to disable DMA is sufficient for my needs. For those interested, Robert C Nelson noticed this FIXME comment for spi-omap2-mcspi in mainline Linux kernel: Robert C Nelson has a repo that offers Texas Instrument's Linux 4.1.x kernel for BeagleBone: Here is a patch he created for this SPI DMA issue: |
I've run into a problem with getting the mainline drivers/staging/fbtft drivers to work with BeagleBone Black. I know this repo is no longer under development, so please advise if there there is a better venue to raise this issue (maybe devel@driverdev.osuosl.org or linux-fbdev@vger.kernel.org?).
I compiled the fbtft kernel modules directly from this repo for 3.8.13-bone79, and it does work OK for me with 1.8" & 2.2" TFT LCD displays:
https://gist.github.com/pdp7/2fba066dcf23b049781a
Photos of displays working:
https://plus.google.com/photos/+DrewFustini/albums/6211546193314906001
I compiled Linux 4.3-rc7 with staging fbtft modules enabled using the am33x-v4.3 branch of bb-kernel:
https://github.com/RobertCNelson/bb-kernel/tree/am33x-v4.3
I load the SPIDEV1 cape OK after compiling the Device Tree Overlay file from:
https://github.com/beagleboard/bb.org-overlays
I modprobe the fbtft_device module for adafruit18 like I did in v3.8.13, but this time the SPI code hangs. Here is the stack trace from kernel log:
https://gist.github.com/pdp7/579c1d5c48670c92db44
It seems the hang occurs in omap2_mcspi_driver. A summary of the stack trace:
I can post more details, but I thought I would first see if anyone has run into this. I will continue troubleshooting and followup if I figure out a solution.
The text was updated successfully, but these errors were encountered: