Skip to content

piolib: IRQ support, dmactrl access, FIFO flags etc.#204

Open
pelwell wants to merge 14 commits into
raspberrypi:masterfrom
pelwell:pioirq
Open

piolib: IRQ support, dmactrl access, FIFO flags etc.#204
pelwell wants to merge 14 commits into
raspberrypi:masterfrom
pelwell:pioirq

Conversation

@pelwell

@pelwell pelwell commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

If run with a suitably up-to-date kernel and RP1 firmware (in the Pi 5 EEPROM image), these patches give userspace support for PIO interrupts. They also allow the dmactrl register and FIFO flags to be read, and include a number of new and improved test applications.

pelwell added 14 commits July 9, 2026 22:20
Don't leave an undefined value when a bad compatible string is detected.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Perform the full block transfer, with or without DMA, before using
common data comparison code.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Add methods to read the DMACTRL register and the FIFO error flags
(although a stall isn't really an error).

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Monitor the DREQ status as the FIFO is filled and emptied, and tidy up
the code by adding a check() function (a runtime assertion).

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
irqhog claims a PIO interrupt and waits, to force other PIO clients to
use the other interrupt.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
irqtest2 loads a state machine program that generates interrupts and
waits for response signals on a GPIO. Side signals can be used with a
logic analyser to measure intervals.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@pelwell

pelwell commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author
  1. Download a suitable pre-release EEPROM image from here :

    https://drive.google.com/file/d/1jq35kwYPgcn8iYNwfEfqEUt7f0sOgnO-/view?usp=drive_link

Install it by unzipping the contents and running: sudo rpi-eeprom-update -f pieeprom_pioirq_26-722.bin

  1. There is a a kernel build with the improved RP1 PIO driver here:

    PIO FIFO debug flags and interrupt support linux#7502

Install it with sudo rpi-update pulls/7502, after reading the caveats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant