public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM: socfpga: Fix FPGA bitstream loading code
@ 2019-05-07 19:19 Marek Vasut
  2019-05-07 19:36 ` Simon Goldschmidt
  0 siblings, 1 reply; 19+ messages in thread
From: Marek Vasut @ 2019-05-07 19:19 UTC (permalink / raw)
  To: u-boot

According to SoCFPGA Cyclone V datasheet rev.2018.01.26 page 175
(Chapter 5, FPGA Manager, data register) and Arria10 datasheet
rev.2017.07.22 page 211 (Chapter 5.4.1.2, FPGA Manager, img_data_w
register), the FPGA data register must be written with writes with
non-incrementing address.

The current code increments the address in 32-byte bursts. Fix the
code so it does not increment the address and writes the register
repeatedly instead.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
---
 drivers/fpga/socfpga.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/socfpga.c
index 685957626b..6ecea771ce 100644
--- a/drivers/fpga/socfpga.c
+++ b/drivers/fpga/socfpga.c
@@ -55,8 +55,7 @@ void fpgamgr_program_write(const void *rbf_data, size_t rbf_size)
 		"	cmp	%2,	#0\n"
 		"	beq	2f\n"
 		"1:	ldmia	%0!,	{r0-r7}\n"
-		"	stmia	%1!,	{r0-r7}\n"
-		"	sub	%1,	#32\n"
+		"	stmia	%1,	{r0-r7}\n"
 		"	subs	%2,	#1\n"
 		"	bne	1b\n"
 		"2:	cmp	%3,	#0\n"
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [U-Boot] [PATCH] ARM: socfpga: Fix FPGA bitstream loading code
@ 2019-03-22 14:29 Marek Vasut
  0 siblings, 0 replies; 19+ messages in thread
From: Marek Vasut @ 2019-03-22 14:29 UTC (permalink / raw)
  To: u-boot

According to SoCFPGA Cyclone V datasheet rev.2018.01.26 page 175
(Chapter 5, FPGA Manager, data register) and Arria10 datasheet
rev.2017.07.22 page 211 (Chapter 5.4.1.2, FPGA Manager, img_data_w
register), the FPGA data register must be written with writes with
non-incrementing address.

The current code increments the address in 32-byte bursts. Fix the
code so it does not increment the address and writes the register
repeatedly instead.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
---
 drivers/fpga/socfpga.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/socfpga.c
index 685957626b..6ecea771ce 100644
--- a/drivers/fpga/socfpga.c
+++ b/drivers/fpga/socfpga.c
@@ -55,8 +55,7 @@ void fpgamgr_program_write(const void *rbf_data, size_t rbf_size)
 		"	cmp	%2,	#0\n"
 		"	beq	2f\n"
 		"1:	ldmia	%0!,	{r0-r7}\n"
-		"	stmia	%1!,	{r0-r7}\n"
-		"	sub	%1,	#32\n"
+		"	stmia	%1,	{r0-r7}\n"
 		"	subs	%2,	#1\n"
 		"	bne	1b\n"
 		"2:	cmp	%3,	#0\n"
-- 
2.20.1

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

end of thread, other threads:[~2019-12-01 20:02 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-07 19:19 [U-Boot] [PATCH] ARM: socfpga: Fix FPGA bitstream loading code Marek Vasut
2019-05-07 19:36 ` Simon Goldschmidt
2019-05-07 19:41   ` Marek Vasut
2019-05-07 19:43     ` Simon Goldschmidt
2019-05-07 19:44       ` Marek Vasut
2019-05-08  3:51         ` Chee, Tien Fong
2019-05-08 10:17         ` Chee, Tien Fong
2019-05-08 12:55           ` Marek Vasut
2019-05-09  3:57             ` Chee, Tien Fong
2019-05-09  8:34               ` Marek Vasut
2019-05-13 12:58                 ` Chee, Tien Fong
2019-05-13 13:12                   ` Marek Vasut
2019-10-09 18:06                     ` Simon Goldschmidt
2019-10-09 20:47                       ` Marek Vasut
2019-10-10  5:15                         ` Simon Goldschmidt
2019-10-10  7:21                           ` Marek Vasut
2019-11-29  7:32                             ` jérémy alcim
2019-12-01 20:02                               ` Simon Goldschmidt
  -- strict thread matches above, loose matches on Subject: below --
2019-03-22 14:29 Marek Vasut

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