blob: 3951e336ee7f842f411dacc1b49dcf69c7662783 [file] [log] [blame]
Angel Pons6ad91762020-04-03 01:23:24 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Mario Scheithauer66038c82018-09-25 17:26:32 +02002
Mario Scheithauer66038c82018-09-25 17:26:32 +02003#include <device/pci_def.h>
4#include <device/pci_ids.h>
5#include <device/pci_ops.h>
Elyes HAOUAS485a83f2021-02-01 21:36:53 +01006#include <device/device.h>
Mario Scheithauer66038c82018-09-25 17:26:32 +02007#include <baseboard/variants.h>
Werner Zeh42065f82019-05-02 12:45:21 +02008
Mario Scheithauer66038c82018-09-25 17:26:32 +02009void variant_mainboard_final(void)
10{
11 struct device *dev;
Mario Scheithauer66038c82018-09-25 17:26:32 +020012
Werner Zehe8fc8f32021-07-22 06:44:01 +020013 if (CONFIG(PCI_ALLOW_BUS_MASTER_ANY_DEVICE)) {
Werner Zeh1412ffa2021-07-20 07:33:20 +020014 /* Set Master Enable for on-board PCI device if allowed. */
15 dev = dev_find_device(PCI_VENDOR_ID_SIEMENS, 0x403e, 0);
16 if (dev) {
17 pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER);
18 }
Mario Scheithauer66038c82018-09-25 17:26:32 +020019 }
Mario Scheithauer66038c82018-09-25 17:26:32 +020020}