This is a continuation of https://reviews.freebsd.org/D2340 and follows Andrew's suggestion to extract code related to PCI support into a separate review.
D7571 now overtakes these changes.
Differential D2579
PCI support for Alpine platform from Annapurna Labs jpa-semihalf.com on May 19 2015, 9:28 AM. Authored by Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions This is from my first pass over the driver.
Comment Actions My main comment here is that this seems to duplicate a lot of work of the PCI bus driver itself. With NEW_PCIB, the PCI bus is actually far more capable of handling things like assigning resources for bridges and the devices behind them, etc. I'm not sure how much would have to be updated in layers above this driver to allow that to work, but it might reduce a lot of the duplication.
Comment Actions This is an updated version of previous drop, and addresses comments from previous review. Comment Actions A lot of this looks like duplicated code from powerpc/ofw. At some point, this duplicated code should be merged into sys/dev/ofw, so all fdt/ofw platforms benefit from updates and bugfixes.
Comment Actions This is an update version, with fixes applied + uses the common code to be found in D4879: OFW PCI code decuplications - involves ARM, PPC and SPARC64 Comment Actions It looks things went forward - the D4879 got into mainline. There are no dependencies left, may I ask you for your review, then? Comment Actions In general this driver is still doing a lot of work to assign resources for BARs, PCI-PCI bridge windows, etc. that it shouldn't have to do. Using the unit number of the bridge as the base bus number also seems quite wrong if you ever have more than one bridge since the second bridge would have a unit number (device_get_unit()) of '1'. |