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

Go to the source code of this file.

Data Structures

struct  chan_regs
 
struct  pmif
 

Enumerations

enum  { PMIF_CMD_REG_0 , PMIF_CMD_REG , PMIF_CMD_EXT_REG , PMIF_CMD_EXT_REG_LONG }
 
enum  { PMIF_SPI , PMIF_SPMI }
 
enum  {
  E_IO = 1 , E_BUSY , E_NODEV , E_INVAL ,
  E_OPNOTSUPP , E_TIMEOUT , E_READ_TEST_FAIL , E_SPI_INIT_RESET_SPI ,
  E_SPI_INIT_SIDLY
}
 
enum  pmic_interface { PMIF_VLD_RDY = 0 , PMIF_SLP_REQ }
 

Functions

struct pmifget_pmif_controller (int inf, int mstid)
 
void pmwrap_interface_init (void)
 
int mtk_pmif_init (void)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PMIF_CMD_REG_0 
PMIF_CMD_REG 
PMIF_CMD_EXT_REG 
PMIF_CMD_EXT_REG_LONG 

Definition at line 8 of file pmif_common.h.

◆ anonymous enum

anonymous enum
Enumerator
PMIF_SPI 
PMIF_SPMI 

Definition at line 38 of file pmif_common.h.

◆ anonymous enum

anonymous enum
Enumerator
E_IO 
E_BUSY 
E_NODEV 
E_INVAL 
E_OPNOTSUPP 
E_TIMEOUT 
E_READ_TEST_FAIL 
E_SPI_INIT_RESET_SPI 
E_SPI_INIT_SIDLY 

Definition at line 43 of file pmif_common.h.

◆ pmic_interface

Enumerator
PMIF_VLD_RDY 
PMIF_SLP_REQ 

Definition at line 55 of file pmif_common.h.

Function Documentation

◆ get_pmif_controller()

struct pmif* get_pmif_controller ( int  inf,
int  mstid 
)

Definition at line 168 of file pmif.c.

References ARRAY_SIZE, die(), pmif::mstid, NULL, PMIF_SPI, pmif_spi_arb, PMIF_SPMI, and pmif_spmi_arb.

Referenced by buf_read(), buf_write(), init_pmif_arb(), mtk_pmif_init(), pmic_read(), pmif_spmi_enable(), pmif_spmi_enable_cmdIssue(), pmif_spmi_enable_swinf(), pmif_spmi_force_normal_mode(), rtc_read(), and rtc_write().

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

◆ mtk_pmif_init()

int mtk_pmif_init ( void  )

Definition at line 293 of file pmif.c.

References get_pmif_controller(), pmif_clk_init(), PMIF_SPI, pmif_spi_init(), PMIF_SPMI, pmif_spmi_init(), and SPMI_MASTER_0.

Referenced by platform_romstage_main().

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

◆ pmwrap_interface_init()

void pmwrap_interface_init ( void  )

Definition at line 282 of file pmif.c.

References BIOS_INFO, CONFIG, pmif_select(), PMIF_SLP_REQ, PMIF_VLD_RDY, and printk.

Here is the call graph for this function: