mb/siemens/mc_rpl: Enable master bit in PCI config space if allowed
Some legacy devices need to have the master bit set in the PCI config
due to old drivers not setting it correctly. Set the master bit if the
feature is enabled via Kconfig switch PCI_ALLOW_BUS_MASTER_ANY_DEVICE.
This implementation is similar to the approach used in an earlier
Siemens platform, as implemented in commit 78ec750610
("mb/siemens/mc_ehl: Enable master bit in PCI config space if allowed").
TEST=Confirmed bus master enabled via lspci after boot.
Change-Id: I6d358ba7147860fd1383abe667a7006d9a30d542
Signed-off-by: Kilian Krause <kilian.krause@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88963
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
a8bce33b82
commit
62b6d1e336
1 changed files with 17 additions and 1 deletions
|
|
@ -9,7 +9,9 @@
|
|||
#include <hwilib.h>
|
||||
#include <i210.h>
|
||||
#include <soc/ramstage.h>
|
||||
|
||||
#include <device/pci_def.h>
|
||||
#include <device/pci_ops.h>
|
||||
#include <device/pci_ids.h>
|
||||
|
||||
#define MAX_PATH_DEPTH 12
|
||||
#define MAX_NUM_MAPPINGS 10
|
||||
|
|
@ -92,6 +94,19 @@ void mainboard_silicon_init_params(FSP_S_CONFIG *params)
|
|||
params->TurboMode = 0;
|
||||
}
|
||||
|
||||
static void mainboard_final(void *chip_info)
|
||||
{
|
||||
struct device *dev;
|
||||
|
||||
if (CONFIG(PCI_ALLOW_BUS_MASTER_ANY_DEVICE)) {
|
||||
/* Enable bus mastering - target OS requires firmware initialization */
|
||||
dev = dev_find_device(PCI_VID_SIEMENS, 0x403f, 0);
|
||||
if (dev)
|
||||
pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void mainboard_init(void *chip_info)
|
||||
{
|
||||
variant_configure_gpio_pads();
|
||||
|
|
@ -106,4 +121,5 @@ void __weak variant_devtree_update(void)
|
|||
|
||||
struct chip_operations mainboard_ops = {
|
||||
.init = mainboard_init,
|
||||
.final = mainboard_final,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue