I would like to handle case where system doesn't contain
intc that's why I need timer initialization out of intc code.
Signed-off-by: Michal Simek <monstr@monstr.eu>
 }
 
 #ifdef CONFIG_SYS_INTC_0
-#ifdef CONFIG_SYS_TIMER_0
-extern void timer_init (void);
-#endif
 #ifdef CONFIG_SYS_FSL_2
 extern void fsl_init2 (void);
 #endif
        }
        /* initialize intc controller */
        intc_init ();
-#ifdef CONFIG_SYS_TIMER_0
-       timer_init ();
-#endif
 #ifdef CONFIG_SYS_FSL_2
        fsl_init2 ();
 #endif
 
        tmr->control = tmr->control | TIMER_INTERRUPT;
 }
 
-void timer_init (void)
+int timer_init (void)
 {
        tmr->loadreg = CONFIG_SYS_TIMER_0_PRELOAD;
        tmr->control = TIMER_INTERRUPT | TIMER_RESET;
            TIMER_ENABLE | TIMER_ENABLE_INTR | TIMER_RELOAD | TIMER_DOWN_COUNT;
        reset_timer ();
        install_interrupt_handler (CONFIG_SYS_TIMER_0_IRQ, timer_isr, (void *)tmr);
+       return 0;
 }
 #endif
 #endif
 
 #if defined(CONFIG_CMD_NET)
 extern int eth_init (bd_t * bis);
 #endif
+#ifdef CONFIG_SYS_TIMER_0
+extern int timer_init (void);
+#endif
+
 
 /*
  * All attempts to come up with a "common" initialization sequence
 #endif
 #ifdef CONFIG_SYS_INTC_0
        interrupts_init,
+#endif
+#ifdef CONFIG_SYS_TIMER_0
+       timer_init,
 #endif
        NULL,
 };