coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smihandler.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
acpi/acpi.h
>
4
#include <
console/console.h
>
5
#include <
cpu/x86/smm.h
>
6
#include <soc/nvs.h>
7
#include <
southbridge/intel/bd82x6x/pch.h
>
8
#include <
southbridge/intel/bd82x6x/me.h
>
9
#include <
northbridge/intel/sandybridge/sandybridge.h
>
10
11
/* Include for SIO helper functions */
12
#include <
superio/ite/it8772f/it8772f.h
>
13
#define SUPERIO_DEV PNP_DEV(0x2e, 0)
14
15
/*
16
* Change LED_POWER# (SIO GPIO 45) state based on sleep type.
17
*/
18
void
mainboard_smi_sleep
(
u8
slp_typ)
19
{
20
printk
(
BIOS_DEBUG
,
"SMI: sleep S%d\n"
, slp_typ);
21
switch
(slp_typ) {
22
case
ACPI_S3
:
23
case
ACPI_S4
:
24
it8772f_gpio_led
(
SUPERIO_DEV
, 4
/* set */
, (0x1 << 5)
/* select */
,
25
(0x1 << 5)
/* polarity */
, (0x1 << 5)
/* 1 = pullup */
,
26
(0x1 << 5)
/* output */
, 0x00,
/* 0 = Alternate function */
27
SIO_GPIO_BLINK_GPIO45
,
IT8772F_GPIO_BLINK_FREQUENCY_1_HZ
);
28
break
;
29
30
case
ACPI_S5
:
31
it8772f_gpio_led
(
SUPERIO_DEV
, 4
/* set */
, (0x1 << 5)
/* select */
,
32
0x00
/* polarity: non-inverting */
, 0x00
/* 0 = pulldown */
,
33
(0x1 << 5)
/* output */
, (0x1 << 5)
/* 1 = Simple IO function */
,
34
SIO_GPIO_BLINK_GPIO45
,
IT8772F_GPIO_BLINK_FREQUENCY_1_HZ
);
35
break
;
36
default
:
37
break
;
38
}
39
}
printk
#define printk(level,...)
Definition:
stdlib.h:16
console.h
mainboard_smi_sleep
void __weak mainboard_smi_sleep(u8 slp_typ)
Definition:
smihandler.c:210
acpi.h
ACPI_S5
@ ACPI_S5
Definition:
acpi.h:1385
ACPI_S4
@ ACPI_S4
Definition:
acpi.h:1384
ACPI_S3
@ ACPI_S3
Definition:
acpi.h:1383
smm.h
it8772f.h
IT8772F_GPIO_BLINK_FREQUENCY_1_HZ
#define IT8772F_GPIO_BLINK_FREQUENCY_1_HZ
Definition:
it8772f.h:97
BIOS_DEBUG
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition:
loglevel.h:128
SIO_GPIO_BLINK_GPIO45
#define SIO_GPIO_BLINK_GPIO45
Definition:
smihandler.c:17
SUPERIO_DEV
#define SUPERIO_DEV
Definition:
smihandler.c:13
sandybridge.h
me.h
pch.h
u8
uint8_t u8
Definition:
stdint.h:45
it8772f_gpio_led
void it8772f_gpio_led(pnp_devfn_t dev, int set, u8 select, u8 polarity, u8 pullup, u8 output, u8 enable, u8 led_pin_map, u8 led_freq)
Definition:
early_init.c:53
src
mainboard
samsung
stumpy
smihandler.c
Generated by
1.9.1