ARM: socfpga: Fix FPGA bitstream loading code
PATCH 1/1 ARM: socfpga: Fix FPGA bitstream loading code
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 <[email protected]>
Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Simon Goldschmidt <[email protected]>
Cc Tien Fong Chee <[email protected]>
--- drivers/fpga/socfpga.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/fpga/socfpga.c +1 -2
@@ -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"
Signature · 1 line
2.20.1