]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/fpga/socfpga.c
ARM: tegra: enable standard clock/reset APIs everywhere
[karo-tx-uboot.git] / drivers / fpga / socfpga.c
index 63b3566e3ed9ad907f8afa8a248fc1b989c98c16..f1b2f2c4da3dcab3c51e5306ebdc44f7f6893183 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 #include <asm/arch/fpga_manager.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/system_manager.h>
@@ -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");
 }