]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm: socfpga: reset: Repair bridge reset handling
authorMarek Vasut <marex@denx.de>
Thu, 9 Jul 2015 01:52:12 +0000 (03:52 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:17:20 +0000 (08:17 +0200)
The current bridge reset code, which de-asserted the bridge reset,
was activelly polling whether the FPGA is programmed and ready and
in case it was (!), the code called hang(). This makes no sense at
all. Repair it such that the code instead checks whether the FPGA
is programmed, but without any polling involved, and only if it is
programmed, it de-asserts the reset.

Signed-off-by: Marek Vasut <marex@denx.de>
arch/arm/mach-socfpga/reset_manager.c

index 18af25ced1ae2311aca0e5b73e1c36b479b833eb..6a11c19200d7c72d94e3706627096e2d2573d00a 100644 (file)
@@ -85,10 +85,10 @@ void socfpga_bridges_reset(int enable)
                writel(0xffffffff, &reset_manager_base->brg_mod_reset);
        } else {
                /* Check signal from FPGA. */
-               if (fpgamgr_poll_fpga_ready()) {
-                       /* FPGA not ready. Wait for watchdog timeout. */
-                       printf("%s: fpga not ready, hanging.\n", __func__);
-                       hang();
+               if (!fpgamgr_test_fpga_ready()) {
+                       /* FPGA not ready, do nothing. */
+                       printf("%s: FPGA not ready, aborting.\n", __func__);
+                       return;
                }
 
                /* brdmodrst */