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-or-later */
2
3
#include <
device/pnp_ops.h
>
4
#include <
superio/nuvoton/common/nuvoton.h
>
5
#include <
superio/nuvoton/nct6776/nct6776.h
>
6
#include <
southbridge/intel/lynxpoint/pch.h
>
7
8
void
mainboard_config_superio
(
void
)
9
{
10
const
pnp_devfn_t
GLOBAL_PSEUDO_DEV =
PNP_DEV
(0x2e, 0);
11
const
pnp_devfn_t
SERIAL_DEV
=
PNP_DEV
(0x2e,
NCT6776_SP1
);
12
const
pnp_devfn_t
ACPI_DEV
=
PNP_DEV
(0x2e,
NCT6776_ACPI
);
13
14
nuvoton_enable_serial
(
SERIAL_DEV
, CONFIG_TTYS0_BASE);
15
16
nuvoton_pnp_enter_conf_state
(GLOBAL_PSEUDO_DEV);
17
18
/* Select HWM/LED functions instead of floppy functions. */
19
pnp_write_config
(GLOBAL_PSEUDO_DEV, 0x1c, 0x03);
20
pnp_write_config
(GLOBAL_PSEUDO_DEV, 0x24, 0x24);
21
22
/* Power RAM in S3 and let the PCH handle power failure actions. */
23
pnp_set_logical_device
(
ACPI_DEV
);
24
pnp_write_config
(
ACPI_DEV
, 0xe4, 0x70);
25
26
nuvoton_pnp_exit_conf_state
(GLOBAL_PSEUDO_DEV);
27
}
SERIAL_DEV
#define SERIAL_DEV
Definition:
bootblock.c:8
mainboard_config_superio
void mainboard_config_superio(void)
Definition:
bootblock.c:47
ACPI_DEV
#define ACPI_DEV
Definition:
bootblock.c:10
nct6776.h
NCT6776_SP1
#define NCT6776_SP1
Definition:
nct6776.h:11
NCT6776_ACPI
#define NCT6776_ACPI
Definition:
nct6776.h:18
nuvoton_pnp_enter_conf_state
void nuvoton_pnp_enter_conf_state(pnp_devfn_t dev)
Definition:
early_serial.c:33
nuvoton_enable_serial
void nuvoton_enable_serial(pnp_devfn_t dev, u16 iobase)
Definition:
early_serial.c:48
nuvoton_pnp_exit_conf_state
void nuvoton_pnp_exit_conf_state(pnp_devfn_t dev)
Definition:
early_serial.c:41
nuvoton.h
pnp_set_logical_device
void pnp_set_logical_device(struct device *dev)
Definition:
pnp_device.c:59
pnp_write_config
void pnp_write_config(struct device *dev, u8 reg, u8 value)
Definition:
pnp_device.c:38
pnp_ops.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
pch.h
src
mainboard
supermicro
x10slm-f
bootblock.c
Generated by
1.9.1