Page MenuHomeFreeBSD

pci_host_generic_fdt.c: Add support for mapping dts nodes to PCI devices
ClosedPublic

Authored by kd on May 10 2021, 11:06 AM.
Tags
None
Referenced Files
F107196852: D30180.diff
Sat, Jan 11, 12:43 PM
Unknown Object (File)
Tue, Jan 7, 7:34 AM
Unknown Object (File)
Mon, Jan 6, 6:22 PM
Unknown Object (File)
Wed, Dec 18, 4:48 PM
Unknown Object (File)
Sun, Dec 15, 5:48 AM
Unknown Object (File)
Dec 5 2024, 9:52 PM
Unknown Object (File)
Dec 5 2024, 6:30 PM
Unknown Object (File)
Nov 12 2024, 1:40 AM
Subscribers
None

Details

Summary

Some arm64 SoCs have nodes in their fdts that describe devices connected to the internal PCI bus.
One such SoC is Freescale LS1028A.
It expects the nodes to be mapped to devices enumerated using the standard PCI method.
Mapping is done by reading device and function ids from "reg" property.
Information is dts is used to describe MDIO/PHY connected to a given interface.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kd requested review of this revision.May 10 2021, 11:06 AM
kd created this revision.
This revision is now accepted and ready to land.May 26 2021, 12:29 PM
sys/dev/pci/pci_host_generic_fdt.c
396

Won't this break if there are multiple instances of this driver?

This revision now requires review to proceed.May 27 2021, 8:29 AM
sys/dev/pci/pci_host_generic_fdt.c
396

Whoops, you're right. The list should definitely be stored in the sc.

sys/dev/pci/pci_host_generic_fdt.c
432–433

Do we have macros for these? OFW_PCI_PHYS_HI_* look like what we should use.

Use OFW_PCI_PHYS_HI_* macros and check bus number during ofw node search.

This revision is now accepted and ready to land.Jun 2 2021, 10:16 AM