summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-02-06 11:20:23 -0500
committerTom Rini <trini@ti.com>2014-02-06 11:20:23 -0500
commit6e94258e2519fe91df12ea7aa732b75887d81461 (patch)
tree712bb081d2ae498b79af96314c546cfa5dc80a5e /drivers
parentf016f8ca3d503af004a649de1c704d5ddf3def22 (diff)
parent31993d6a3585d478d792fc70240129b0ca03f55f (diff)
downloadu-boot-imx-6e94258e2519fe91df12ea7aa732b75887d81461.zip
u-boot-imx-6e94258e2519fe91df12ea7aa732b75887d81461.tar.gz
u-boot-imx-6e94258e2519fe91df12ea7aa732b75887d81461.tar.bz2
Merge branch 'fpga' of git://www.denx.de/git/u-boot-microblaze
Diffstat (limited to 'drivers')
-rw-r--r--drivers/fpga/zynqpl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
index 1effbad..15900c9 100644
--- a/drivers/fpga/zynqpl.c
+++ b/drivers/fpga/zynqpl.c
@@ -187,6 +187,16 @@ int zynq_load(Xilinx_desc *desc, const void *buf, size_t bsize)
if ((u32)buf != ALIGN((u32)buf, ARCH_DMA_MINALIGN)) {
u32 *new_buf = (u32 *)ALIGN((u32)buf, ARCH_DMA_MINALIGN);
+ /*
+ * This might be dangerous but permits to flash if
+ * ARCH_DMA_MINALIGN is greater than header size
+ */
+ if (new_buf > buf_start) {
+ debug("%s: Aligned buffer is after buffer start\n",
+ __func__);
+ new_buf -= ARCH_DMA_MINALIGN;
+ }
+
printf("%s: Align buffer at %x to %x(swap %d)\n", __func__,
(u32)buf_start, (u32)new_buf, swap);