coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
early_init.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <bootblock_common.h>
4 #include <device/pnp_ops.h>
9 
10 #define SERIAL_DEV PNP_DEV(0x2e, W83627DHG_SP1)
11 
13 {
14  /* Set GPIOs on superio, enable UART */
17 
18  pnp_write_config(SERIAL_DEV, 0x2c, 0x13);
19 
21 
22  winbond_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
23 
24  /* IRQ routing */
25  RCBA16(D31IR) = 0x0132;
26  RCBA16(D29IR) = 0x0237;
27 }
28 
29 void mb_get_spd_map(u8 spd_map[4])
30 {
31  spd_map[0] = 0x50;
32  spd_map[2] = 0x52;
33 }
void bootblock_mainboard_early_init(void)
Definition: early_init.c:11
void mb_get_spd_map(u8 spd_map[4])
Definition: early_init.c:27
static void pnp_enter_ext_func_mode(pnp_devfn_t dev)
Definition: early_init.c:52
static void pnp_exit_ext_func_mode(pnp_devfn_t dev)
Definition: early_init.c:58
#define SERIAL_DEV
Definition: early_init.c:10
void pnp_set_logical_device(struct device *dev)
Definition: pnp_device.c:59
void pnp_write_config(struct device *dev, u8 reg, u8 value)
Definition: pnp_device.c:38
#define D31IR
Definition: rcba.h:87
#define D29IR
Definition: rcba.h:89
#define RCBA16(x)
Definition: rcba.h:13
uint8_t u8
Definition: stdint.h:45
void winbond_enable_serial(pnp_devfn_t dev, u16 iobase)
Definition: early_init.c:47