]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/am33xx/board.c
arm:am33xx: Make dram_init call sdram_init() in some contexts
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / am33xx / board.c
index 2b15a64667bac7a26ade84955da935349a0b08c2..9a69b6ccfac4ff6197d8b6a214bbd8279a8fc587 100644 (file)
@@ -142,7 +142,7 @@ int arch_misc_init(void)
        return 0;
 }
 
-#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
 /*
  * This function is the place to do per-board things such as ramp up the
  * MPU clock frequency.
@@ -200,7 +200,6 @@ static void watchdog_disable(void)
        while (readl(&wdtimer->wdtwwps) != 0x0)
                ;
 }
-#endif
 
 void s_init(void)
 {
@@ -220,31 +219,30 @@ void s_init(void)
 #ifdef CONFIG_SPL_BUILD
        save_omap_boot_params();
 #endif
-#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)
        watchdog_disable();
        timer_init();
        set_uart_mux_conf();
        setup_clocks_for_console();
        uart_soft_reset();
-#endif
-#ifdef CONFIG_NOR_BOOT
+#if defined(CONFIG_NOR_BOOT) || defined(CONFIG_QSPI_BOOT)
        gd->baudrate = CONFIG_BAUDRATE;
        serial_init();
        gd->have_console = 1;
-#else
+#elif defined(CONFIG_SPL_BUILD)
        gd = &gdata;
        preloader_console_init();
 #endif
-#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)
        prcm_init();
        set_mux_conf_regs();
 #if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
        /* Enable RTC32K clock */
        rtc32k_enable();
 #endif
+#ifdef CONFIG_SPL_BUILD
        sdram_init();
 #endif
 }
+#endif
 
 #ifndef CONFIG_SYS_DCACHE_OFF
 void enable_caches(void)