coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
sch5545_ec.h File Reference
#include <stdint.h>
Include dependency graph for sch5545_ec.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ec_val_reg
 
struct  ec_val_reg_tdp
 

Macros

#define READ_OP   0
 
#define WRITE_OP   1
 
#define EC_HWM_LDN   1
 
#define EC_GPIO_LDN   2
 
#define EC_GPIO_PP   (0 << 0)
 
#define EC_GPIO_OD   (1 << 0)
 
#define EC_GPIO_FUNC0   (0 << 4)
 
#define EC_GPIO_FUNC1   (1 << 4)
 
#define EC_GPIO_FUNC2   (2 << 4)
 
#define EC_GPIO_FUNC3   (3 << 4)
 

Typedefs

typedef struct ec_val_reg_tdp ec_chassis_tdp_t
 

Enumerations

enum  { TDP_16 = 0x10 , TDP_32 = 0x20 , TDP_COMMON = 0xff }
 

Functions

uint16_t sch5545_get_ec_fw_version (void)
 
void sch5545_update_ec_firmware (uint16_t ec_version)
 
void sch5545_ec_early_init (void)
 
void sch5545_ec_hwm_early_init (void)
 
void sch5545_ec_hwm_init (void *unused)
 

Macro Definition Documentation

◆ EC_GPIO_FUNC0

#define EC_GPIO_FUNC0   (0 << 4)

Definition at line 17 of file sch5545_ec.h.

◆ EC_GPIO_FUNC1

#define EC_GPIO_FUNC1   (1 << 4)

Definition at line 18 of file sch5545_ec.h.

◆ EC_GPIO_FUNC2

#define EC_GPIO_FUNC2   (2 << 4)

Definition at line 19 of file sch5545_ec.h.

◆ EC_GPIO_FUNC3

#define EC_GPIO_FUNC3   (3 << 4)

Definition at line 20 of file sch5545_ec.h.

◆ EC_GPIO_LDN

#define EC_GPIO_LDN   2

Definition at line 12 of file sch5545_ec.h.

◆ EC_GPIO_OD

#define EC_GPIO_OD   (1 << 0)

Definition at line 16 of file sch5545_ec.h.

◆ EC_GPIO_PP

#define EC_GPIO_PP   (0 << 0)

Definition at line 15 of file sch5545_ec.h.

◆ EC_HWM_LDN

#define EC_HWM_LDN   1

Definition at line 11 of file sch5545_ec.h.

◆ READ_OP

#define READ_OP   0

Definition at line 8 of file sch5545_ec.h.

◆ WRITE_OP

#define WRITE_OP   1

Definition at line 9 of file sch5545_ec.h.

Typedef Documentation

◆ ec_chassis_tdp_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
TDP_16 
TDP_32 
TDP_COMMON 

Definition at line 27 of file sch5545_ec.h.

Function Documentation

◆ 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:

◆ sch5545_ec_hwm_early_init()

void sch5545_ec_hwm_early_init ( void  )

Definition at line 259 of file sch5545_ec.c.

References ARRAY_SIZE, BIOS_DEBUG, ec_check_mbox_and_int_status(), ec_hwm_init_seq, EC_HWM_LDN, ec_read_write_reg(), printk, READ_OP, ec_val_reg::reg, val, ec_val_reg::val, and WRITE_OP.

Referenced by mainboard_early_init().

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

◆ sch5545_ec_hwm_init()

◆ sch5545_get_ec_fw_version()

uint16_t sch5545_get_ec_fw_version ( void  )

Definition at line 182 of file sch5545_ec.c.

References EC_HWM_LDN, ec_read_write_reg(), READ_OP, and val.

Referenced by mainboard_early_init(), and sch5545_update_ec_firmware().

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

◆ sch5545_update_ec_firmware()

void sch5545_update_ec_firmware ( uint16_t  ec_version)

Definition at line 199 of file sch5545_ec.c.

References BIOS_ERR, BIOS_INFO, BIOS_WARNING, cbfs_map(), full_reset(), printk, sch5545_emi_ec_write32_bulk(), sch5545_get_ec_fw_version(), and send_mbox_msg_simple().

Referenced by mainboard_early_init().

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