nb/intel/haswell: Fix type definition of dev in PCI_FUNC(dev)

The type of dev in the PCI_FUNC(dev) is incorrect. Fix it using
PCI_DEV2DEVFN() macro. Tested on a T440P, and necessary on this board
to enable the dGPU.

Change-Id: I3fb0f677cc98800f355f6af7d3172be3e59ce5c2
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38722
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Chris Morgan 2020-02-05 10:51:46 -06:00 committed by Felix Held
parent faa1118fc7
commit 2806ec971e
1 changed files with 3 additions and 3 deletions

View File

@ -101,7 +101,7 @@ static void start_peg2_link_training(const pci_devfn_t dev)
}
pci_update_config32(dev, 0xc24, ~(1 << 16), 1 << 5);
printk(BIOS_DEBUG, "Started PEG1%d link training.\n", PCI_FUNC(dev));
printk(BIOS_DEBUG, "Started PEG1%d link training.\n", PCI_FUNC(PCI_DEV2DEVFN(dev)));
/*
* The PEG device is hidden while the MRC runs. This is because the
@ -110,8 +110,8 @@ static void start_peg2_link_training(const pci_devfn_t dev)
* to these configurations.
*/
pci_update_config32(PCI_DEV(0, 0, 0), DEVEN, ~mask, 0);
peg_hidden[PCI_FUNC(dev)] = true;
printk(BIOS_DEBUG, "Temporarily hiding PEG1%d.\n", PCI_FUNC(dev));
peg_hidden[PCI_FUNC(PCI_DEV2DEVFN(dev))] = true;
printk(BIOS_DEBUG, "Temporarily hiding PEG1%d.\n", PCI_FUNC(PCI_DEV2DEVFN(dev)));
}
void haswell_unhide_peg(void)