summaryrefslogtreecommitdiff
path: root/include/zynqpl.h
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2014-03-13 13:07:57 +0100
committerMichal Simek <michal.simek@xilinx.com>2014-05-13 09:13:59 +0200
commit14cfc4f3735d9704cb6a630ef302be596d380684 (patch)
tree23c759ab37c1368763488a5548813231cfa1d3d0 /include/zynqpl.h
parent2df9d5c431fca07c9868a36b48ee771bde6b19e8 (diff)
downloadu-boot-imx-14cfc4f3735d9704cb6a630ef302be596d380684.zip
u-boot-imx-14cfc4f3735d9704cb6a630ef302be596d380684.tar.gz
u-boot-imx-14cfc4f3735d9704cb6a630ef302be596d380684.tar.bz2
fpga: xilinx: Simplify load/dump/info function handling
Connect FPGA version with appropriate operations to remove huge switch-cases for every FPGA family. Tested on Zynq. Spartan2/Spartan3/Virtex2 just compile test. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'include/zynqpl.h')
-rw-r--r--include/zynqpl.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/zynqpl.h b/include/zynqpl.h
index fdee691..8a9ec32 100644
--- a/include/zynqpl.h
+++ b/include/zynqpl.h
@@ -12,9 +12,7 @@
#include <xilinx.h>
-int zynq_load(xilinx_desc *desc, const void *image, size_t size);
-int zynq_dump(xilinx_desc *desc, const void *buf, size_t bsize);
-int zynq_info(xilinx_desc *desc);
+extern struct xilinx_fpga_op zynq_op;
#define XILINX_ZYNQ_7010 0x2
#define XILINX_ZYNQ_7015 0x1b
@@ -33,21 +31,21 @@ int zynq_info(xilinx_desc *desc);
/* Descriptor Macros */
#define XILINX_XC7Z010_DESC(cookie) \
-{ xilinx_zynq, devcfg, XILINX_XC7Z010_SIZE, NULL, cookie, "7z010" }
+{ xilinx_zynq, devcfg, XILINX_XC7Z010_SIZE, NULL, cookie, &zynq_op, "7z010" }
#define XILINX_XC7Z015_DESC(cookie) \
-{ xilinx_zynq, devcfg, XILINX_XC7Z015_SIZE, NULL, cookie, "7z015" }
+{ xilinx_zynq, devcfg, XILINX_XC7Z015_SIZE, NULL, cookie, &zynq_op, "7z015" }
#define XILINX_XC7Z020_DESC(cookie) \
-{ xilinx_zynq, devcfg, XILINX_XC7Z020_SIZE, NULL, cookie, "7z020" }
+{ xilinx_zynq, devcfg, XILINX_XC7Z020_SIZE, NULL, cookie, &zynq_op, "7z020" }
#define XILINX_XC7Z030_DESC(cookie) \
-{ xilinx_zynq, devcfg, XILINX_XC7Z030_SIZE, NULL, cookie, "7z030" }
+{ xilinx_zynq, devcfg, XILINX_XC7Z030_SIZE, NULL, cookie, &zynq_op, "7z030" }
#define XILINX_XC7Z045_DESC(cookie) \
-{ xilinx_zynq, devcfg, XILINX_XC7Z045_SIZE, NULL, cookie, "7z045" }
+{ xilinx_zynq, devcfg, XILINX_XC7Z045_SIZE, NULL, cookie, &zynq_op, "7z045" }
#define XILINX_XC7Z100_DESC(cookie) \
-{ xilinx_zynq, devcfg, XILINX_XC7Z100_SIZE, NULL, cookie, "7z100" }
+{ xilinx_zynq, devcfg, XILINX_XC7Z100_SIZE, NULL, cookie, &zynq_op, "7z100" }
#endif /* _ZYNQPL_H_ */