From 3511e46772a04136bbec67267360304c701edc6a Mon Sep 17 00:00:00 2001 From: Jacky Bai Date: Fri, 3 Apr 2020 17:25:54 +0800 Subject: MLK-23743 plat: imx8mp: Correct the IMRs number The number of IMRs for each core is 5, so correct it and replace with a macro. Signed-off-by: Jacky Bai --- plat/imx/imx8m/imx8mp/gpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plat/imx/imx8m/imx8mp/gpc.c b/plat/imx/imx8m/imx8mp/gpc.c index c1f489a6..08a1a82b 100644 --- a/plat/imx/imx8m/imx8mp/gpc.c +++ b/plat/imx/imx8m/imx8mp/gpc.c @@ -29,7 +29,7 @@ #define FSL_SIP_CONFIG_GPC_SET_AFF 0x04 #define FSL_SIP_CONFIG_GPC_CORE_WAKE 0x05 - +#define IMR_NUM U(5) #define CCGR(x) (0x4000 + (x) * 16) struct imx_noc_setting { @@ -535,7 +535,7 @@ void imx_gpc_init(void) int i; /* mask all the wakeup irq by default */ - for (i = 0; i < 4; i++) { + for (i = 0; i < IMR_NUM; i++) { mmio_write_32(IMX_GPC_BASE + IMR1_CORE0_A53 + i * 4, ~0x0); mmio_write_32(IMX_GPC_BASE + IMR1_CORE1_A53 + i * 4, ~0x0); mmio_write_32(IMX_GPC_BASE + IMR1_CORE2_A53 + i * 4, ~0x0); -- cgit v1.2.3