soc/mediatek/mt8196: Fix issue with incomplete modem disable
If the modem is not completely disabled, it will cause issues with suspend to RAM. Update the condition check in MD1_PWR_STA and increased the MAX_RETRY_COUNT from 200 to 4000 to make sure that the modem has sufficient time to completely disable before proceeding. TEST=Measure the power and ensure that the DRAM enters self-refresh mode. BUG=b:377628718 Change-Id: I6e915d26e5b3caee36f4726bc2fc1c53cfc17bfc Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86069 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yidi Lin <yidilin@google.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
parent
fb2655d06a
commit
905684a945
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@
|
|||
#include <soc/spmi.h>
|
||||
|
||||
#define SPMI_SLAVE_4_750MV 0x78
|
||||
#define MAX_RETRY_COUNT 200
|
||||
#define MAX_RETRY_COUNT 4000
|
||||
#define VSRAM_VOSEL 0x24d
|
||||
#define VMODEM_VOSEL 0x24e
|
||||
#define MD1_PWR_STA_MASK BIT(0)
|
||||
|
|
@ -74,7 +74,7 @@ static void spm_mtcmos_ctrl_md1_disable(void)
|
|||
|
||||
clrbits32(&mtk_spm->md1_pwr_con, PWR_ON);
|
||||
if (!retry(MAX_RETRY_COUNT,
|
||||
read32(&mtk_spm->pwr_status) & MD1_PWR_STA_MASK)) {
|
||||
(read32(&mtk_spm->pwr_status) & MD1_PWR_STA_MASK) == 0)) {
|
||||
printk(BIOS_ERR, "Check MD1_PWR_STA failed\n");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue