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 #define SERIAL_DEV PNP_DEV(0x2e, W83627UHG_SP1)
10 
12 {
13  /* Disable PCI-PCI bridge and release GPIO32/33 for other uses. */
14  pm_write8(0xea, 0x1);
15 
16  /* Set auxiliary output clock frequency on OSCOUT1 pin to be 48MHz */
17  misc_write32(0x28, misc_read32(0x28) & 0xfff8ffff);
18 
19  /* Enable Auxiliary Clock1, disable FCH 14 MHz OscClk */
20  misc_write32(0x40, misc_read32(0x40) & 0xffffbffb);
21 
22  /* w83627uhg has a default clk of 48MHz, p.9 of data-sheet */
23  winbond_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
24 }
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
static void pm_write8(uint8_t reg, uint8_t value)
Definition: acpimmio.h:181
__weak void bootblock_mainboard_early_init(void)
Definition: bootblock.c:16
#define SERIAL_DEV
Definition: bootblock.c:9
void winbond_enable_serial(pnp_devfn_t dev, u16 iobase)
Definition: early_init.c:47