coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
dpm_4ch.c File Reference
#include <console/console.h>
#include <delay.h>
#include <device/mmio.h>
#include <soc/dpm.h>
#include <soc/dramc_soc.h>
#include <soc/spm.h>
#include <soc/symbols.h>
Include dependency graph for dpm_4ch.c:

Go to the source code of this file.

Functions

static int wake_dpm_sram_up (void)
 
static void dpm_mtcoms_sleep_on (void)
 
int dpm_4ch_init (void)
 
int dpm_4ch_para_setting (void)
 

Variables

static struct dpm_regs *const mtk_dpm2 = (void *)DPM_CFG_BASE2
 
static struct mtk_mcu dpm_mcu_4ch []
 

Function Documentation

◆ dpm_4ch_init()

int dpm_4ch_init ( void  )

Definition at line 67 of file dpm_4ch.c.

References dpm_mtcoms_sleep_on(), and wake_dpm_sram_up().

Referenced by dpm_init().

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

◆ dpm_4ch_para_setting()

int dpm_4ch_para_setting ( void  )

Definition at line 75 of file dpm_4ch.c.

References ARRAY_SIZE, mtk_mcu::buffer_size, dpm_mcu_4ch, mtk_mcu::load_buffer, mtk_init_mcu(), and REGION_SIZE.

Referenced by dpm_init().

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

◆ dpm_mtcoms_sleep_on()

static void dpm_mtcoms_sleep_on ( void  )
static

Definition at line 41 of file dpm_4ch.c.

Referenced by dpm_4ch_init().

Here is the caller graph for this function:

◆ wake_dpm_sram_up()

static int wake_dpm_sram_up ( void  )
static

Definition at line 13 of file dpm_4ch.c.

References BIOS_ERR, mtk_spm_regs::dramc_mcu2_sram_con, DRAMC_MCU2_SRAM_ISOINT_B_LSB, DRAMC_MCU2_SRAM_SLEEP_B_LSB, mtk_spm_regs::dramc_mcu_sram_con, DRAMC_MCU_SRAM_ISOINT_B_LSB, DRAMC_MCU_SRAM_SLEEP_B_LSB, mdelay(), mtk_spm, printk, read32(), and setbits32.

Referenced by dpm_4ch_init().

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

Variable Documentation

◆ dpm_mcu_4ch

struct mtk_mcu dpm_mcu_4ch[]
static
Initial value:
= {
{
.firmware_name = CONFIG_DPM_DM_FIRMWARE,
.run_address = (void *)DPM_DM_SRAM_BASE2,
},
{
.firmware_name = CONFIG_DPM_PM_FIRMWARE,
.run_address = (void *)DPM_PM_SRAM_BASE2,
.priv = mtk_dpm2,
},
}
void dpm_reset(struct mtk_mcu *mcu)
Definition: dpm.c:21
static struct dpm_regs *const mtk_dpm2
Definition: dpm_4ch.c:11
@ DPM_PM_SRAM_BASE2
Definition: addressmap.h:56
@ DPM_DM_SRAM_BASE2
Definition: addressmap.h:57
static void __noreturn reset(void)

Definition at line 41 of file dpm_4ch.c.

Referenced by dpm_4ch_para_setting().

◆ mtk_dpm2

struct dpm_regs* const mtk_dpm2 = (void *)DPM_CFG_BASE2
static

Definition at line 11 of file dpm_4ch.c.