diff options
Diffstat (limited to 'src/soc/mediatek/common/mtcmos.c')
-rw-r--r-- | src/soc/mediatek/common/mtcmos.c | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/src/soc/mediatek/common/mtcmos.c b/src/soc/mediatek/common/mtcmos.c index cfd148c7fa..17a464fe5a 100644 --- a/src/soc/mediatek/common/mtcmos.c +++ b/src/soc/mediatek/common/mtcmos.c @@ -1,16 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include <delay.h> #include <device/mmio.h> -#include <soc/mtcmos.h> #include <soc/spm.h> -struct power_domain_data { - void *pwr_con; - u32 pwr_sta_mask; - u32 sram_pdn_mask; - u32 sram_ack_mask; -}; - enum { SRAM_ISOINT_B = 1U << 6, SRAM_CKISO = 1U << 5, @@ -44,24 +37,16 @@ static void mtcmos_power_on(const struct power_domain_data *pd) void mtcmos_display_power_on(void) { - static const struct power_domain_data disp = { - .pwr_con = &mtk_spm->dis_pwr_con, - .pwr_sta_mask = DISP_PWR_STA_MASK, - .sram_pdn_mask = DISP_SRAM_PDN_MASK, - .sram_ack_mask = DISP_SRAM_ACK_MASK, - }; + int i; - mtcmos_power_on(&disp); + for (i = 0; i < ARRAY_SIZE(disp); i++) + mtcmos_power_on(&disp[i]); } void mtcmos_audio_power_on(void) { - static const struct power_domain_data audio = { - .pwr_con = &mtk_spm->audio_pwr_con, - .pwr_sta_mask = AUDIO_PWR_STA_MASK, - .sram_pdn_mask = AUDIO_SRAM_PDN_MASK, - .sram_ack_mask = AUDIO_SRAM_ACK_MASK, - }; + int i; - mtcmos_power_on(&audio); + for (i = 0; i < ARRAY_SIZE(audio); i++) + mtcmos_power_on(&audio[i]); } |