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-only */
2 
3 #include <bootblock_common.h>
4 #include <device/pci_ops.h>
9 
10 #include <baseboard/sch5545_ec.h>
11 
13  { 1, 6, 0 },
14  { 1, 6, 0 },
15  { 1, 1, 1 },
16  { 1, 1, 1 },
17  { 1, 1, 2 },
18  { 1, 1, 2 },
19  { 1, 6, 3 },
20  { 1, 6, 3 },
21  { 1, 6, 4 },
22  { 1, 6, 4 },
23  { 1, 6, 5 },
24  { 1, 1, 5 },
25  { 1, 1, 6 },
26  { 1, 6, 6 },
27 };
28 
30 {
31  /*
32  * FIXME: the board gets stuck in reset loop in
33  * mainboard_romstage_entry. Avoid that by clearing SSKPD
34  */
35  pci_write_config32(HOST_BRIDGE, MCHBAR, CONFIG_FIXED_MCHBAR_MMIO_BASE | 1);
38 
39  sch5545_early_init(0x2e);
40  /* Bare EC and SIO GPIO initialization which allows to enable serial port */
41  sch5545_emi_init(0x2e);
44 
45  if (CONFIG(CONSOLE_SERIAL))
46  sch5545_enable_uart(0x2e, 0);
47 }
@ CONFIG
Definition: dsi_common.h:201
static __always_inline void mchbar_write16(const uintptr_t offset, const uint16_t value)
Definition: fixed_bars.h:31
#define MCHBAR
Definition: host_bridge.h:7
static __always_inline void pci_write_config32(const struct device *dev, u16 reg, u32 val)
Definition: pci_ops.h:76
void bootblock_mainboard_early_init(void)
Definition: early_init.c:11
const struct southbridge_usb_port mainboard_usb_ports[]
Definition: early_init.c:8
#define SSKPD_HI
Definition: mchbar.h:506
void sch5545_enable_uart(unsigned int port, unsigned int uart_no)
void sch5545_early_init(unsigned int port)
void sch5545_ec_early_init(void)
void sch5545_emi_disable_interrupts(void)
Writes the interrupt mask register with 0.
Definition: sch5545_emi.c:66
void sch5545_emi_init(uint8_t sio_port)
One must call this function at every stage before using any of the EMI functions.
Definition: sch5545_emi.c:55
@ HOST_BRIDGE
Definition: reg_access.h:23