From 093888caaf54cbfe38d4b68406d98fbcf5c7d81f Mon Sep 17 00:00:00 2001 From: Jacky Bai Date: Mon, 13 Apr 2020 11:07:40 +0800 Subject: [PATCH] feat(imx8m): fix the ddr4 dvfs random hang on imx8m Remove the while loop waiting in step12 to align with what we did before, just use a 'if' condition check for debug purpose. Tested-by: Peng Fan Signed-off-by: Jacky Bai Change-Id: Id2685c5f628270a24944470d675a5c8706f39f13 --- plat/imx/imx8m/ddr/ddr4_dvfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plat/imx/imx8m/ddr/ddr4_dvfs.c b/plat/imx/imx8m/ddr/ddr4_dvfs.c index cdc7dc2dd..3ee68e4f2 100644 --- a/plat/imx/imx8m/ddr/ddr4_dvfs.c +++ b/plat/imx/imx8m/ddr/ddr4_dvfs.c @@ -1,5 +1,5 @@ /* - * Copyright 2018-2022 NXP + * Copyright 2018-2023 NXP * * SPDX-License-Identifier: BSD-3-Clause */ @@ -189,8 +189,8 @@ void ddr4_swffc(struct dram_info *info, unsigned int pstate) * 12. Wait until STAT.operating_mode[1:0]!=11 indicating that the * controller is not in self-refresh mode. */ - while ((mmio_read_32(DDRC_STAT(0)) & 0x3) == 0x3) { - ; + if ((mmio_read_32(DDRC_STAT(0)) & 0x3) == 0x3) { + VERBOSE("DRAM is in Self Refresh\n"); } /* -- 2.39.5