Page MenuHomeFreeBSD

Allwinner A31/A31S R-GPIO
ClosedPublic

Authored by manu_bidouilliste.com on Apr 12 2016, 10:33 PM.
Tags
Referenced Files
Unknown Object (File)
Wed, Dec 11, 10:22 PM
Unknown Object (File)
Fri, Dec 6, 7:03 AM
Unknown Object (File)
Fri, Dec 6, 4:23 AM
Unknown Object (File)
Sat, Nov 30, 8:32 AM
Unknown Object (File)
Nov 16 2024, 7:46 AM
Unknown Object (File)
Oct 6 2024, 10:11 AM
Unknown Object (File)
Oct 3 2024, 10:49 PM
Unknown Object (File)
Oct 1 2024, 5:29 PM

Details

Summary

Add support for the other gpio controller found in A31/A31S
It need D5580

Test Plan

Apply patch and build kernel, test on Bananapi M2 (A31S)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3379
Build 3416: arc lint + arc unit

Event Timeline

manu_bidouilliste.com retitled this revision from to Allwinner A31/A31S R-GPIO.
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 - subversion.
manu_bidouilliste.com added a project: ARM.
jmcneill added inline comments.
sys/arm/allwinner/a10_gpio.c
596

Should this be protected with ifdef SOC_ALLWINNER_xxx ?

sys/arm/allwinner/a31/a31_r_padconf.c
38

#ifdef SOC_ALLWINNER_xxx ?

manu_bidouilliste.com removed rS FreeBSD src repository - subversion as the repository for this revision.

Protect a31_r_padconf with ifdefs

sys/arm/allwinner/a10_gpio.c
568

As discussed on IRC, we should move the padconf values to compat_data[] ocd_data, so something like:

static struct ofw_compat_data compat_data[] = {
#ifdef SOC_ALLWINNER_A10
    { "allwinner,sun4i-a10-pinctrl",  (uintptr_t)&a10_padconf },
#endif
    ...

and here we can simply do:

sc->padconf = (struct allwinner_padconf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data;

Put the padconf in the compat_data struct.

sys/arm/allwinner/a10_gpio.c
111

Instead of the ifndef below, why don't we just say #if defined(SOC_ALLWINNER_A31) || defined(SOC_ALLWINNER_A31S) here? Same for the extern above.

sys/arm/allwinner/a10_gpio.c
111

Because sometimes I'm stupid that's why :)
I'll change that

manu_bidouilliste.com set the repository for this revision to rS FreeBSD src repository - subversion.

Simplify the inclusion of the r-gpio padconf.

sys/arm/allwinner/a10_gpio.c
117

This compat string is duplicated on line 111

This revision is now accepted and ready to land.Apr 22 2016, 9:43 AM
This revision was automatically updated to reflect the committed changes.