coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
romstage.c File Reference
#include <arch/exception.h>
#include <armv7.h>
#include <boot_device.h>
#include <cbmem.h>
#include <commonlib/region.h>
#include <console/console.h>
#include <device/i2c_simple.h>
#include <drivers/maxim/max77802/max77802.h>
#include <program_loading.h>
#include <soc/clk.h>
#include <soc/cpu.h>
#include <soc/dmc.h>
#include <soc/gpio.h>
#include <soc/i2c.h>
#include <soc/periph.h>
#include <soc/power.h>
#include <soc/setup.h>
#include <soc/trustzone.h>
#include <soc/wakeup.h>
#include <timestamp.h>
#include <types.h>
Include dependency graph for romstage.c:

Go to the source code of this file.

Data Structures

struct  pmic_write
 

Macros

#define PMIC_I2C_BUS   4
 
#define PRIMITIVE_MEM_TEST   0
 
#define primitive_mem_test()
 
#define SIMPLE_SPI_TEST   0
 
#define simple_spi_test()
 

Functions

static int setup_power (int is_resume)
 
static void setup_ec (void)
 
static void setup_gpio (void)
 
static void setup_memory (struct mem_timings *mem, int is_resume)
 
void main (void)
 

Variables

struct pmic_write pmic_writes []
 

Macro Definition Documentation

◆ PMIC_I2C_BUS

#define PMIC_I2C_BUS   4

Definition at line 25 of file romstage.c.

◆ PRIMITIVE_MEM_TEST

#define PRIMITIVE_MEM_TEST   0

Definition at line 125 of file romstage.c.

◆ primitive_mem_test

#define primitive_mem_test ( )

Definition at line 152 of file romstage.c.

◆ SIMPLE_SPI_TEST

#define SIMPLE_SPI_TEST   0

Definition at line 155 of file romstage.c.

◆ simple_spi_test

#define simple_spi_test ( )

Definition at line 201 of file romstage.c.

Function Documentation

◆ main()

◆ setup_ec()

static void setup_ec ( void  )
static

Definition at line 89 of file romstage.c.

References clock_set_rate(), exynos_pinmux_spi2(), and PERIPH_ID_SPI2.

Referenced by main().

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

◆ setup_gpio()

static void setup_gpio ( void  )
static

Definition at line 97 of file romstage.c.

References gpio_direction_input(), GPIO_PULL_NONE, gpio_set_pull(), GPIO_X07, GPIO_X12, GPIO_X30, and GPIO_X34.

Referenced by main().

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

◆ setup_memory()

static void setup_memory ( struct mem_timings mem,
int  is_resume 
)
static

Definition at line 112 of file romstage.c.

References BIOS_SPEW, ddr3_mem_ctrl_init(), die(), DMC_INTERLEAVE_SIZE, mem_timings::frequency_mhz, mem_timings::mem_manuf, mem_timings::mem_type, mem_timings::mpll_mdiv, and printk.

Referenced by main().

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

◆ setup_power()

static int setup_power ( int  is_resume)
static

Definition at line 60 of file romstage.c.

References ARRAY_SIZE, exynos_pinmux_i2c4(), i2c_init(), i2c_readb(), i2c_writeb(), MAX77802_I2C_ADDR, pmic_write::or_orig, PMIC_I2C_BUS, pmic_writes, power_init(), pmic_write::reg, and pmic_write::val.

Referenced by main().

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

Variable Documentation

◆ pmic_writes

struct pmic_write pmic_writes[]
Initial value:
=
{
}
#define MAX77802_BUCK3DVS1_1V
Definition: max77802.h:184
#define MAX77802_BUCK2DVS1_1_2625V
Definition: max77802.h:182
#define MAX77802_BUCK6DVS1_1V
Definition: max77802.h:188
#define MAX77802_BUCK_TYPE1_ON
Definition: max77802.h:195
#define MAX77802_BUCK_TYPE2_IGNORE_PWRREQ
Definition: max77802.h:200
#define MAX77802_BUCK1DVS1_1V
Definition: max77802.h:178
#define MAX77802_BOOSTCTRL_OFF
Definition: max77802.h:207
#define MAX77802_BUCK4DVS1_1V
Definition: max77802.h:186
@ MAX77802_REG_PMIC_BUCK4CTRL1
Definition: max77802.h:55
@ MAX77802_REG_PMIC_BUCK4DVS1
Definition: max77802.h:56
@ MAX77802_REG_PMIC_BUCK2CTRL1
Definition: max77802.h:34
@ MAX77802_REG_PMIC_BUCK1DVS1
Definition: max77802.h:24
@ MAX77802_REG_PMIC_BUCK6CTRL
Definition: max77802.h:68
@ MAX77802_REG_PMIC_32KHZ
Definition: max77802.h:161
@ MAX77802_REG_PMIC_BUCK6DVS1
Definition: max77802.h:69
@ MAX77802_REG_PMIC_BOOSTCTRL
Definition: max77802.h:20
@ MAX77802_REG_PMIC_BUCK3CTRL1
Definition: max77802.h:46
@ MAX77802_REG_PMIC_BUCK2DVS1
Definition: max77802.h:38
@ MAX77802_REG_PMIC_BUCK1CTRL
Definition: max77802.h:23
@ MAX77802_REG_PMIC_BUCK3DVS1
Definition: max77802.h:47
#define MAX77802_BUCK_TYPE2_ON
Definition: max77802.h:199
#define MAX77802_BUCK_TYPE1_IGNORE_PWRREQ
Definition: max77802.h:196
#define MAX77802_32KHCP_EN
Definition: max77802.h:213

Definition at line 1 of file romstage.c.

Referenced by setup_power().