vc/amd/opensil/*/mpio: add IFTYPE_UNUSED mpio_type enum element
Add IFTYPE_UNUSED as first element to the mpio_type enum. This allows checking if the type was set in the devicetree, since the default will now be IFTYPE_UNUSED. If the type is set to IFTYPE_UNUSED although the corresponding PCI device function, a warning is printed and the PCI device function is disabled. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I85e2589c021b4f05662369fd551146b6f2fa0ad4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/81339 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
@ -134,6 +134,14 @@ static void per_device_config(MPIOCLASS_INPUT_BLK *mpio_data, struct device *dev
|
|||||||
printk(BIOS_DEBUG, "Setting MPIO port for domain 0x%x, PCI %d:%d\n",
|
printk(BIOS_DEBUG, "Setting MPIO port for domain 0x%x, PCI %d:%d\n",
|
||||||
domain, PCI_SLOT(devfn), PCI_FUNC(devfn));
|
domain, PCI_SLOT(devfn), PCI_FUNC(devfn));
|
||||||
|
|
||||||
|
if (config->type == IFTYPE_UNUSED) {
|
||||||
|
if (is_dev_enabled(dev)) {
|
||||||
|
printk(BIOS_WARNING, "Unused MPIO engine, disabling PCI device.\n");
|
||||||
|
dev->enabled = false;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (config->bmc) {
|
if (config->bmc) {
|
||||||
setup_bmc_lanes(config->start_lane, 0); // TODO support multiple sockets
|
setup_bmc_lanes(config->start_lane, 0); // TODO support multiple sockets
|
||||||
return;
|
return;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
enum mpio_type {
|
enum mpio_type {
|
||||||
|
IFTYPE_UNUSED,
|
||||||
IFTYPE_PCIE,
|
IFTYPE_PCIE,
|
||||||
IFTYPE_SATA,
|
IFTYPE_SATA,
|
||||||
};
|
};
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
|
||||||
enum mpio_engine_type {
|
enum mpio_engine_type {
|
||||||
|
IFTYPE_UNUSED,
|
||||||
IFTYPE_PCIE,
|
IFTYPE_PCIE,
|
||||||
IFTYPE_SATA,
|
IFTYPE_SATA,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user