Page MenuHomeFreeBSD

Code refactoring for rk_pgio driver
ClosedPublic

Authored by ganbold on Aug 19 2022, 10:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 30 2024, 5:22 PM
Unknown Object (File)
Sep 23 2024, 4:33 AM
Unknown Object (File)
Sep 22 2024, 9:21 PM
Unknown Object (File)
Sep 22 2024, 6:58 PM
Unknown Object (File)
Sep 21 2024, 7:12 PM
Unknown Object (File)
Sep 18 2024, 7:04 PM
Unknown Object (File)
Sep 18 2024, 12:29 AM
Unknown Object (File)
Sep 17 2024, 12:14 AM

Details

Summary

This patch does code refactoring for existing rk_gpio driver:
It supports gpio type checking. Depending on gpio type some
register addresses are different.
Submitted by: @sos

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

ganbold edited the summary of this revision. (Show Details)
sys/arm64/rockchip/rk_gpio.c
184

This shouldn't be removed, this is to allow caching and thus more fast gpio switching for bit banging.

309

Same (caching).

345

Same (caching)

363

Same (caching)

379

Same (for caching)

387

Same (caching)

428

Same (caching)

sys/arm64/rockchip/rk_gpio.c
275

The problem with this approch is that we take the lock, read, release the lock, re-take the lock, read, re-release the lock.
Maybe do some unlocked version of the new functions and call those from the locked one.

404

We have to take the lock before as we don't want another call to this function that will modify swporta_ddr too.

438

Same as above, we want a lock here.

457

Same as above.

475

Same as above, we take the lock twice, add some unlocked version of those new function.

This revision is now accepted and ready to land.Aug 19 2022, 1:18 PM
This revision was automatically updated to reflect the committed changes.