summaryrefslogtreecommitdiff
path: root/drivers/fpga/xilinx.c
diff options
context:
space:
mode:
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>2014-03-14 15:05:37 +0400
committerMichal Simek <michal.simek@xilinx.com>2014-05-20 17:23:46 +0400
commit1a897668ac33c57ca76f47cb940ec32b405e90dd (patch)
treeaccd3a9001b851d2fe03553f7997fa417be17db0 /drivers/fpga/xilinx.c
parent26ea9ce5b84b688936a64d1c6102614ed1c28640 (diff)
downloadu-boot-1a897668ac33c57ca76f47cb940ec32b405e90dd.tar.xz
fpga: Added support to load bit stream from SD/MMC
Added support to load a bitstream image in chunks by reading it in chunks from SD/MMC. Command format: loadfs [dev] [address] [image size] [blocksize] <interface> [<dev[:part]>] <filename> Example: fpga loadfs 0 1000000 3dbafc 4000 mmc 0 fpga.bin Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/fpga/xilinx.c')
-rw-r--r--drivers/fpga/xilinx.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c
index ab9f51733e..3795c1aff6 100644
--- a/drivers/fpga/xilinx.c
+++ b/drivers/fpga/xilinx.c
@@ -142,6 +142,22 @@ int xilinx_load(xilinx_desc *desc, const void *buf, size_t bsize,
return desc->operations->load(desc, buf, bsize, bstype);
}
+#if defined(CONFIG_CMD_FPGA_LOADFS)
+int xilinx_loadfs(xilinx_desc *desc, const void *buf, size_t bsize,
+ fpga_fs_info *fpga_fsinfo)
+{
+ if (!xilinx_validate(desc, (char *)__func__)) {
+ printf("%s: Invalid device descriptor\n", __func__);
+ return FPGA_FAIL;
+ }
+
+ if (!desc->operations->loadfs)
+ return FPGA_FAIL;
+
+ return desc->operations->loadfs(desc, buf, bsize, fpga_fsinfo);
+}
+#endif
+
int xilinx_dump(xilinx_desc *desc, const void *buf, size_t bsize)
{
if (!xilinx_validate (desc, (char *)__FUNCTION__)) {