public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: socfpga: Fix FPGA bitstream programming routine
@ 2015-07-27 20:34 Marek Vasut
  2015-08-03 15:58 ` Marek Vasut
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2015-07-27 20:34 UTC (permalink / raw)
  To: u-boot

In case the FPGA bitstream is aligned to 4 bytes, skip the
part of the assembler which handles unaligned bitstream.
Otherwise, that part will loop indefinitelly.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
---
 drivers/fpga/socfpga.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/socfpga.c
index 63b3566..4448250 100644
--- a/drivers/fpga/socfpga.c
+++ b/drivers/fpga/socfpga.c
@@ -160,10 +160,13 @@ static void fpgamgr_program_write(const void *rbf_data, unsigned long rbf_size)
 		"	sub	%1,	#32\n"
 		"	subs	%2,	#1\n"
 		"	bne	1b\n"
+		"	cmp	%3,	#0\n"
+		"	beq	3f\n"
 		"2:	ldr	%2,	[%0],	#4\n"
 		"	str	%2,	[%1]\n"
 		"	subs	%3,	#1\n"
 		"	bne	2b\n"
+		"3:	nop\n"
 		: "+r"(src), "+r"(dst), "+r"(loops32), "+r"(loops4) :
 		: "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "cc");
 }
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] arm: socfpga: Fix FPGA bitstream programming routine
  2015-07-27 20:34 [U-Boot] [PATCH] arm: socfpga: Fix FPGA bitstream programming routine Marek Vasut
@ 2015-08-03 15:58 ` Marek Vasut
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Vasut @ 2015-08-03 15:58 UTC (permalink / raw)
  To: u-boot

On Monday, July 27, 2015 at 10:34:54 PM, Marek Vasut wrote:
> In case the FPGA bitstream is aligned to 4 bytes, skip the
> part of the assembler which handles unaligned bitstream.
> Otherwise, that part will loop indefinitelly.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Dinh Nguyen <dinguyen@opensource.altera.com>

Applied to u-boot-socfpga/master .

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-03 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 20:34 [U-Boot] [PATCH] arm: socfpga: Fix FPGA bitstream programming routine Marek Vasut
2015-08-03 15:58 ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox