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
>
5
#include <
northbridge/intel/sandybridge/sandybridge.h
>
6
#include <
southbridge/intel/bd82x6x/pch.h
>
7
#include <
superio/smsc/sch5545/sch5545.h
>
8
#include <
superio/smsc/sch5545/sch5545_emi.h
>
9
10
#include <
baseboard/sch5545_ec.h
>
11
12
const
struct
southbridge_usb_port
mainboard_usb_ports
[] = {
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
29
void
bootblock_mainboard_early_init
(
void
)
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);
36
pci_write_config32
(
HOST_BRIDGE
,
MCHBAR
+ 4, 0);
37
mchbar_write16
(
SSKPD_HI
, 0);
38
39
sch5545_early_init
(0x2e);
40
/* Bare EC and SIO GPIO initialization which allows to enable serial port */
41
sch5545_emi_init
(0x2e);
42
sch5545_emi_disable_interrupts
();
43
sch5545_ec_early_init
();
44
45
if
(
CONFIG
(CONSOLE_SERIAL))
46
sch5545_enable_uart
(0x2e, 0);
47
}
bootblock_common.h
CONFIG
@ CONFIG
Definition:
dsi_common.h:201
mchbar_write16
static __always_inline void mchbar_write16(const uintptr_t offset, const uint16_t value)
Definition:
fixed_bars.h:31
MCHBAR
#define MCHBAR
Definition:
host_bridge.h:7
pci_ops.h
pci_write_config32
static __always_inline void pci_write_config32(const struct device *dev, u16 reg, u32 val)
Definition:
pci_ops.h:76
bootblock_mainboard_early_init
void bootblock_mainboard_early_init(void)
Definition:
early_init.c:11
mainboard_usb_ports
const struct southbridge_usb_port mainboard_usb_ports[]
Definition:
early_init.c:8
SSKPD_HI
#define SSKPD_HI
Definition:
mchbar.h:506
sandybridge.h
sch5545.h
sch5545_enable_uart
void sch5545_enable_uart(unsigned int port, unsigned int uart_no)
Definition:
sch5545_early_init.c:122
sch5545_early_init
void sch5545_early_init(unsigned int port)
Definition:
sch5545_early_init.c:66
sch5545_ec.h
sch5545_ec_early_init
void sch5545_ec_early_init(void)
Definition:
sch5545_ec_early.c:110
sch5545_emi_disable_interrupts
void sch5545_emi_disable_interrupts(void)
Writes the interrupt mask register with 0.
Definition:
sch5545_emi.c:66
sch5545_emi_init
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
sch5545_emi.h
HOST_BRIDGE
@ HOST_BRIDGE
Definition:
reg_access.h:23
pch.h
southbridge_usb_port
Definition:
pch.h:56
src
mainboard
dell
snb_ivb_workstations
early_init.c
Generated by
1.9.1