ppc4xx: Add pci_pre_init() for 405 boards
[oweals/u-boot.git] / lib_nios2 / board.c
index 0e0b04244967a19d1fad4d65b05eee043f4143ef..7ffb3f019b96ecaae1f8f631282051b5b0d24988 100644 (file)
 #ifdef CONFIG_STATUS_LED
 #include <status_led.h>
 #endif
+#if defined(CFG_NIOS_EPCSBASE)
+#include <nios2-epcs.h>
+#endif
 
+DECLARE_GLOBAL_DATA_PTR;
 
 /*
  * All attempts to come up with a "common" initialization sequence
@@ -92,6 +96,9 @@ init_fnc_t *init_sequence[] = {
 #if defined(CONFIG_BOARD_EARLY_INIT_F)
        board_early_init_f,     /* Call board-specific init code early.*/
 #endif
+#if defined(CFG_NIOS_EPCSBASE)
+       epcs_reset,
+#endif
 
        env_init,
        serial_init,
@@ -106,8 +113,6 @@ init_fnc_t *init_sequence[] = {
 /***********************************************************************/
 void board_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        bd_t *bd;
        init_fnc_t **init_fnc_ptr;
        char *s, *e;
@@ -166,6 +171,10 @@ void board_init (void)
        WATCHDOG_RESET ();
        interrupt_init ();
 
+#if defined(CONFIG_BOARD_LATE_INIT)
+       board_late_init ();
+#endif
+
        /* main_loop */
        for (;;) {
                WATCHDOG_RESET ();