]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
arm: spear: Move to common SPL infrastructure
[u-boot] / arch / arm / cpu / arm926ejs / mxs / spl_power_init.c
index c342217fa9185087d3e6a0866ad3c68e1ddc0abd..42f3df2ac22862f842c524c11f423d1fd31ffe94 100644 (file)
@@ -332,6 +332,11 @@ static void mxs_enable_4p2_dcdc_input(int xfer)
 
        debug("SPL: %s 4P2 DC-DC Input\n", xfer ? "Enabling" : "Disabling");
 
+       if (xfer && (readl(&power_regs->hw_power_5vctrl) &
+                       POWER_5VCTRL_ENABLE_DCDC)) {
+               return;
+       }
+
        prev_5v_brnout = readl(&power_regs->hw_power_5vctrl) &
                                POWER_5VCTRL_PWDN_5VBRNOUT;
        prev_5v_droop = readl(&power_regs->hw_power_ctrl) &
@@ -343,11 +348,6 @@ static void mxs_enable_4p2_dcdc_input(int xfer)
 
        clrbits_le32(&power_regs->hw_power_ctrl, POWER_CTRL_ENIRQ_VDD5V_DROOP);
 
-       if (xfer && (readl(&power_regs->hw_power_5vctrl) &
-                       POWER_5VCTRL_ENABLE_DCDC)) {
-               return;
-       }
-
        /*
         * Recording orignal values that will be modified temporarlily
         * to handle a chip bug. See chip errata for CQ ENGR00115837