Page MenuHomeFreeBSD

OFW: Add helper function for parsing PCI "ranges" property.
AbandonedPublic

Authored by mmel on Dec 3 2015, 12:19 PM.
Tags
Referenced Files
Unknown Object (File)
May 22 2024, 10:26 PM
Unknown Object (File)
May 22 2024, 10:26 PM
Unknown Object (File)
May 22 2024, 9:02 PM
Unknown Object (File)
Dec 22 2023, 11:08 PM
Unknown Object (File)
Nov 10 2023, 6:37 AM
Unknown Object (File)
Oct 9 2023, 5:31 AM
Unknown Object (File)
Jul 21 2023, 2:01 PM
Unknown Object (File)
Apr 9 2017, 2:20 AM
Subscribers
None

Details

Summary

This function is needed for (nearly) all OFW PCI(e) drivers.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mmel retitled this revision from to OFW: Add helper function for parsing PCI "ranges" property..
mmel updated this object.
mmel edited the test plan for this revision. (Show Details)
mmel added reviewers: imp, nwhitehorn, andrew, kib.
mmel set the repository for this revision to rS FreeBSD src repository - subversion.
mmel added a project: ARM.

What pci drivers do we have that could use this?

sys/dev/ofw/ofw_pci.c
112

It looks a bit odd using (*ranges)[i] som any times, perhaps create a variable to point at *ranges?

I'm not 100% sure, but probably all arm PCIe drivers have 'ranges' property. To be specific, each one who have I/O, memory and/or config space mapped to fixed (or configurable) address in host address space.

sys/dev/ofw/ofw_pci.c
112

oki, i will do it

On PPC, instead of a utility function, we have a common newbus base class that does this (powerpc/ofw/ofw_pci*). These remove 99% of the boilerplate from PCI bus drivers as well. I'd prefer that approach on ARM to new functions.

Yes, it's definitely better way.