feat(imx8ulp): add some delay before cmc1 access

When resume from APD sleep mode, need to add a small delay
before accessing the CMC1 register.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Change-Id: Ic8acdf58a3bf82b1791e7ae7f173f8c94c56b49d
This commit is contained in:
Jacky Bai 2023-04-24 14:56:56 +08:00
parent 4fafccb9a8
commit c514d3cfa7

View file

@ -10,6 +10,7 @@
#include <arch_helpers.h>
#include <common/debug.h>
#include <drivers/arm/gicv3.h>
#include <drivers/delay_timer.h>
#include <lib/mmio.h>
#include <lib/psci/psci.h>
@ -404,6 +405,12 @@ void imx_domain_suspend_finish(const psci_power_state_t *target_state)
;
}
/*
* when resume from low power mode, need to delay for a while
* before access the CMC register.
*/
udelay(5);
/* clear cluster's LPM setting. */
mmio_write_32(IMX_CMC1_BASE + 0x20, 0x0);
mmio_write_32(IMX_CMC1_BASE + 0x10, 0x0);