]> git.sur5r.net Git - u-boot/commitdiff
arm: socfpga: Fix with the correct polling on bit is set
authorTien Fong Chee <tien.fong.chee@intel.com>
Tue, 5 Dec 2017 07:57:58 +0000 (15:57 +0800)
committerMarek Vasut <marex@denx.de>
Thu, 26 Apr 2018 23:04:08 +0000 (01:04 +0200)
Commit 2baa997240d ("arm: socfpga: Add FPGA driver support for Arria 10")
Polling on wrong cleared bit. Fix with correct polling on bit is set.

Fixes: 2baa997240d ("arm: socfpga: Add FPGA driver support for Arria 10")
Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
drivers/fpga/socfpga_arria10.c

index d5763965ddc2e12e835734b4e145a1c47174c177..685e8e271a0342d7c51f059c6e38685098b02b95 100644 (file)
@@ -111,12 +111,12 @@ static int wait_for_nconfig_pin_and_nstatus_pin(void)
        unsigned long mask = ALT_FPGAMGR_IMGCFG_STAT_F2S_NCONFIG_PIN_SET_MSK |
                                ALT_FPGAMGR_IMGCFG_STAT_F2S_NSTATUS_PIN_SET_MSK;
 
-       /* Poll until f2s_nconfig_pin and f2s_nstatus_pin; loop until de-asserted,
-        * timeout at 1000ms
+       /*
+        * Poll until f2s_nconfig_pin and f2s_nstatus_pin; loop until
+        * de-asserted, timeout at 1000ms
         */
-       return wait_for_bit_le32(&fpga_manager_base->imgcfg_stat,
-               mask,
-               false, FPGA_TIMEOUT_MSEC, false);
+       return wait_for_bit_le32(&fpga_manager_base->imgcfg_stat, mask,
+                                true, FPGA_TIMEOUT_MSEC, false);
 }
 
 static int wait_for_f2s_nstatus_pin(unsigned long value)