]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fpga: zynqmp: Add support to get the PCAP status for fpga info command
authorNitin Jain <nitin.jain@xilinx.com>
Fri, 16 Feb 2018 11:59:54 +0000 (17:29 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 9 Apr 2018 10:14:50 +0000 (12:14 +0200)
This patch adds support for ZynqMP platform to print FPGA PCAP status
for "fpga status" command.

Signed-off-by: Nitin Jain <nitinj@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/fpga/zynqmppl.c
include/zynqmppl.h

index 57a4e6c88e7a122483f29d016dff67eba2371267..80388ae7f2cf762144955f791d63b875b6bad430 100644 (file)
@@ -224,6 +224,20 @@ static int zynqmp_load(xilinx_desc *desc, const void *buf, size_t bsize,
        return ret;
 }
 
+static int zynqmp_pcap_info(xilinx_desc *desc)
+{
+       int ret;
+       u32 ret_payload[PAYLOAD_ARG_CNT];
+
+       ret = invoke_smc(ZYNQMP_SIP_SVC_PM_FPGA_STATUS, 0, 0, 0,
+                        0, ret_payload);
+       if (!ret)
+               printf("PCAP status\t0x%x\n", ret_payload[1]);
+
+       return ret;
+}
+
 struct xilinx_fpga_op zynqmp_op = {
        .load = zynqmp_load,
+       .info = zynqmp_pcap_info,
 };
index 4c8c2f88f04c5b587a85115315363e9edacf4133..8b3ce8ef77062ab052672b09d2cbaa957c2d074d 100644 (file)
@@ -12,6 +12,7 @@
 
 #define ZYNQMP_SIP_SVC_CSU_DMA_CHIPID          0xC2000018
 #define ZYNQMP_SIP_SVC_PM_FPGA_LOAD            0xC2000016
+#define ZYNQMP_SIP_SVC_PM_FPGA_STATUS          0xC2000017
 #define ZYNQMP_FPGA_OP_INIT                    (1 << 0)
 #define ZYNQMP_FPGA_OP_LOAD                    (1 << 1)
 #define ZYNQMP_FPGA_OP_DONE                    (1 << 2)