Debian Codegraph @

src/mainboard/ibm/sbp1/bootblock.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <bootblock_common.h>
4 #include <device/pci_def.h>
5 #include <device/pci_ops.h>
6 #include <intelblocks/lpc_lib.h>
7 #include <intelblocks/pcr.h>
8 #include <soc/intel/common/block/lpc/lpc_def.h>
9 #include <soc/pci_devs.h>
10 #include <soc/pcr_ids.h>
11
12 #define PCR_DMI_LPCIOD 0x2770
13 #define PCR_DMI_LPCIOE 0x2774
14
15 void bootblock_mainboard_early_init(void)
16 {
17 uint16_t lpciod = LPC_IOD_COMA_RANGE;
18 uint16_t lpcioe = LPC_IOE_COMA_EN;
19
20 /* Open IO windows: 0x3f8 for com1 */
21 pcr_or32(PID_DMI, PCR_DMI_LPCIOD, lpciod);
22 /* LPC I/O enable: com1 */
23 pcr_or32(PID_DMI, PCR_DMI_LPCIOE, lpcioe);
24
25 /* Enable com1 (0x3f8) */
26 pci_write_config16(PCH_DEV_LPC, LPC_IO_DECODE, lpciod);
27 pci_write_config16(PCH_DEV_LPC, LPC_IO_ENABLES, lpcioe);
28 }