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>
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 
28  ite_enable_serial(uart, CONFIG_TTYS0_BASE);
30 }
31 
33 {
34  /* enable SIO clock */
36 
38 }
static uint32_t misc_read32(uint8_t reg)
Definition: acpimmio.h:266
static void misc_write32(uint8_t reg, uint32_t value)
Definition: acpimmio.h:281
#define IT8728F_GPIO
Definition: it8728f.h:13
#define IT8728F_SP1
Definition: it8728f.h:7
void ite_enable_serial(pnp_devfn_t dev, u16 iobase)
Definition: early_serial.c:61
void ite_kill_watchdog(pnp_devfn_t dev)
Definition: early_serial.c:129
void ite_enable_3vsbsw(pnp_devfn_t dev)
Definition: early_serial.c:85
__weak void bootblock_mainboard_early_init(void)
Definition: bootblock.c:16
static void superio_init_m(void)
Definition: bootblock.c:22
static void sbxxx_enable_48mhzout(void)
Definition: bootblock.c:9
#define PNP_DEV(PORT, FUNC)
Definition: pnp_type.h:10
u32 pnp_devfn_t
Definition: pnp_type.h:8
uint32_t u32
Definition: stdint.h:51
Definition: pinmux.c:36