From: Michal Simek Date: Fri, 4 Oct 2013 08:48:59 +0000 (+0200) Subject: fpga: zynqpl: Do not place bitstream below 1MB X-Git-Url: http://git.dujemihanovic.xyz/%22/img/sics.gif/%22/static/git-favicon.png?a=commitdiff_plain;h=b129e8cfb07cdbbf8ce0f2a165edabeb2f7a1da7;p=u-boot.git fpga: zynqpl: Do not place bitstream below 1MB DMA doesn't work when src is placed below 1MB limit. Signed-off-by: Michal Simek Acked-by: Jagannadha Sutradharudu Teki --- diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c index f2f49b56a6..1effbadda9 100644 --- a/drivers/fpga/zynqpl.c +++ b/drivers/fpga/zynqpl.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -177,6 +178,12 @@ int zynq_load(Xilinx_desc *desc, const void *buf, size_t bsize) return FPGA_FAIL; } + if ((u32)buf < SZ_1M) { + printf("%s: Bitstream has to be placed up to 1MB (%x)\n", + __func__, (u32)buf); + return FPGA_FAIL; + } + if ((u32)buf != ALIGN((u32)buf, ARCH_DMA_MINALIGN)) { u32 *new_buf = (u32 *)ALIGN((u32)buf, ARCH_DMA_MINALIGN);