From 823a57e11cd98ee6043e9637ff3a4cf58feb60ff Mon Sep 17 00:00:00 2001 From: Karl Li Date: Tue, 3 Dec 2024 17:09:21 +0800 Subject: [PATCH] feat(mt8196): enable APU spmi operation Enable APU spmi operation after spmi module ready Change-Id: I4bb1a50a635e8798b049295dbbf98967daff5997 Signed-off-by: Karl Li --- plat/mediatek/drivers/apusys/mt8196/apusys_power.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/plat/mediatek/drivers/apusys/mt8196/apusys_power.c b/plat/mediatek/drivers/apusys/mt8196/apusys_power.c index 4262d6324..dcf642309 100644 --- a/plat/mediatek/drivers/apusys/mt8196/apusys_power.c +++ b/plat/mediatek/drivers/apusys/mt8196/apusys_power.c @@ -1,16 +1,12 @@ /* - * Copyright (c) 2024, MediaTek Inc. All rights reserved. + * Copyright (c) 2024-2025, MediaTek Inc. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include -#define SPMI_ENABLE (0) - -#if SPMI_ENABLE #include -#endif #include #include @@ -259,16 +255,13 @@ static int apu_pcu_init(void) uint32_t en_set_offset = BUCK_VAPU_PMIC_REG_EN_SET_ADDR; uint32_t en_clr_offset = BUCK_VAPU_PMIC_REG_EN_CLR_ADDR; uint32_t en_shift = BUCK_VAPU_PMIC_REG_EN_SHIFT; -#if SPMI_ENABLE struct spmi_device *vsram_sdev; -#endif unsigned char vsram = 0; mmio_write_32(APUSYS_PCU + APU_PCUTOP_CTRL_SET, AUTO_BUCK_EN); mmio_write_32((APUSYS_PCU + APU_PCU_BUCK_STEP_SEL), BUCK_STEP_SEL_VAL); -#if SPMI_ENABLE vsram_sdev = get_spmi_device(SPMI_MASTER_1, SPMI_SLAVE_4); if (!vsram_sdev) { ERROR("[APUPW] VSRAM BUCK4 get device fail\n"); @@ -279,7 +272,6 @@ static int apu_pcu_init(void) ERROR("[APUPW] VSRAM BUCK4 read fail\n"); return -1; } -#endif mmio_write_32(APUSYS_PCU + APU_PCU_BUCK_ON_DAT0_L, (BUCK_VAPU_PMIC_REG_VOSEL_ADDR << PMIC_OFF_ADDR_OFF) | vsram);