diff options
author | Jacky Bai <ping.bai@nxp.com> | 2020-01-19 13:35:13 +0800 |
---|---|---|
committer | Jacky Bai <ping.bai@nxp.com> | 2020-02-09 20:58:49 +0800 |
commit | b13615aab1a2ccccf10edab071086ca16da70d87 (patch) | |
tree | dac35f8f363e058e4c4eb955750a5b3f6fef372c /plat/imx/imx8m | |
parent | 55194d21a18003224451b75c73838ef3a410c7cb (diff) |
plat: imx8mq: Add the NOC sip handler on imx8mq
Add the NOC QoS setting SiP handler on imx8mq.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Diffstat (limited to 'plat/imx/imx8m')
-rw-r--r-- | plat/imx/imx8m/imx8mq/imx8mq_misc.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/plat/imx/imx8m/imx8mq/imx8mq_misc.c b/plat/imx/imx8m/imx8mq/imx8mq_misc.c index 17213660..9ee3b2ad 100644 --- a/plat/imx/imx8m/imx8mq/imx8mq_misc.c +++ b/plat/imx/imx8m/imx8mq/imx8mq_misc.c @@ -31,3 +31,44 @@ int imx_src_handler(uint32_t smc_fid, u_register_t x1, u_register_t x2, return 0; } + +int imx_noc_handler(uint32_t smc_fid, u_register_t x1, u_register_t x2, + u_register_t x3) +{ + if (IMX_SIP_NOC_LCDIF == x1) { + /* config NOC for VPU */ + mmio_write_32(IMX_NOC_BASE + 0x108, 0x34); + mmio_write_32(IMX_NOC_BASE + 0x10c, 0x1); + mmio_write_32(IMX_NOC_BASE + 0x110, 0x500); + mmio_write_32(IMX_NOC_BASE + 0x114, 0x30); + /* config NOC for CPU */ + mmio_write_32(IMX_NOC_BASE + 0x188, 0x34); + mmio_write_32(IMX_NOC_BASE + 0x18c, 0x1); + mmio_write_32(IMX_NOC_BASE + 0x190, 0x500); + mmio_write_32(IMX_NOC_BASE + 0x194, 0x30); + } else if (IMX_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; +} |