-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aux-spi, aux-uart interrupt issues #1573
Comments
OK. I've fixed it myself. I really can't understand why the auxirq register was not taken into account in the spi drivers. If someone is interested: I've changed the interrupt routine to this:
The variable bcm2835_aux_irq_reg is an io mapped pointer which i've exported from the clk-bcm2835-aux.c driver to get access to the auxirq register. It is just a quick and dirty hack and should be implemented in a clean way by someone who has the time for it. But I hope you guys get an idea whats wrong in the current driver. Now it is working like a charm ;) |
@franzflasch Thanks for providing a fix. Could you please create a patch based on linux-next (mainline) with your changes and send it to linux-rpi-kernel@lists.infradead.org ? |
@lategoodbye Yes I can send a patch, however at first I need to reimplement this. My "fix" works, but it is just an ugly hack. |
Wonderful, but don't spend too much time in reimplementation. It's imporant that this issue is reported to the mailing list, the decision how this should be fixed finally lies to the maintainer. It's possible that we need to implement an additional instance which delegate the IRQs. |
The current trees now include a modified bcm2835-aux driver that also acts as an interrupt controller, and DT modifications to activate it. I've tested it with the console over ttyS0 running an MFRC reader on SPI1. |
This is great! Thanks! |
kernel: BCM270X_DT: Enable AUX interrupt controller in DT See: BCM270X_DT: Enable AUX interrupt controller in DT See: raspberrypi/linux#1573 kernel: ASoC: Add prompt for ICS43432 codec firmware: gpu_server: unreserve the qpu user shaders at end of each job firmware: gpu_server: Only enable/disable qpus at start/end of service connection
kernel: BCM270X_DT: Enable AUX interrupt controller in DT See: BCM270X_DT: Enable AUX interrupt controller in DT See: raspberrypi/linux#1573 kernel: ASoC: Add prompt for ICS43432 codec firmware: gpu_server: unreserve the qpu user shaders at end of each job firmware: gpu_server: Only enable/disable qpus at start/end of service connection
The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid sharing problems. See: raspberrypi/linux#1484 raspberrypi/linux#1573 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid sharing problems. See: raspberrypi/linux#1484 raspberrypi/linux#1573 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
commit b3c6dd9 Author: Phil Elwell <phil@raspberrypi.org> Date: Thu Mar 23 16:34:46 2017 +0000 bcm2835-aux: Add aux interrupt controller The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid sharing problems. See: raspberrypi/linux#1484 raspberrypi/linux#1573 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Gbp-Pq: Topic rpi Gbp-Pq: Name rpi_1211_b3c6dd9ed905a1558061cbc144cc29f8766e31cf.patch
commit 09ee6ad Author: Phil Elwell <phil@raspberrypi.org> Date: Thu Mar 23 17:08:44 2017 +0000 BCM270X_DT: Enable AUX interrupt controller in DT See: raspberrypi/linux#1484 raspberrypi/linux#1573 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Gbp-Pq: Topic rpi Gbp-Pq: Name rpi_1212_09ee6ad78fe69c4196edd973e0bb4fb3a417dd85.patch
The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid sharing problems. See: raspberrypi/linux#1484 raspberrypi/linux#1573 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid sharing problems. See: raspberrypi/linux#1484 raspberrypi/linux#1573 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid sharing problems. See: raspberrypi/linux#1484 raspberrypi/linux#1573 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid sharing problems. See: raspberrypi/linux#1484 raspberrypi/linux#1573 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid sharing problems. See: raspberrypi/linux#1484 raspberrypi/linux#1573 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt controller to avoid sharing problems. See: raspberrypi/linux#1484 raspberrypi/linux#1573 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Hi! I am using the rpi-compute module with kernel version 4.4 and got some issues when using aux spi1 and aux spi2 simultaneously. On the aux spi1 I've connected an spi lcd device and on aux spi2 I've connected an sd card, which I am using with the mmc_spi driver. When using both devices simultaneously I get errors when reading from the mmc card. I also backported the latest spi-bcm2835aux driver from kernel 4.6 which introduced some fixes.
I think the problem is, that the interrupt handlers are not implemented properly:
I can imagine that this routine will fail if there are massive interrupt requests simultaneously on aux spi1 and aux spi2.
Some notes regarding these issues:
However the aux irq register is not used anywhrere in the driver.
I think it should be corrected to this:
The main issue is, that the IRQ status register is not checked within the aux spi driver. It would be great if someone can take a look at this and fixes this.
The text was updated successfully, but these errors were encountered: