Page MenuHomeFreeBSD

Allwinner NMI driver
ClosedPublic

Authored by manu_bidouilliste.com on Mar 17 2016, 12:25 PM.

Details

Summary

This driver add support for the NMI controller for A20 and A31 SoC.
The NMI is mainly used for the PMU.

Test Plan

Apply patch and build kernel and test on hw.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

manu_bidouilliste.com retitled this revision from to Allwinner NMI driver.
manu_bidouilliste.com updated this object.
manu_bidouilliste.com edited the test plan for this revision. (Show Details)
manu_bidouilliste.com added a reviewer: ARM.
manu_bidouilliste.com set the repository for this revision to rS FreeBSD src repository.
manu_bidouilliste.com added a project: ARM.
jmcneill added inline comments.
sys/arm/allwinner/aw_nmi.c
46 ↗(On Diff #14388)

I think you can include <dt-bindings/interrupt-controller/irq.h> here instead?

jmcneill added inline comments.Apr 7 2016, 8:56 AM
sys/arm/allwinner/aw_nmi.c
303 ↗(On Diff #14388)

There's already an '#ifdef ARM_INTRNG' on line 48

skra added a subscriber: skra.Apr 7 2016, 4:39 PM

I'm sorry but I have changed PIC interface in r297539. It should be stable now and simpler. There are also more controllers rewritten for INTRNG in tree. The BEAGLEBONE aintc.c is a simplest one.

In D5663#125424, @skra wrote:

I'm sorry but I have changed PIC interface in r297539. It should be stable now and simpler. There are also more controllers rewritten for INTRNG in tree. The BEAGLEBONE aintc.c is a simplest one.

No problem :)
I've updated the driver this morning, just need to find some time to test it.

Update diff since INTRNG interface changed.

manu_bidouilliste.com marked 2 inline comments as done.Apr 26 2016, 5:52 PM
andrew added inline comments.Apr 26 2016, 6:29 PM
sys/arm/allwinner/aw_nmi.c
112 ↗(On Diff #15628)

The indentation looks off, it should be tabbed, then 4 spaces.

147 ↗(On Diff #15628)

Is sc used other than to get dev?

sys/arm/allwinner/files.allwinner
13 ↗(On Diff #15628)

You could make this optional intrng and remove the #ifdef INTRNG from aw_nmi.c

Make the driver optional with intrng
Remove some leftover of the convertion
Fix style(9)

manu_bidouilliste.com marked 3 inline comments as done.Apr 27 2016, 12:20 PM
andrew accepted this revision.Apr 27 2016, 2:16 PM
andrew added a reviewer: andrew.

The commit should say something like:

Add a driver for the Non-maskable interrupt driver in the Allwinner A20 and A31 SoCs.
This is normally used for the PMU.
sys/arm/allwinner/aw_nmi.c
156–177 ↗(On Diff #15651)

It fells like we could pull this out to a common function (in a future change).

This revision is now accepted and ready to land.Apr 27 2016, 2:16 PM
This revision was automatically updated to reflect the committed changes.