This patch causes imx8-pd nodes marked with status = "disabled" to be
ignored. This is very common in devicetree handling.
When running with xen the hypervisor will convert all xen,passthrough
properties to status = "disabled" before passing dtb to dom0. This patch
allows power domains to be marked this way and have them be ignored by
the host automatically.
The alternative is to remove the power domain nodes and references using
/delete-node/ and /delete-property/ and that gets messy.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
struct imx8_pm_domain *imx8_pd;
sc_rsrc_t rsrc_id;
+ if (!of_device_is_available(np))
+ continue;
+
imx8_pd = kzalloc(sizeof(*imx8_pd), GFP_KERNEL);
if (!imx8_pd)
return -ENOMEM;
for_each_compatible_node(np, NULL, "nxp,imx8-pd") {
struct imx8_pm_domain *imx8_pd;
+ if (!of_device_is_available(np))
+ continue;
+
imx8_pd = kzalloc(sizeof(struct imx8_pm_domain), GFP_KERNEL);
if (!imx8_pd) {
pr_err("%s: failed to allocate memory for domain\n",