coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
variants.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef __BASEBOARD_VARIANTS_H__
4 #define __BASEBOARD_VARIANTS_H__
5 
6 #include <soc/gpio.h>
7 #include <stdint.h>
8 #include <acpi/acpi_device.h>
9 
10 /* The next set of functions return the gpio table and fill in the number of
11  * entries for each table. */
12 
13 const struct pad_config *variant_base_gpio_table(size_t *num);
14 const struct pad_config *variant_early_gpio_table(size_t *num);
15 const struct pad_config *variant_sleep_gpio_table(size_t *num);
16 const struct pad_config *variant_override_gpio_table(size_t *num);
17 
18 /**
19  * Get board's Hardware features as defined in FW_CONFIG
20  *
21  * @param fw_config Address where the fw_config is stored.
22  * @return 0 on success or negative integer for errors.
23  */
25 
26 /* Return memory configuration structure. */
27 const struct mb_cfg *variant_memcfg_config(void);
28 
29 /* Return memory SKU for the variant */
30 int variant_memory_sku(void);
31 
32 /**
33  * Get data whether memory channel is half-populated or not
34  *
35  * @return false on boards where memory channel is half-populated, true otherwise.
36  */
38 
39 /* Allow each variants to customize SMI sleep flow. */
40 void variant_smi_sleep(u8 slp_typ);
41 
42 /* Modify devictree settings during ramstage. */
43 void variant_devtree_update(void);
44 
45 /* Modify LTE devictree settings during ramstage. */
46 void update_lte_device(struct acpi_gpio *lte_reset_gpio, struct acpi_gpio *lte_enable_gpio);
47 #endif /*__BASEBOARD_VARIANTS_H__ */
void variant_devtree_update(void)
Definition: mainboard.c:86
const struct pad_config * variant_early_gpio_table(size_t *num)
Definition: gpio.c:204
int variant_memory_sku(void)
Definition: memory.c:74
const struct pad_config * variant_override_gpio_table(size_t *num)
Definition: gpio.c:450
bool variant_mem_is_half_populated(void)
Get data whether memory channel is half-populated or not.
Definition: memory.c:63
const struct pad_config * variant_sleep_gpio_table(size_t *num)
Definition: gpio.c:466
void update_lte_device(struct acpi_gpio *lte_reset_gpio, struct acpi_gpio *lte_enable_gpio)
const struct mb_cfg * variant_memcfg_config(void)
Definition: memory.c:46
int board_info_get_fw_config(uint64_t *fw_config)
Get board's Hardware features as defined in FW_CONFIG.
Definition: board_info.c:6
const struct pad_config * variant_base_gpio_table(size_t *num)
Definition: gpio.c:444
void variant_smi_sleep(u8 slp_typ)
Definition: smihandler.c:52
unsigned long long uint64_t
Definition: stdint.h:17
uint8_t u8
Definition: stdint.h:45
struct fw_config - Firmware configuration field and option.
Definition: fw_config.h:20
Definition: meminit.h:71