Debian Codegraph @

src/mainboard/asus/p8x7x-series/variants/p8z77-m_pro/early_init.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <bootblock_common.h>
4 #include <device/pnp_type.h>
5
6 #include <superio/nuvoton/common/nuvoton.h>
7 #include <superio/nuvoton/nct6779d/nct6779d.h>
8
9 #include <option.h>
10
11 #include <northbridge/intel/sandybridge/raminit.h>
12 #include <northbridge/intel/sandybridge/pei_data.h>
13
14 #define SERIAL_DEV PNP_DEV(CONFIG_SUPERIO_PNP_BASE, NCT6779D_SP2)
15
16 void bootblock_mainboard_early_init(void)
17 {
18 nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
19 }
20
21 void mainboard_fill_pei_data(struct pei_data *pei_data)
22 {
23 /*
24 * USB3 mode:
25 * 0 = Disable: work always as USB 2.0(ehci)
26 * 1 = Enable: work always as USB 3.0(xhci)
27 * 2 = Auto: work as USB2.0(ehci) until OS loads USB3 xhci driver
28 * 3 = Smart Auto : same than Auto, but if OS loads USB3 driver
29 * and reboots, it will keep the USB3.0 speed
30 */
31 pei_data->usb3.mode = get_uint_option("usb3_mode", 1) & 0x3;
32 /* Load USB3 pre-OS xHCI driver */
33 pei_data->usb3.preboot_support = get_uint_option("usb3_drv", 1) & 0x1;
34 /* Use USB3 xHCI streams */
35 pei_data->usb3.xhci_streams = get_uint_option("usb3_streams", 1) & 0x1;
36 }