Page MenuHomeFreeBSD

Add FDT bus capabilities to ThunderX PCI driver
ClosedPublic

Authored by zbb on Jan 25 2016, 3:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 12:49 AM
Unknown Object (File)
Sat, Apr 6, 11:52 PM
Unknown Object (File)
Sat, Apr 6, 10:44 PM
Unknown Object (File)
Sat, Apr 6, 9:53 PM
Unknown Object (File)
Sat, Apr 6, 2:17 PM
Unknown Object (File)
Mar 12 2024, 2:21 AM
Unknown Object (File)
Mar 12 2024, 2:21 AM
Unknown Object (File)
Mar 12 2024, 2:21 AM
Subscribers

Details

Summary

New ThunderX firmware incorporates modified DTB that presents
different device hierarchy. In the new device tree, MDIO
devices are below two additional buses that oddly hang on
PCI bridge.

Diff Detail

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

Event Timeline

zbb retitled this revision from to Add FDT bus capabilities to ThunderX PCI driver.
zbb updated this object.
zbb edited the test plan for this revision. (Show Details)
zbb added reviewers: andrew, imp, ian, wma.
zbb set the repository for this revision to rS FreeBSD src repository - subversion.
zbb added a subscriber: arm64.

Looks good to me, but someone else should approve.

sys/arm64/cavium/thunder_pcie_common.c
48 ↗(On Diff #12688)

Change to: 'Thunder PCie driver memory' or anything specifying which memory it's all about.

zbb edited edge metadata.
zbb marked an inline comment as done.
sys/arm64/cavium/thunder_pcie.c
408 ↗(On Diff #12721)

Why do you need this ifndef?

sys/arm64/cavium/thunder_pcie_fdt.c
270–271 ↗(On Diff #12721)

Be warned that you may need to change this because of D5075

279 ↗(On Diff #12721)

When does this return < 0?

sys/arm64/cavium/thunder_pcie.c
408 ↗(On Diff #12721)

Hmm. Won't bus_alloc_resource and bus_release_resource here interfere with the same in thunder_pcie_fdt.c?

sys/arm64/cavium/thunder_pcie_fdt.c
270–271 ↗(On Diff #12721)

OK I will keep that in mind, thanks!

279 ↗(On Diff #12721)

You are right. This will be either == 0 or > 0.
I must have mistaken it with OF_<smthing> class of functions. I will fix that in the next iteration.

zbb marked 4 inline comments as done.
sys/arm64/cavium/thunder_pcie.c
408 ↗(On Diff #12786)

If you've overridden a function it should be used. We rely on this, e.g. to override the device_attach function.

sys/arm64/cavium/thunder_pcie_fdt.c
270–271 ↗(On Diff #12786)

It has now been committed, you will need to update the type.

zbb marked an inline comment as done.Jan 28 2016, 12:29 PM
zbb added inline comments.
sys/arm64/cavium/thunder_pcie_fdt.c
270–271 ↗(On Diff #12786)

It is done in the current diff. Did you check?

zbb marked an inline comment as done.Jan 28 2016, 12:29 PM
zbb added inline comments.
sys/arm64/cavium/thunder_pcie.c
408 ↗(On Diff #12786)

OK

sys/arm64/cavium/thunder_pcie_fdt.c
270–271 ↗(On Diff #12786)

Which diff? I don't see it here.

sys/arm64/cavium/thunder_pcie_fdt.c
270–271 ↗(On Diff #12786)

Agr sorry my bad. Didn't upload this one.
I will upload with the removed FDT above in a minute.

zbb marked 6 inline comments as done.
This revision was automatically updated to reflect the committed changes.