coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
bootblock.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
amdblocks/acpimmio.h
>
4
#include <
bootblock_common.h
>
5
#include <
device/pnp_type.h
>
6
#include <
superio/ite/common/ite.h
>
7
#include <
superio/ite/it8728f/it8728f.h
>
8
9
static
void
sbxxx_enable_48mhzout
(
void
)
10
{
11
/* Set auxiliary output clock frequency on OSCOUT2 pin to be 48MHz */
12
u32
reg32;
13
reg32 =
misc_read32
(0x28);
14
reg32 &= ~(7 << 19);
15
reg32 |= (2 << 19);
16
misc_write32
(0x28, reg32);
17
18
/* Enable Auxiliary OSCOUT2 */
19
misc_write32
(0x40,
misc_read32
(0x40) & ~(1 << 7));
20
}
21
22
static
void
superio_init_m
(
void
)
23
{
24
const
pnp_devfn_t
uart =
PNP_DEV
(0x2e,
IT8728F_SP1
);
25
const
pnp_devfn_t
gpio
=
PNP_DEV
(0x2e,
IT8728F_GPIO
);
26
27
ite_kill_watchdog
(
gpio
);
28
ite_enable_serial
(uart, CONFIG_TTYS0_BASE);
29
ite_enable_3vsbsw
(
gpio
);
30
}
31
32
void
bootblock_mainboard_early_init
(
void
)
33
{
34
/* enable SIO clock */
35
sbxxx_enable_48mhzout
();
36
37
superio_init_m
();
38
}
acpimmio.h
misc_read32
static uint32_t misc_read32(uint8_t reg)
Definition:
acpimmio.h:266
misc_write32
static void misc_write32(uint8_t reg, uint32_t value)
Definition:
acpimmio.h:281
bootblock_common.h
it8728f.h
IT8728F_GPIO
#define IT8728F_GPIO
Definition:
it8728f.h:13
IT8728F_SP1
#define IT8728F_SP1
Definition:
it8728f.h:7
ite_enable_serial
void ite_enable_serial(pnp_devfn_t dev, u16 iobase)
Definition:
early_serial.c:61
ite_kill_watchdog
void ite_kill_watchdog(pnp_devfn_t dev)
Definition:
early_serial.c:129
ite_enable_3vsbsw
void ite_enable_3vsbsw(pnp_devfn_t dev)
Definition:
early_serial.c:85
ite.h
bootblock_mainboard_early_init
__weak void bootblock_mainboard_early_init(void)
Definition:
bootblock.c:16
superio_init_m
static void superio_init_m(void)
Definition:
bootblock.c:22
sbxxx_enable_48mhzout
static void sbxxx_enable_48mhzout(void)
Definition:
bootblock.c:9
pnp_type.h
PNP_DEV
#define PNP_DEV(PORT, FUNC)
Definition:
pnp_type.h:10
pnp_devfn_t
u32 pnp_devfn_t
Definition:
pnp_type.h:8
u32
uint32_t u32
Definition:
stdint.h:51
gpio
Definition:
pinmux.c:36
src
mainboard
asus
a88xm-e
bootblock.c
Generated by
1.9.1