#include <device/mmio.h>
#include <soc/addressmap.h>
#include <soc/mtcmos.h>
#include <types.h>
Go to the source code of this file.
|
| check_member (mtk_spm_regs, pwr_status, 0x016c) |
|
| check_member (mtk_spm_regs, audio_pwr_con, 0x0358) |
|
| check_member (mtk_spm_regs, adsp_pwr_con, 0x0360) |
|
| check_member (mtk_spm_regs, ap_mdsrc_req, 0x043c) |
|
| check_member (mtk_spm_regs, ulposc_con, 0x644) |
|
int | spm_init (void) |
|
◆ ARMPLL_CLK_SEL_DEF
#define ARMPLL_CLK_SEL_DEF 0x3ff |
Definition at line 73 of file spm.h.
◆ BCLK_CG_EN_LSB
#define BCLK_CG_EN_LSB (1U << 0) |
Definition at line 16 of file spm.h.
◆ ISRC_ALL
Definition at line 95 of file spm.h.
◆ ISRC_ALL_EXC_TWAM
Definition at line 94 of file spm.h.
◆ ISRC_TWAM
Definition at line 93 of file spm.h.
◆ ISRM_ALL
Definition at line 88 of file spm.h.
◆ ISRM_ALL_EXC_TWAM
Definition at line 87 of file spm.h.
◆ ISRM_RET_IRQ_AUX
#define ISRM_RET_IRQ_AUX (0x3ff << 8) |
Definition at line 86 of file spm.h.
◆ ISRM_TWAM
#define ISRM_TWAM (1U << 2) |
Definition at line 85 of file spm.h.
◆ ISRS_PCM_RETURN
#define ISRS_PCM_RETURN (1U << 3) |
Definition at line 92 of file spm.h.
◆ ISRS_TWAM
#define ISRS_TWAM (1U << 2) |
Definition at line 91 of file spm.h.
◆ MD32PCM_CFGREG_SW_RSTN_RUN
#define MD32PCM_CFGREG_SW_RSTN_RUN 0x1 |
Definition at line 66 of file spm.h.
◆ MD32PCM_DMA0_CON_VAL
#define MD32PCM_DMA0_CON_VAL 0x0003820e |
Definition at line 64 of file spm.h.
◆ MD32PCM_DMA0_START_VAL
#define MD32PCM_DMA0_START_VAL 0x00008000 |
Definition at line 65 of file spm.h.
◆ PCM_CK_EN_LSB
#define PCM_CK_EN_LSB (1U << 2) |
Definition at line 22 of file spm.h.
◆ PCM_PWRIO_EN_R0
#define PCM_PWRIO_EN_R0 (1U << 0) |
Definition at line 98 of file spm.h.
◆ PCM_PWRIO_EN_R7
#define PCM_PWRIO_EN_R7 (1U << 7) |
Definition at line 99 of file spm.h.
◆ PCM_RF_SYNC_R0
#define PCM_RF_SYNC_R0 (1U << 16) |
◆ PCM_RF_SYNC_R6
#define PCM_RF_SYNC_R6 (1U << 22) |
◆ PCM_RF_SYNC_R7
#define PCM_RF_SYNC_R7 (1U << 23) |
◆ PCM_SW_INT_ALL
#define PCM_SW_INT_ALL 0x3ff |
◆ PCM_SW_RESET_LSB
#define PCM_SW_RESET_LSB (1U << 15) |
Definition at line 23 of file spm.h.
◆ PCM_TIMER_MAX
Definition at line 77 of file spm.h.
◆ PCM_WDT_TIMEOUT
#define PCM_WDT_TIMEOUT (30 * 32768) |
Definition at line 76 of file spm.h.
◆ POWER_ON_VAL1_DEF
#define POWER_ON_VAL1_DEF 0x80015860 |
Definition at line 60 of file spm.h.
◆ REG_ALL_DDR_EN_DBC_EN_LSB
#define REG_ALL_DDR_EN_DBC_EN_LSB (1U << 0) |
Definition at line 40 of file spm.h.
◆ REG_EVENT_LOCK_EN_LSB
#define REG_EVENT_LOCK_EN_LSB (1U << 12) |
Definition at line 32 of file spm.h.
◆ REG_MD32_APB_INTERNAL_EN_LSB
#define REG_MD32_APB_INTERNAL_EN_LSB (1U << 14) |
Definition at line 33 of file spm.h.
◆ REG_SPM_SRAM_ISOINT_B_LSB
#define REG_SPM_SRAM_ISOINT_B_LSB (1U << 11) |
Definition at line 31 of file spm.h.
◆ RG_AHBMIF_APBEN_LSB
#define RG_AHBMIF_APBEN_LSB (1U << 3) |
Definition at line 27 of file spm.h.
◆ RG_IM_SLAVE_LSB
#define RG_IM_SLAVE_LSB (1U << 0) |
Definition at line 26 of file spm.h.
◆ RG_PCM_TIMER_EN_LSB
#define RG_PCM_TIMER_EN_LSB (1U << 5) |
Definition at line 28 of file spm.h.
◆ RG_PCM_WDT_WAKE_LSB
#define RG_PCM_WDT_WAKE_LSB (1U << 9) |
Definition at line 30 of file spm.h.
◆ SPM_BUS_PROTECT2_MASK_B_DEF
#define SPM_BUS_PROTECT2_MASK_B_DEF 0xffffffff |
Definition at line 63 of file spm.h.
◆ SPM_BUS_PROTECT_MASK_B_DEF
#define SPM_BUS_PROTECT_MASK_B_DEF 0xffffffff |
Definition at line 62 of file spm.h.
◆ SPM_DVFS_LEVEL_DEF
#define SPM_DVFS_LEVEL_DEF 0x00000001 |
Definition at line 67 of file spm.h.
◆ SPM_DVS_DFS_LEVEL_DEF
#define SPM_DVS_DFS_LEVEL_DEF 0x00010001 |
Definition at line 68 of file spm.h.
◆ SPM_EVENT_COUNTER_CLR_LSB
#define SPM_EVENT_COUNTER_CLR_LSB (1U << 6) |
Definition at line 29 of file spm.h.
◆ SPM_FLAG_DISABLE_VCORE_DFS
#define SPM_FLAG_DISABLE_VCORE_DFS (1U << 4) |
Definition at line 48 of file spm.h.
◆ SPM_FLAG_DISABLE_VCORE_DVS
#define SPM_FLAG_DISABLE_VCORE_DVS (1U << 3) |
Definition at line 47 of file spm.h.
◆ SPM_FLAG_RUN_COMMON_SCENARIO
#define SPM_FLAG_RUN_COMMON_SCENARIO (1U << 10) |
Definition at line 49 of file spm.h.
◆ SPM_INIT_DONE_US
#define SPM_INIT_DONE_US 20 |
Definition at line 75 of file spm.h.
◆ SPM_PROJECT_CODE
#define SPM_PROJECT_CODE 0xb16 |
Definition at line 12 of file spm.h.
◆ SPM_REGWR_CFG_KEY
Definition at line 13 of file spm.h.
◆ SPM_RESOURCE_ACK_CON0_DEF
#define SPM_RESOURCE_ACK_CON0_DEF 0xffffffff |
Definition at line 69 of file spm.h.
◆ SPM_RESOURCE_ACK_CON1_DEF
#define SPM_RESOURCE_ACK_CON1_DEF 0xffffffff |
Definition at line 70 of file spm.h.
◆ SPM_RESOURCE_ACK_CON2_DEF
#define SPM_RESOURCE_ACK_CON2_DEF 0xffffffff |
Definition at line 71 of file spm.h.
◆ SPM_RESOURCE_ACK_CON3_DEF
#define SPM_RESOURCE_ACK_CON3_DEF 0xffffffff |
Definition at line 72 of file spm.h.
◆ SPM_SYSCLK_SETTLE
#define SPM_SYSCLK_SETTLE 0x60fe |
Definition at line 74 of file spm.h.
◆ SPM_WAKEUP_EVENT_MASK_BIT0
#define SPM_WAKEUP_EVENT_MASK_BIT0 (1U << 0) |
Definition at line 36 of file spm.h.
◆ SPM_WAKEUP_EVENT_MASK_CSYSPWREQ_B
#define SPM_WAKEUP_EVENT_MASK_CSYSPWREQ_B (1U << 11) |
Definition at line 37 of file spm.h.
◆ SPM_WAKEUP_EVENT_MASK_DEF
#define SPM_WAKEUP_EVENT_MASK_DEF 0xffffffff |
Definition at line 61 of file spm.h.
◆ anonymous enum
Enumerator |
---|
DISP_PWR_STA_MASK | |
DISP_SRAM_PDN_MASK | |
DISP_SRAM_ACK_MASK | |
AUDIO_PWR_STA_MASK | |
AUDIO_SRAM_PDN_MASK | |
AUDIO_SRAM_ACK_MASK | |
Definition at line 404 of file spm.h.
◆ check_member() [1/5]
◆ check_member() [2/5]
◆ check_member() [3/5]
◆ check_member() [4/5]
◆ check_member() [5/5]
◆ spm_init()
Definition at line 298 of file spm.c.
References BIOS_ERR, BIOS_INFO, mtk_mcu::buffer_size, mtk_mcu::load_buffer, mtk_spm_regs::md32pcm_pc, mtk_init_mcu(), mtk_spm, printk, mtk_mcu::priv, read32(), REGION_SIZE, spm, spm_extern_initialize(), spm_init_ctrl, spm_register_init(), spm_set_power_control(), spm_set_sysclk_settle(), stopwatch_duration_msecs(), and stopwatch_init().
◆ audio
Initial value:= {
{
.pwr_sta_mask = 0x1 << 10,
.sram_pdn_mask = 0x1 << 8,
.sram_ack_mask = 0x1 << 12,
},
{
.pwr_sta_mask = 0x1 << 8,
.sram_pdn_mask = 0x1 << 8,
.sram_ack_mask = 0x1 << 12,
},
}
static struct mtk_spm_regs *const mtk_spm
Definition at line 967 of file spm.h.
◆ disp
◆ mtk_spm