Merge branch 'next'
[oweals/u-boot.git] / arch / arm / mach-omap2 / am33xx / board.c
index fe7b8e1e5575b76b37a8d102dc1758117b6fe7ad..283f73522d6dbee85a31d40c094af2999614c143 100644 (file)
@@ -11,6 +11,7 @@
 #include <dm.h>
 #include <debug_uart.h>
 #include <errno.h>
+#include <init.h>
 #include <ns16550.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
@@ -116,7 +117,7 @@ U_BOOT_DEVICES(am33xx_i2c) = {
 };
 #endif
 
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
 static const struct omap_gpio_platdata am33xx_gpio[] = {
        { 0, AM33XX_GPIO0_BASE },
        { 1, AM33XX_GPIO1_BASE },
@@ -141,7 +142,7 @@ U_BOOT_DEVICES(am33xx_gpios) = {
 #endif
 #endif
 
-#ifndef CONFIG_DM_GPIO
+#if !CONFIG_IS_ENABLED(DM_GPIO)
 static const struct gpio_bank gpio_bank_am33xx[] = {
        { (void *)AM33XX_GPIO0_BASE },
        { (void *)AM33XX_GPIO1_BASE },
@@ -375,8 +376,8 @@ void update_rtc_magic(void)
  */
 int board_early_init_f(void)
 {
-       prcm_init();
        set_mux_conf_regs();
+       prcm_init();
 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_RTC_DDR_SUPPORT)
        update_rtc_magic();
 #endif
@@ -481,9 +482,6 @@ static void rtc_only(void)
        rtc_only_prcm_init();
        sdram_init();
 
-       /* Disable EMIF_DEVOFF for normal operation and to exit self-refresh */
-       writel(0, &prm_device->emif_ctrl);
-
        /* Check EMIF4D_SDRAM_CONFIG[31:29] SDRAM_TYPE */
        /* Only perform leveling if SDRAM_TYPE = 3 (DDR3) */
        sdrc = readl(AM43XX_EMIF_BASE + AM43XX_SDRAM_CONFIG_OFFSET);