]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/mach-at91/spl_at91.c
ARM: keystone2: Build MLO by default
[u-boot] / arch / arm / mach-at91 / spl_at91.c
index 89f588be45a01a449a2ff6fd3070f522bc022e92..b19f95b0d07eaad86710d1a8558da0d93120cb56 100644 (file)
@@ -71,7 +71,11 @@ void __weak at91_spl_board_init(void)
 {
 }
 
-void spl_board_init(void)
+void __weak spl_board_init(void)
+{
+}
+
+void board_init_f(ulong dummy)
 {
        struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 
@@ -111,12 +115,20 @@ void spl_board_init(void)
        timer_init();
 
        /* enable clocks for all PIOs */
+#if defined(CONFIG_AT91SAM9X5) || defined(CONFIG_AT91SAM9N12)
+       at91_periph_clk_enable(ATMEL_ID_PIOAB);
+       at91_periph_clk_enable(ATMEL_ID_PIOCD);
+#else
        at91_periph_clk_enable(ATMEL_ID_PIOA);
        at91_periph_clk_enable(ATMEL_ID_PIOB);
        at91_periph_clk_enable(ATMEL_ID_PIOC);
+#endif
+
+#if defined(CONFIG_SPL_SERIAL_SUPPORT)
        /* init console */
        at91_seriald_hw_init();
        preloader_console_init();
+#endif
 
        mem_init();