Page MenuHomeFreeBSD

Add a PCI bridge for the Freescale PCIe Root Complex
ClosedPublic

Authored by jhibbits on May 4 2015, 5:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 8:06 PM
Unknown Object (File)
Mon, Nov 18, 6:19 PM
Unknown Object (File)
Wed, Nov 13, 10:26 PM
Unknown Object (File)
Fri, Nov 1, 1:54 AM
Unknown Object (File)
Thu, Oct 31, 6:08 AM
Unknown Object (File)
Oct 26 2024, 6:35 AM
Unknown Object (File)
Oct 22 2024, 9:35 AM
Unknown Object (File)
Oct 1 2024, 7:50 PM
Subscribers

Details

Reviewers
nwhitehorn
marcel
Group Reviewers
PowerPC
Summary

The Freescale PCIe Root Complex shows up as a Processor class device, PowerPC
subclass, so the generic PCI code ignores it for a bridge. This adds support
for it.

As part of this, update the Freescale PCI hostbridge driver, to allow probing
beyond the root complex, instead of only allowing "proper" PCI-PCI bridges. An
alternative, which is #if 0'd out currently, is a hack to force the secondary
bus to 'primary plus 1' if a stable PCIe link is detected. This makes the
assumption that PCIe can never have more than one bus, but it's not as elegant
as the solution I proposed. However, the solution proposed may see false
positives, and has not been tested beyond the MPC8544 in the RouterBoard RB800.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

jhibbits retitled this revision from to Add a PCI bridge for the Freescale PCIe Root Complex.
jhibbits updated this object.
jhibbits edited the test plan for this revision. (Show Details)
jhibbits added reviewers: PowerPC, marcel, nwhitehorn.

looks OK, but I'm not an expert...

sys/powerpc/mpc85xx/pci_mpc85xx.c
269

Do or Do Not. There' is no #if 0.
:)

sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c
2โ€“4

Odd copyright for a new file.

sys/powerpc/mpc85xx/pci_mpc85xx.c
269

I included this as the 'very unsexy alternative' mentioned in the summary. Soliciting opinions in case someone objects to my chosen solution.

sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c
2โ€“4

D'oh. That's what I get for copying the copyright+include list header.

Address copyright comment. Also, add a new function, pcib_bridge_init() to
clear the bridge config and use it in the new driver.

nwhitehorn edited edge metadata.

Nice work! I agree about the #if 0 section, though -- please remove it when you commit.

This revision is now accepted and ready to land.May 10 2015, 11:52 PM