Page MenuHomeFreeBSD

Allwinner A31/A31S R-GPIO

Authored by on Apr 12 2016, 10:33 PM.



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

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline retitled this revision from to Allwinner A31/A31S R-GPIO. updated this object. edited the test plan for this revision. (Show Details) added a reviewer: ARM. set the repository for this revision to rS FreeBSD src repository - subversion. added a project: ARM.
jmcneill added inline comments.
596 ↗(On Diff #15127)

Should this be protected with ifdef SOC_ALLWINNER_xxx ?

37 ↗(On Diff #15127)

#ifdef SOC_ALLWINNER_xxx ? removed rS FreeBSD src repository - subversion as the repository for this revision.

Protect a31_r_padconf with ifdefs

568 ↗(On Diff #15361)

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[] = {
    { "allwinner,sun4i-a10-pinctrl",  (uintptr_t)&a10_padconf },

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.

111 ↗(On Diff #15417)

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.

111 ↗(On Diff #15417)

Because sometimes I'm stupid that's why :)
I'll change that set the repository for this revision to rS FreeBSD src repository - subversion.

Simplify the inclusion of the r-gpio padconf.

117 ↗(On Diff #15456)

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.