MLK-20794-1 imx8: Change kernel FDT updating for fused parts
authorYe Li <ye.li@nxp.com>
Thu, 24 Jan 2019 07:42:57 +0000 (23:42 -0800)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 11:28:14 +0000 (04:28 -0700)
commit8b83db421811d9d761c004d000eb0259902ad150
tree79833a2cb907dc16d1a938cc5a8436dce71de961
parentec6a694c1430f023401286862902bd14ca9acf87
MLK-20794-1 imx8: Change kernel FDT updating for fused parts

Before booting kernel, we check all nodes in kernel FDT whether they
are owned in our partition. If it is not owned, we will disable it in FDT.

For fused iMX8X 17x17 parts, like DC0 is disabled, SCFW only disable SC_R_DC_0,
other sub-modules in DC0 SS are still assign to our partition. Since DC0 is fused,
we actually can't access these sub-modules.

This patch changes the algorithm to check resources along the power domain tree to the
top node of that SS power domain. If any resource in the PD tree is not owned, we will
disable the peripheral node.
For example, the i2c0_mipi_lvds1 peripheral node, according to power domain tree,
we checks resources: SC_R_MIPI_1_I2C_0  -->  SC_R_MIPI_1  --> SC_R_DC_0. When SC_R_DC_0
is not owned, we will disable the i2c0_mipi_lvds1 peripheral node from FDT.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit da636e4b8eda4698be6e2e53767cc1a598aadb0b)
arch/arm/mach-imx/imx8/cpu.c