]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
firmware: Add Xilinx ZynqMP firmware driver
authorRajan Vaja <rajan.vaja@xilinx.com>
Fri, 15 Feb 2019 12:45:32 +0000 (04:45 -0800)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 27 Feb 2019 07:53:09 +0000 (08:53 +0100)
Add simple ZynqMP firmware drive to populate
child nodes under zynqmp_firmware DT node.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/clk/Kconfig
drivers/firmware/Kconfig
drivers/firmware/Makefile
drivers/firmware/firmware-zynqmp.c [new file with mode: 0644]

index eadf7f8250bb8b76001213ae89f828543d4320ef..ae49f2581cdc8cd18586f8555fd4accdb9ad04b7 100644 (file)
@@ -86,6 +86,7 @@ config CLK_ZYNQ
 config CLK_ZYNQMP
        bool "Enable clock driver support for ZynqMP"
        depends on ARCH_ZYNQMP
+       select ZYNQMP_FIRMWARE
        help
          This clock driver adds support for clock realted settings for
          ZynqMP platform.
index 7d8f161b267a650dc8705b98f4f577a8969db5b1..4c7c5bea5f1021ac36e936e5eac25a7925019487 100644 (file)
@@ -21,3 +21,13 @@ config TI_SCI_PROTOCOL
 
          This protocol library is used by client drivers to use the features
          provided by the system controller.
+
+config ZYNQMP_FIRMWARE
+       bool "ZynqMP Firmware interface"
+       select FIRMWARE
+       help
+         Firmware interface driver is used by different
+         drivers to communicate with the firmware for
+         various platform management services.
+         Say yes to enable ZynqMP firmware interface driver.
+         If in doubt, say N.
index 6c3e1296852743e1a66831a58e7733d7447e1214..a0c250a473eb7f1cff44322a9bfc520bf2083445 100644 (file)
@@ -2,3 +2,4 @@ obj-$(CONFIG_FIRMWARE)          += firmware-uclass.o
 obj-$(CONFIG_$(SPL_)ARM_PSCI_FW)       += psci.o
 obj-$(CONFIG_TI_SCI_PROTOCOL)  += ti_sci.o
 obj-$(CONFIG_SANDBOX)          += firmware-sandbox.o
+obj-$(CONFIG_ZYNQMP_FIRMWARE)  += firmware-zynqmp.o
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
new file mode 100644 (file)
index 0000000..b36eda1
--- /dev/null
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <dm.h>
+
+static const struct udevice_id zynqmp_firmware_ids[] = {
+       { .compatible = "xlnx,zynqmp-firmware" },
+       { }
+};
+
+U_BOOT_DRIVER(zynqmp_firmware) = {
+       .id = UCLASS_FIRMWARE,
+       .name = "zynqmp-firmware",
+       .probe = dm_scan_fdt_dev,
+       .of_match = zynqmp_firmware_ids,
+};