Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35730 )
Change subject: sb,nb/intel/fsp_rangeley: Rename from xx_DEV_FUNC ......................................................................
Patch Set 4:
(1 comment)
Sure, the prefix XXX_ should change before merge.
https://review.coreboot.org/c/coreboot/+/35730/4/src/northbridge/intel/fsp_r... File src/northbridge/intel/fsp_rangeley/fsp/chipset_fsp_util.c:
https://review.coreboot.org/c/coreboot/+/35730/4/src/northbridge/intel/fsp_r... PS4, Line 112: UpdData->PcdEnableLan); This code ties PCI device BDF hard to the functionality it provides. Sure, it works with static BDF assigments, but would it not be better to have PCI device driver (in the context of detected device ID and class) to modify UpdData instead?
I would want to reduce the use of all _DEVFN_ as much as possible, but we cannot use symbol names for these case blocks, can we?
A related question; do we want to allow common code to include platform-specific <soc/pci_devs.h> headers and reference these xx_DEVFN_xx directly? Shouldn't the common code side declare some API instead to find the PCI devices they need?