1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/smbus_host.h>
4 #include <device/pci_ops.h>
7 void i82801dx_early_init(void)
9 const pci_devfn_t dev
= PCI_DEV(0, 0x1f, 0);
11 /* Enable ACPI I/O range decode and ACPI power management. */
12 pci_write_config32(dev
, PMBASE
, DEFAULT_PMBASE
| 1);
13 pci_write_config8(dev
, ACPI_CNTL
, ACPI_EN
);
15 pci_write_config32(dev
, GPIO_BASE
, GPIOBASE_ADDR
| 1);
16 pci_write_config8(dev
, GPIO_CNTL
, 0x10);
22 void i82801dx_lpc_setup(void)
24 const pci_devfn_t dev
= PCI_DEV(0, 0x1f, 0);
26 /* Decode 0x3F8-0x3FF (COM1) for COMA port, 0x2F8-0x2FF (COM2) for COMB.
27 * LPT decode defaults to 0x378-0x37F and 0x778-0x77F.
28 * Floppy decode defaults to 0x3F0-0x3F5, 0x3F7.
29 * We also need to set the value for LPC I/F Enables Register.
31 pci_write_config8(dev
, COM_DEC
, 0x10);
32 pci_write_config16(dev
, LPC_EN
, 0x300F);