Page MenuHomeFreeBSD

Allwinner A31/A31S R-GPIO
ClosedPublic

Authored by manu_bidouilliste.com on Apr 12 2016, 10:33 PM.
Tags
Referenced Files
F81698508: D5930.id15456.diff
Sat, Apr 20, 3:15 AM
Unknown Object (File)
Fri, Apr 12, 8:41 AM
Unknown Object (File)
Mar 12 2024, 6:13 AM
Unknown Object (File)
Jan 30 2024, 8:13 PM
Unknown Object (File)
Jan 24 2024, 12:20 AM
Unknown Object (File)
Jan 21 2024, 9:35 AM
Unknown Object (File)
Jan 16 2024, 8:33 PM
Unknown Object (File)
Jan 16 2024, 9:20 AM

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

Lint
Lint Skipped
Unit
Tests Skipped

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
604

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.