imx8mq:plat: add noc priority configuration entry

Add NOC configuration entry for all the module.
Kernel can configure the noc priority through this entry.

Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
(cherry picked from commit c9638440c0899fcd0ab714520f1b4b5e4ee2fbb1)
diff --git a/plat/imx/common/include/imx_sip.h b/plat/imx/common/include/imx_sip.h
index 71b4a15..8fb65f1 100644
--- a/plat/imx/common/include/imx_sip.h
+++ b/plat/imx/common/include/imx_sip.h
@@ -49,6 +49,13 @@
 
 #define FSL_SIP_NOC			0xc2000008
 #define FSL_SIP_NOC_LCDIF		0x0
+#define FSL_SIP_NOC_PRIORITY		0x1
+#define NOC_GPU_PRIORITY		0x10
+#define NOC_DCSS_PRIORITY		0x11
+#define NOC_VPU_PRIORITY		0x12
+#define NOC_CPU_PRIORITY		0x13
+#define NOC_MIX_PRIORITY		0x14
+
 
 #define IMX_SIP_WAKEUP_SRC		0xc2000009
 #define IMX_SIP_WAKEUP_SRC_SCU		0x1
diff --git a/plat/imx/imx8mq/src.c b/plat/imx/imx8mq/src.c
index 85d9966..0d215de 100644
--- a/plat/imx/imx8mq/src.c
+++ b/plat/imx/imx8mq/src.c
@@ -70,8 +70,7 @@
 int imx_noc_handler(uint32_t smc_fid, u_register_t x1, u_register_t x2,
 		    u_register_t x3)
 {
-	switch(x1) {
-	case FSL_SIP_NOC_LCDIF:
+	if (FSL_SIP_NOC_LCDIF == x1) {
 		/* config NOC for VPU */
 		mmio_write_32(IMX_NOC_BASE + 0x108, 0x34);
 		mmio_write_32(IMX_NOC_BASE + 0x10c, 0x1);
@@ -82,10 +81,29 @@
 		mmio_write_32(IMX_NOC_BASE + 0x18c, 0x1);
 		mmio_write_32(IMX_NOC_BASE + 0x190, 0x500);
 		mmio_write_32(IMX_NOC_BASE + 0x194, 0x30);
-		break;
-	default:
+	} else if (FSL_SIP_NOC_PRIORITY == x1) {
+		switch(x2) {
+		case NOC_GPU_PRIORITY:
+			mmio_write_32(IMX_NOC_BASE + 0x008, x3);
+			break;
+		case NOC_DCSS_PRIORITY:
+			mmio_write_32(IMX_NOC_BASE + 0x088, x3);
+			break;
+		case NOC_VPU_PRIORITY:
+			mmio_write_32(IMX_NOC_BASE + 0x108, x3);
+			break;
+		case NOC_CPU_PRIORITY:
+			mmio_write_32(IMX_NOC_BASE + 0x188, x3);
+			break;
+		case NOC_MIX_PRIORITY:
+			mmio_write_32(IMX_NOC_BASE + 0x288, x3);
+			break;
+		default:
+			return SMC_UNK;
+		};
+	} else {
 		return SMC_UNK;
-	};
+	}
 
 	return 0;
 }