void __iomem *remote_res_regs;
u32 remote_id;
u32 local_id;
+ bool el3_supported;
};
static int zynqmp_ipi_fw_call(struct zynqmp_ipi *ipi_mbox,
return ret;
}
+ /* Return if EL3 is not supported */
+ if (!zynqmp->el3_supported) {
+ dev_err(chan->dev, "mailbox in EL3 only supported for zynqmp");
+ return -EOPNOTSUPP;
+ }
+
/* Write trigger interrupt */
writel(IPI_BIT_MASK_PMU0, &ipi_int_apu->trig);
debug("%s(dev=%p)\n", __func__, dev);
+ if (IS_ENABLED(CONFIG_SPL_BUILD) || of_machine_is_compatible("xlnx,zynqmp"))
+ zynqmp->el3_supported = true;
+
/* Get subnode where the regs are defined */
/* Note IPI mailbox node needs to be the first one in DT */
node = ofnode_first_subnode(dev_ofnode(dev));