coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
bootblock.c File Reference
#include <bootblock_common.h>
#include <console/console.h>
#include <delay.h>
#include <gpio.h>
#include "include/ec.h"
#include "include/gpio.h"
Include dependency graph for bootblock.c:

Go to the source code of this file.

Macros

#define ADC_3V_10BIT_GRANULARITY_MAX   (3005 / 1023)
 
#define PCB_VER_AD   1
 
#define MODEL_ID_AD   3
 
#define DGPU_PRESENT   GPP_A20 /* Active low */
 
#define DGPU_HOLD_RST   GPP_B4 /* Active low */
 
#define DGPU_PWR_EN   GPP_B21 /* Active low */
 

Functions

static void board_detect (void)
 
static void dgpu_power_on (void)
 
void bootblock_mainboard_init (void)
 
void bootblock_mainboard_early_init (void)
 

Macro Definition Documentation

◆ ADC_3V_10BIT_GRANULARITY_MAX

#define ADC_3V_10BIT_GRANULARITY_MAX   (3005 / 1023)

Definition at line 10 of file bootblock.c.

◆ DGPU_HOLD_RST

#define DGPU_HOLD_RST   GPP_B4 /* Active low */

Definition at line 15 of file bootblock.c.

◆ DGPU_PRESENT

#define DGPU_PRESENT   GPP_A20 /* Active low */

Definition at line 14 of file bootblock.c.

◆ DGPU_PWR_EN

#define DGPU_PWR_EN   GPP_B21 /* Active low */

Definition at line 16 of file bootblock.c.

◆ MODEL_ID_AD

#define MODEL_ID_AD   3

Definition at line 12 of file bootblock.c.

◆ PCB_VER_AD

#define PCB_VER_AD   1

Definition at line 11 of file bootblock.c.

Function Documentation

◆ board_detect()

static void board_detect ( void  )
static

Definition at line 19 of file bootblock.c.

References ADC_3V_10BIT_GRANULARITY_MAX, BIOS_CRIT, BIOS_DEBUG, BIOS_ERR, MODEL_ID_AD, PCB_VER_AD, printk, and read_ec_adc_converter().

Referenced by bootblock_mainboard_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bootblock_mainboard_early_init()

void bootblock_mainboard_early_init ( void  )

Definition at line 85 of file bootblock.c.

References mainboard_config_stage_gpios().

Here is the call graph for this function:

◆ bootblock_mainboard_init()

void bootblock_mainboard_init ( void  )

Definition at line 75 of file bootblock.c.

References board_detect(), and dgpu_power_on().

Here is the call graph for this function:

◆ dgpu_power_on()

static void dgpu_power_on ( void  )
static

Definition at line 58 of file bootblock.c.

References BIOS_DEBUG, DGPU_HOLD_RST, DGPU_PRESENT, DGPU_PWR_EN, gpio_get(), gpio_set(), mdelay(), and printk.

Referenced by bootblock_mainboard_init().

Here is the call graph for this function:
Here is the caller graph for this function: