diff options
author | Siva Durga Prasad Paladugu | 2014-03-14 16:35:37 +0530 |
---|---|---|
committer | Michal Simek | 2014-05-20 15:23:46 +0200 |
commit | 1a897668ac33c57ca76f47cb940ec32b405e90dd (patch) | |
tree | accd3a9001b851d2fe03553f7997fa417be17db0 /drivers/fpga/xilinx.c | |
parent | 26ea9ce5b84b688936a64d1c6102614ed1c28640 (diff) |
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.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c index ab9f51733e9..3795c1aff6e 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__)) { |