1 /* This file is part of the coreboot project. */
2 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 #include <device/pci_ops.h>
6 #include <device/pci.h>
7 #include <device/pci_def.h>
8 #include <device/pci_ids.h>
17 /* Get the SMBus/PM device of the 82371AB/EB/MB. */
18 dev
= pci_locate_device(PCI_ID(PCI_VENDOR_ID_INTEL
,
19 PCI_DEVICE_ID_INTEL_82371AB_SMB_ACPI
), 0);
21 /* Set the PM I/O base. */
22 pci_write_config32(dev
, PMBA
, DEFAULT_PMBASE
| 1);
24 /* Enable access to the PM I/O space. */
25 reg16
= pci_read_config16(dev
, PCI_COMMAND
);
26 reg16
|= PCI_COMMAND_IO
;
27 pci_write_config16(dev
, PCI_COMMAND
, reg16
);
29 /* PM I/O Space Enable (PMIOSE). */
30 reg8
= pci_read_config8(dev
, PMREGMISC
);
32 pci_write_config8(dev
, PMREGMISC
, reg8
);