coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <device/device.h>
4 #include <soc/ramstage.h>
5 #include <option.h>
6 #include <variants.h>
7 
9 {
10  const unsigned int power_profile = get_uint_option("power_profile", fallback);
11  return power_profile < NUM_POWER_PROFILES ? power_profile : fallback;
12 }
13 
14 static void init_mainboard(void *chip_info)
15 {
16  const struct pad_config *pads;
17  size_t num;
18 
19  pads = variant_gpio_table(&num);
20  gpio_configure_pads(pads, num);
21 
23 }
24 
27 };
struct chip_operations mainboard_ops
Definition: mainboard.c:19
const struct pad_config *__weak variant_gpio_table(size_t *num)
Definition: gpio.c:406
unsigned int get_uint_option(const char *name, const unsigned int fallback)
Definition: option.c:116
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
#define NUM_POWER_PROFILES
Definition: variants.h:13
void devtree_update(void)
Definition: devtree.c:11
cmos_power_profile
Definition: variants.h:8
static void init_mainboard(void *chip_info)
Definition: mainboard.c:14
enum cmos_power_profile get_power_profile(enum cmos_power_profile fallback)
Definition: mainboard.c:8
void(* init)(void *chip_info)
Definition: device.h:25