Page MenuHomeFreeBSD

plic: handling for interrupt-cells == 2
ClosedPublic

Authored by mhorne on Oct 15 2024, 7:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 1:25 AM
Unknown Object (File)
Sun, Nov 3, 2:13 AM
Unknown Object (File)
Wed, Oct 30, 6:28 PM
Unknown Object (File)
Oct 23 2024, 1:42 PM
Unknown Object (File)
Oct 22 2024, 9:32 PM
Subscribers

Details

Summary

Some device trees report interrupt info in two cells: the first value is
the IRQ number, the second value indicates the trigger type, such as
IRQ_TYPE_LEVEL_HIGH. The device tree for the Allwinner D1(s) is one such
case. Thus, extend the PLIC driver to accept this extra information when
available.

Apparently, some PLIC implementations using edge-triggered interrupts
will require some special handling. This is not required for the D1, and
therefore not implemented in this change. However, to prevent
misbehaviour a check is added to reject this case and a message will be
printed.

Similarly, emit messages for the error paths, e.g. ncells == 3. Drivers
will fail to attach all the same, but the message will aid in diagnosing
the issue more quickly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable