MLK-18393 imx8: Check the eDMA channels and update DTB
authorYe Li <ye.li@nxp.com>
Fri, 18 May 2018 02:49:03 +0000 (19:49 -0700)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 11:28:14 +0000 (04:28 -0700)
commitec6a694c1430f023401286862902bd14ca9acf87
treeb7145ee94ede7f69fb87ea69191882bfc1e922cb
parentac653837834c3647097eb6ba8a2ed3f8244aa322
MLK-18393 imx8: Check the eDMA channels and update DTB

Since M4 will arrange some eDMA channels to its partition, the A core
can't use them. We have to remove these eDMA channels from DTB dynamically.

Different like other resources, disabling the eDMA channels require to modify
the edma nodes by removing relevant registers, interrupts configurations, and
adjust dma channels number.

This patch searches the edma nodes from kernel DTB, checks the channels by
binding their registers base address with their resource IDs. Then update
the reg, interrupts, interrupt-names and dma-channels properties.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by : Robin Gong <yibin.gong@nxp.com>

(cherry picked from commit 37efd38e5306680047ab9545f271716fea15fa95)
arch/arm/mach-imx/imx8/cpu.c