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 <bootblock_common.h>
4 #include <device/pnp_type.h>
5 #include <amdblocks/acpimmio.h>
6 #include <stdint.h>
11 
12 static void sbxxx_enable_48mhzout(void)
13 {
14  /* most likely programming to 48MHz out signal */
15  u32 reg32;
16  reg32 = misc_read32(0x28);
17  reg32 &= 0xffc7ffff;
18  reg32 |= 0x00100000;
19  misc_write32(0x28, reg32);
20 
21  misc_write32(0x40, misc_read32(0x40) & (~0x80u));
22 }
23 
24 static void superio_init_m(void)
25 {
26  const pnp_devfn_t uart = PNP_DEV(0x2e, IT8728F_SP1);
27  const pnp_devfn_t gpio = PNP_DEV(0x2e, IT8728F_GPIO);
28 
30  ite_enable_serial(uart, CONFIG_TTYS0_BASE);
32 }
33 
34 static void superio_init_m_pro(void)
35 {
36  const pnp_devfn_t uart = PNP_DEV(0x2e, NCT6779D_SP1);
37 
38  nuvoton_enable_serial(uart, CONFIG_TTYS0_BASE);
39 }
40 
42 {
43  /* enable SIO clock */
45 
46  if (CONFIG(BOARD_ASUS_F2A85_M_PRO))
48  else
50 }
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
@ CONFIG
Definition: dsi_common.h:201
#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:24
static void sbxxx_enable_48mhzout(void)
Definition: bootblock.c:12
static void superio_init_m_pro(void)
Definition: bootblock.c:34
#define NCT6779D_SP1
Definition: nct6779d.h:8
void nuvoton_enable_serial(pnp_devfn_t dev, u16 iobase)
Definition: early_serial.c:48
#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