1 // SPDX-License-Identifier: GPL-2.0
3 * Xilinx Zynq MPSoC Firmware driver
5 * Copyright (C) 2018-2019 Xilinx, Inc.
11 #if defined(CONFIG_ZYNQMP_IPI)
13 #include <asm/arch/sys_proto.h>
16 struct mbox_chan tx_chan;
17 struct mbox_chan rx_chan;
20 static int zynqmp_power_probe(struct udevice *dev)
24 debug("%s, (dev=%p)\n", __func__, dev);
26 ret = mbox_get_by_name(dev, "tx", &zynqmp_power.tx_chan);
28 debug("%s, cannot tx mailbox\n", __func__);
32 ret = mbox_get_by_name(dev, "rx", &zynqmp_power.rx_chan);
34 debug("%s, cannot rx mailbox\n", __func__);
39 static const struct udevice_id zynqmp_power_ids[] = {
40 { .compatible = "xlnx,zynqmp-power" },
44 U_BOOT_DRIVER(zynqmp_power) = {
45 .name = "zynqmp_power",
46 .id = UCLASS_FIRMWARE,
47 .of_match = zynqmp_power_ids,
48 .probe = zynqmp_power_probe,
52 static const struct udevice_id zynqmp_firmware_ids[] = {
53 { .compatible = "xlnx,zynqmp-firmware" },
54 { .compatible = "xlnx,versal-firmware"},
58 U_BOOT_DRIVER(zynqmp_firmware) = {
59 .id = UCLASS_FIRMWARE,
60 .name = "zynqmp-firmware",
61 .probe = dm_scan_fdt_dev,
62 .of_match = zynqmp_firmware_ids,