mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-29 08:00:26 +09:00
fpga: zynqpl: fix buffer alignment
Due to pointer arithmetic, "sizeof(u32) * ARCH_DMA_MINALIGN" is subtracted. It seems that the original intention was to just subtract ARCH_DMA_MINALIGN. Fix it. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
038e02455b
commit
8c02d842b6
@ -315,7 +315,7 @@ static u32 *zynq_align_dma_buffer(u32 *buf, u32 len, u32 swap)
|
|||||||
if (new_buf > buf) {
|
if (new_buf > buf) {
|
||||||
debug("%s: Aligned buffer is after buffer start\n",
|
debug("%s: Aligned buffer is after buffer start\n",
|
||||||
__func__);
|
__func__);
|
||||||
new_buf -= ARCH_DMA_MINALIGN;
|
new_buf = (u32 *)((u32)new_buf - ARCH_DMA_MINALIGN);
|
||||||
}
|
}
|
||||||
printf("%s: Align buffer at %x to %x(swap %d)\n", __func__,
|
printf("%s: Align buffer at %x to %x(swap %d)\n", __func__,
|
||||||
(u32)buf, (u32)new_buf, swap);
|
(u32)buf, (u32)new_buf, swap);
|
||||||
|
Loading…
Reference in New Issue
Block a user