Files
linux/include/linux
Phil Elwell f728dcf675 misc: Add RP1 PIO driver
Provide remote access to the PIO hardware in RP1. There is a single
instance, with 4 state machines.

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

misc: rp1-pio: Support larger data transfers

Add a separate IOCTL for larger transfer with a 32-bit data_bytes
field.

See: https://github.com/raspberrypi/utils/issues/107

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

misc: rp1-pio: More logical probe sequence

Sort the probe function initialisation into a more logical order.

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

misc: rp1-pio: Minor cosmetic tweaks

No functional change.

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

misc: rp1-pio: Add in-kernel DMA support

Add kernel-facing implementations of pio_sm_config_xfer and
pio_xm_xfer_data.

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

misc: rp1-pio: Handle probe errors

Ensure that rp1_pio_open fails if the device failed to probe.

Link: https://github.com/raspberrypi/linux/issues/6593

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

misc: rp1-pio: SM_CONFIG_XFER32 = larger DMA bufs

Add an ioctl type - SM_CONFIG_XFER32 - that takes uints for the buf_size
and buf_count values.

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

misc/rp1-pio: Fix copy/paste error in pio_rp1.h

As per the subject, there was a copy/paste error that caused
pio_sm_unclaim from a driver to result in a call to
pio_sm_claim. Fix it.

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

misc: rp1-pio: Fix parameter checks wihout client

Passing bad parameters to an API call without a pio pointer will cause
a NULL pointer exception when the persistent error is set. Guard
against that.

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

misc: rp1-pio: Convert floats to 24.8 fixed point

Floating point arithmetic is not supported in the kernel, so use fixed
point instead.

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

misc: rp1-pio: Error out on incompatible firmware

If the RP1 firmware has reported an error then return that from the PIO
probe function, otherwise defer the probing.

Link: https://github.com/raspberrypi/linux/issues/6642

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

misc: rp1-pio: Demote fw probe error to warning

Support for the RP1 firmware mailbox API is rolling out to Pi 5 EEPROM
images. For most users, the fact that the PIO is not available is no
cause for alarm. Change the message to a warning, so that it does not
appear with "quiet" in cmdline.txt.

Link: https://github.com/raspberrypi/linux/issues/6642

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

misc: rp1-pio: Don't just reuse the same DMA buf

A missing pointer increment meant that not only was the same buffer
being reused again and again, there was also no protection against
using it simultaneously for multiple transfers. Fix that basic bug, and
also move a similar increment to before the transfer is started, which
feels less racy.

See: https://github.com/raspberrypi/linux/issues/6919

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

misc: rp1-pio: Fix a config_xfer error path

If the DMA channel allocation fails, the relevant dma_configs entry
should be marked as no longer claimed, otherwise rp1_pio_sm_dma_free
will be called with an error number as a DMA channel pointer.

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

misc: rp1-pio: Request a DMA burst size of 8

Improve DMA performance by increasing the burst size to 8.

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

misc: rp1-pio: Get burst size from DMA capabilities

Although the PIO throughput benefits from larger burst sizes, only the
first two DMA channels support a burst size of 8 - the others are capped
at 4. To avoid misconfiguring the PIO hardware, retrieve the actual
max_burst value from the DMA channel's capabilities.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2025-12-01 12:28:00 +00:00
..
2025-12-01 12:27:29 +00:00
2025-09-24 17:09:47 +02:00
2025-06-15 21:19:08 +05:30
2025-09-05 15:06:03 +02:00
2025-07-21 18:18:51 +01:00
2025-04-21 10:27:59 +02:00
2025-04-29 15:58:38 -04:00
2025-07-31 11:28:03 -04:00
2025-09-24 02:48:05 -07:00
2025-05-21 13:39:45 +02:00
2025-08-14 10:37:33 -07:00
2025-04-11 18:58:10 -07:00
2025-09-23 11:13:22 +02:00
2025-04-17 10:56:11 +02:00
2025-11-14 08:56:49 -08:00
2025-11-12 10:47:42 +01:00
2025-08-21 13:58:07 +02:00
2025-07-16 14:28:21 +02:00
2025-05-22 11:07:05 +02:00
2025-09-13 17:32:44 -07:00
2025-08-29 13:39:53 -07:00
2025-08-02 12:06:10 -07:00
2025-09-18 10:17:09 +02:00
2025-09-23 11:13:22 +02:00
2025-06-11 11:57:14 -07:00
2025-07-17 06:01:16 -06:00
2025-09-13 16:54:50 -07:00
2025-07-09 22:41:56 -07:00
2025-09-17 15:58:29 -04:00
2025-06-17 18:18:46 -07:00
2025-07-14 15:20:02 -07:00
2025-09-23 13:28:20 -04:00
2025-07-08 19:11:57 -04:00
2025-09-19 14:26:16 +02:00
2025-09-25 09:23:47 +02:00
2025-08-18 14:23:09 +02:00
2025-08-18 14:23:09 +02:00
2025-10-01 07:55:42 -05:00
2025-05-21 16:46:37 +02:00
2025-09-13 16:55:07 -07:00
2025-10-03 10:24:14 -07:00
2025-06-19 14:28:24 +02:00
2025-06-19 14:28:24 +02:00
2025-12-01 12:28:00 +00:00
2025-12-01 12:28:00 +00:00
2025-07-22 18:07:11 +02:00
2025-08-24 11:41:11 -06:00
2025-07-01 12:29:29 +02:00
2025-05-03 12:02:04 +02:00
2025-05-11 17:54:09 -07:00
2025-12-01 12:27:49 +00:00
2025-05-06 11:11:45 -06:00
2025-08-28 13:14:50 +02:00
2025-04-10 18:34:05 -07:00
2025-09-19 17:19:45 -07:00
2025-07-23 11:56:02 +02:00
2025-08-17 12:46:25 +02:00
2025-06-26 09:44:45 -07:00
2025-09-09 10:27:01 -06:00
2025-10-01 07:24:55 -04:00
2025-07-17 11:26:56 +02:00
2025-08-02 12:01:37 -07:00