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.

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

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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
433–434

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