Page MenuHomeFreeBSD

arm: Add ARM PL022 Synchronous Serial Port driver
Needs ReviewPublic

Authored by jhibbits on May 15 2024, 6:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 13, 6:30 PM
Unknown Object (File)
Wed, Jun 5, 12:48 AM
Unknown Object (File)
Sun, May 19, 11:26 PM
Unknown Object (File)
Sun, May 19, 4:40 PM
Unknown Object (File)
Sun, May 19, 4:09 PM
Unknown Object (File)
Sat, May 18, 8:39 PM
Unknown Object (File)
Fri, May 17, 5:32 PM

Details

Reviewers
andrew
manu
Group Reviewers
ARM
Summary

ARM pl022 is a general purpose synchronous serial port controller,
implementing SPI, SSI, and National Microwire frame formats. The driver
currently only supports SPI format.

One limitation of the driver is that hardware only raises an interrupt
if the RX queue contains at least 4 characters, so fewer than 4
characters in the queue may result in data never being received.

Obtained from: Juniper Networks, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58132
Build 55020: arc lint + arc unit

Event Timeline

br added inline comments.
sys/arm/arm/pl022.h
47

For the bit definition I usually omit prefix (i.e. PL022_), and put extra space after tab.
that allows easier navigation with bare eye.
example sys/arm64/iommu/smmureg.h

One limitation of the driver is that hardware only raises an interrupt if the RX queue contains at least 4 characters, so fewer than 4 characters in the queue may result in data never being received.

Do you not receive the SSPRTINTR interrupt?

sys/arm/arm/pl022.c
136
217
230

ditto

One limitation of the driver is that hardware only raises an interrupt if the RX queue contains at least 4 characters, so fewer than 4 characters in the queue may result in data never being received.

Do you not receive the SSPRTINTR interrupt?

Nope, and it's documented in the reference (DDI0194H):

3.4.1
SSPRXINTR
The receive interrupt is asserted when there are four or more valid entries in the receive FIFO.

sys/arm/arm/pl022.c
136

Oops, and I'm usually the one to give grief over style(9), myself. Will take a closer pass, along with the others.

3.4.1
SSPRXINTR
The receive interrupt is asserted when there are four or more valid entries in the receive FIFO.

That's a different interrupt, see 3.4.4 SSPRTINTR of the same document.

3.4.1
SSPRXINTR
The receive interrupt is asserted when there are four or more valid entries in the receive FIFO.

That's a different interrupt, see 3.4.4 SSPRTINTR of the same document.

Ah, sorry, I had misread. Apparently I don't get the SSPRTINTR on the device I have, as it seems to time out (2 second timeout) on 3-byte messages, and the interrupt is enabled. Maybe it's an issue with my particular device?