mmc: fsl_esdhc: workaround for hardware 3.3v IO reliability issue
[oweals/u-boot.git] / drivers / fpga / cyclon2.c
index 99a64d437cc6722529d3f97a1c40f12e804b9935..3b008facb8c4daeb59aacb0140a15f40b21df18e 100644 (file)
@@ -8,6 +8,7 @@
 #include <common.h>            /* core U-Boot definitions */
 #include <altera.h>
 #include <ACEX1K.h>            /* ACEX device family */
+#include <linux/delay.h>
 
 /* Define FPGA_DEBUG to get debug printf's */
 #ifdef FPGA_DEBUG
@@ -162,29 +163,33 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize)
                putc(' ');                      /* terminate the dotted line */
 #endif
 
-       /*
-        * Checking FPGA's CONF_DONE signal - correctly booted ?
-        */
+               /*
+                * Checking FPGA's CONF_DONE signal - correctly booted ?
+                */
 
-       if (!(*fn->done) (cookie)) {
-               puts("** Booting failed! CONF_DONE is still deasserted.\n");
-               (*fn->abort) (cookie);
-               return FPGA_FAIL;
-       }
+               if (!(*fn->done) (cookie)) {
+                       puts("** Booting failed! CONF_DONE is still deasserted.\n");
+                       (*fn->abort) (cookie);
+                       return FPGA_FAIL;
+               }
 #ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
-       puts(" OK\n");
+               puts(" OK\n");
 #endif
 
-       ret_val = FPGA_SUCCESS;
+               ret_val = FPGA_SUCCESS;
 
 #ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
-       if (ret_val == FPGA_SUCCESS)
-               puts("Done.\n");
-       else
-               puts("Fail.\n");
+               if (ret_val == FPGA_SUCCESS)
+                       puts("Done.\n");
+               else
+                       puts("Fail.\n");
 #endif
-       (*fn->post) (cookie);
 
+               /*
+                * Run the post configuration function if there is one.
+                */
+               if (*fn->post)
+                       (*fn->post) (cookie);
        } else {
                printf("%s: NULL Interface function table!\n", __func__);
        }