Page MenuHomeFreeBSD

Update mv_gpio driver to new FreeBSD API
ClosedPublic

Authored by pdk_semihalf.com on Mar 19 2018, 6:13 PM.
Tags
Referenced Files
Unknown Object (File)
Sun, May 12, 11:18 AM
Unknown Object (File)
Apr 8 2024, 11:21 PM
Unknown Object (File)
Mar 20 2024, 1:45 AM
Unknown Object (File)
Mar 19 2024, 3:37 PM
Unknown Object (File)
Mar 19 2024, 3:11 PM
Unknown Object (File)
Jan 19 2024, 12:44 PM
Unknown Object (File)
Dec 27 2023, 8:04 PM
Unknown Object (File)
Dec 20 2023, 5:23 AM

Details

Summary

This patch implements and exports functions described
in gpio_if.m file. It also uses new gpiobus_attach_bus function
instead of adding gpioc and gpiobus as children. It removes
ulgy reading SoC ID and related if..else, so it depends only on
data read from FDT.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

@manu I se you NACKed the patch, but don't see the actual remarks

In D14756#310616, @mw wrote:

@manu I se you NACKed the patch, but don't see the actual remarks

It's automatic by phabricator. @manu has it set up to add himself as a blocking reviewer on dts changes.

@andrew Right, I looked more closely at the icon after posting my comment :)

Hi @manu , do you have any objections to the patch?

Hello Marcin, sorry, I've added a few comments.
I will look more later today.

sys/arm/mv/gpio.c
205 ↗(On Diff #40470)

if (blah == 0)
return (ENXIO);

230 ↗(On Diff #40470)

if (bootverbose)
device_printf(

332 ↗(On Diff #40470)

mtx_destroy and bus_release resource is missing (maybe others)

pdk_semihalf.com updated this revision to Diff 41895.

Fixed all issues pointed by manu

This revision is now accepted and ready to land.Apr 26 2018, 6:36 PM

Thanks.
You might want to add access_32/config_32 in a futur patch too.

This revision was automatically updated to reflect the committed changes.