coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
sch5545_ec_early.c File Reference
Include dependency graph for sch5545_ec_early.c:

Go to the source code of this file.

Functions

static void ec_read_write_reg_timeout (uint16_t ldn, uint8_t *val, uint16_t reg, uint8_t rw_bit)
 
static void ec_init_gpios (void)
 
static void ec_early_hwm_init (void)
 
void sch5545_ec_early_init (void)
 

Variables

static uint16_t emi_bar
 
static const struct ec_val_reg ec_gpio_init_table []
 
static const struct ec_val_reg ec_hwm_early_init_table []
 

Function Documentation

◆ ec_early_hwm_init()

static void ec_early_hwm_init ( void  )
static

Definition at line 98 of file sch5545_ec_early.c.

References ARRAY_SIZE, ec_hwm_early_init_table, EC_HWM_LDN, ec_read_write_reg_timeout(), ec_val_reg::reg, val, ec_val_reg::val, and WRITE_OP.

Referenced by sch5545_ec_early_init().

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

◆ ec_init_gpios()

static void ec_init_gpios ( void  )
static

Definition at line 86 of file sch5545_ec_early.c.

References ARRAY_SIZE, ec_gpio_init_table, EC_GPIO_LDN, ec_read_write_reg_timeout(), ec_val_reg::reg, val, ec_val_reg::val, and WRITE_OP.

Referenced by sch5545_ec_early_init().

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

◆ ec_read_write_reg_timeout()

static void ec_read_write_reg_timeout ( uint16_t  ldn,
uint8_t val,
uint16_t  reg,
uint8_t  rw_bit 
)
static

◆ sch5545_ec_early_init()

void sch5545_ec_early_init ( void  )

Definition at line 110 of file sch5545_ec_early.c.

References ec_early_hwm_init(), ec_init_gpios(), emi_bar, and sch5545_read_emi_bar().

Referenced by bootblock_mainboard_early_init().

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

Variable Documentation

◆ ec_gpio_init_table

const struct ec_val_reg ec_gpio_init_table[]
static
Initial value:
= {
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x08cc },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x08d0 },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x089c },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x0878 },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x0880 },
{ EC_GPIO_OD | EC_GPIO_FUNC1, 0x0884 },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x08e4 },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x08e0 },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x0848 },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x084c },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x0850 },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x083c },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x0840 },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x0844 },
{ EC_GPIO_PP | EC_GPIO_FUNC1, 0x0814 },
}
#define EC_GPIO_OD
Definition: sch5545_ec.h:16
#define EC_GPIO_PP
Definition: sch5545_ec.h:15
#define EC_GPIO_FUNC1
Definition: sch5545_ec.h:18

Definition at line 9 of file sch5545_ec_early.c.

Referenced by ec_init_gpios().

◆ ec_hwm_early_init_table

const struct ec_val_reg ec_hwm_early_init_table[]
static
Initial value:
= {
{ 0xff, 0x0005 },
{ 0x30, 0x00f0 },
{ 0x10, 0x00f8 },
{ 0x00, 0x00f9 },
{ 0x00, 0x00fa },
{ 0x00, 0x00fb },
{ 0x00, 0x00ea },
{ 0x00, 0x00eb },
{ 0x7c, 0x00ef },
{ 0x03, 0x006e },
{ 0x51, 0x02d0 },
{ 0x01, 0x02d2 },
{ 0x12, 0x059a },
{ 0x11, 0x059e },
{ 0x14, 0x05a2 },
{ 0x55, 0x05a3 },
{ 0x01, 0x02db },
{ 0x01, 0x0040 },
}

Definition at line 9 of file sch5545_ec_early.c.

Referenced by ec_early_hwm_init().

◆ emi_bar

uint16_t emi_bar
static

Definition at line 9 of file sch5545_ec_early.c.

Referenced by ec_read_write_reg_timeout(), and sch5545_ec_early_init().