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
Unknown Object (File)
Feb 16 2024, 4:48 AM
Unknown Object (File)
Feb 16 2024, 4:40 AM
Unknown Object (File)
Feb 16 2024, 4:40 AM
Unknown Object (File)
Feb 16 2024, 4:39 AM
Unknown Object (File)
Feb 16 2024, 4:39 AM
Unknown Object (File)
Feb 16 2024, 4:27 AM
Unknown Object (File)
Feb 15 2024, 2:06 PM
Unknown Object (File)
Feb 6 2024, 12:07 PM
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
395

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
395

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

sys/dev/pci/pci_host_generic_fdt.c
429–430

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