coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
fw_config.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
3
#include <baseboard/gpio.h>
4
#include <
bootstate.h
>
5
#include <
console/console.h
>
6
#include <
fw_config.h
>
7
8
static
const
struct
pad_config
lte_disable_pads
[] = {
9
/* A8 : WWAN_RF_DISABLE_ODL */
10
PAD_NC
(
GPP_A8
,
NONE
),
11
/* D6 : WWAN_EN */
12
PAD_NC
(
GPP_D6
,
NONE
),
13
/* F12 : WWAN_RST_L */
14
PAD_NC
(
GPP_F12
,
NONE
),
15
/* H19 : SOC_I2C_SUB_INT_ODL */
16
PAD_NC
(
GPP_H19
,
NONE
),
17
/* H23 : WWAN_SAR_DETECT_ODL */
18
PAD_NC
(
GPP_H23
,
NONE
),
19
};
20
21
static
void
fw_config_handle
(
void
*
unused
)
22
{
23
if
(!
fw_config_probe
(
FW_CONFIG
(DB_USB, DB_1C_LTE))) {
24
printk
(
BIOS_INFO
,
"Disable LTE-related GPIO pins.\n"
);
25
gpio_configure_pads
(
lte_disable_pads
,
ARRAY_SIZE
(
lte_disable_pads
));
26
}
27
}
28
BOOT_STATE_INIT_ENTRY
(
BS_DEV_ENABLE
,
BS_ON_ENTRY
,
fw_config_handle
,
NULL
);
GPP_H19
#define GPP_H19
Definition:
gpio_soc_defs.h:235
GPP_F12
#define GPP_F12
Definition:
gpio_soc_defs.h:585
GPP_D6
#define GPP_D6
Definition:
gpio_soc_defs.h:258
GPP_A8
#define GPP_A8
Definition:
gpio_soc_defs.h:127
GPP_H23
#define GPP_H23
Definition:
gpio_soc_defs.h:239
bootstate.h
BS_DEV_ENABLE
@ BS_DEV_ENABLE
Definition:
bootstate.h:82
BS_ON_ENTRY
@ BS_ON_ENTRY
Definition:
bootstate.h:95
ARRAY_SIZE
#define ARRAY_SIZE(a)
Definition:
helpers.h:12
printk
#define printk(level,...)
Definition:
stdlib.h:16
console.h
fw_config.h
FW_CONFIG
#define FW_CONFIG(__field, __option)
Definition:
fw_config.h:28
fw_config_probe
bool fw_config_probe(const struct fw_config *match)
Definition:
fw_config.c:62
BIOS_INFO
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition:
loglevel.h:113
BOOT_STATE_INIT_ENTRY
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL)
lte_disable_pads
static const struct pad_config lte_disable_pads[]
Definition:
fw_config.c:8
fw_config_handle
static void fw_config_handle(void *unused)
Definition:
fw_config.c:21
NONE
@ NONE
Definition:
qup_se_handlers_common.h:196
gpio_configure_pads
void gpio_configure_pads(const struct soc_amd_gpio *gpio_list_ptr, size_t size)
program a particular set of GPIO
Definition:
gpio.c:307
PAD_NC
#define PAD_NC(pin)
Definition:
gpio_defs.h:263
NULL
#define NULL
Definition:
stddef.h:19
pad_config
Definition:
gpio.h:75
pad_config::unused
uint16_t unused
Definition:
padconfig.h:13
src
mainboard
google
brya
variants
nivviks
fw_config.c
Generated by
1.9.1