diff options
author | Jimmy Huang <jimmy.huang@mediatek.com> | 2015-11-16 14:38:40 +0800 |
---|---|---|
committer | Yidi Lin <yidi.lin@mediatek.com> | 2016-01-26 13:55:13 +0800 |
commit | 1a1ff8b96282dd86705b3f697b1445916048a8e7 (patch) | |
tree | 6ca17ce2779e3d1793ea51799e06148db693716f /plat/mediatek/common | |
parent | 8e53ec53b6381fef325539cb13d6164dbc6c308e (diff) |
mt8173: Implement subsystem power control logic in ARM TF
1. Add SiP calls for subsystem power on/off and check support
2. Add subsystem power control related initialization in
bl31_plat_setup.c
3. Add subsystem power on/off and power ack waiting functions
4. Update PCM code for subsystem physical power control logic
Change-Id: Ia0ebb1964c8f9758159bcf17c1813d76ef52cf64
Signed-off-by: yt.lee <yt.lee@mediatek.com>
Diffstat (limited to 'plat/mediatek/common')
-rw-r--r-- | plat/mediatek/common/mtk_sip_svc.c | 12 | ||||
-rw-r--r-- | plat/mediatek/common/mtk_sip_svc.h | 9 |
2 files changed, 19 insertions, 2 deletions
diff --git a/plat/mediatek/common/mtk_sip_svc.c b/plat/mediatek/common/mtk_sip_svc.c index af280807..cb10af5b 100644 --- a/plat/mediatek/common/mtk_sip_svc.c +++ b/plat/mediatek/common/mtk_sip_svc.c @@ -55,6 +55,18 @@ static uint64_t mediatek_sip_handler(uint32_t smc_fid, ret = mt_sip_set_authorized_sreg((uint32_t)x1, (uint32_t)x2); SMC_RET1(handle, ret); + case MTK_SIP_PWR_ON_MTCMOS: + ret = mt_sip_pwr_on_mtcmos((uint32_t)x1); + SMC_RET1(handle, ret); + + case MTK_SIP_PWR_OFF_MTCMOS: + ret = mt_sip_pwr_off_mtcmos((uint32_t)x1); + SMC_RET1(handle, ret); + + case MTK_SIP_PWR_MTCMOS_SUPPORT: + ret = mt_sip_pwr_mtcmos_support(); + SMC_RET1(handle, ret); + default: ERROR("%s: unhandled SMC (0x%x)\n", __func__, smc_fid); break; diff --git a/plat/mediatek/common/mtk_sip_svc.h b/plat/mediatek/common/mtk_sip_svc.h index eb1c2e60..94a60363 100644 --- a/plat/mediatek/common/mtk_sip_svc.h +++ b/plat/mediatek/common/mtk_sip_svc.h @@ -43,10 +43,13 @@ #define MTK_SIP_SVC_VERSION_MINOR 0x1 /* Number of Mediatek SiP Calls implemented */ -#define MTK_SIP_NUM_CALLS 1 +#define MTK_SIP_NUM_CALLS 4 /* Mediatek SiP Service Calls function IDs */ #define MTK_SIP_SET_AUTHORIZED_SECURE_REG 0x82000001 +#define MTK_SIP_PWR_ON_MTCMOS 0x82000402 +#define MTK_SIP_PWR_OFF_MTCMOS 0x82000403 +#define MTK_SIP_PWR_MTCMOS_SUPPORT 0x82000404 /* Mediatek SiP Calls error code */ enum { @@ -62,5 +65,7 @@ enum { * Return MTK_SIP_E_SUCCESS on success, and MTK_SIP_E_INVALID_PARAM on failure. */ uint64_t mt_sip_set_authorized_sreg(uint32_t sreg, uint32_t val); - +uint64_t mt_sip_pwr_on_mtcmos(uint32_t val); +uint64_t mt_sip_pwr_off_mtcmos(uint32_t val); +uint64_t mt_sip_pwr_mtcmos_support(void); #endif /* __PLAT_SIP_SVC_H__ */ |