summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorStefan Wahren <stefan.wahren@i2se.com>2015-05-21 11:20:17 +0000
committerStefano Babic <sbabic@denx.de>2015-06-01 09:21:54 +0200
commit7bbc5ff732bcf8d2aa935249ce4b7c28a701ca51 (patch)
tree264b3b231ca9738075d0ee46cbbe6def1c71f7c8 /arch/arm
parent68006aeb6d62343238578c6ea767907d63346aad (diff)
downloadu-boot-imx-7bbc5ff732bcf8d2aa935249ce4b7c28a701ca51.zip
u-boot-imx-7bbc5ff732bcf8d2aa935249ce4b7c28a701ca51.tar.gz
u-boot-imx-7bbc5ff732bcf8d2aa935249ce4b7c28a701ca51.tar.bz2
mxs: Do not disable bo detection when DC-DC is already enabled
In case the DC-DC is already enabled mxs_enable_4p2_dcdc_input() returns without reenabling brown out detection. So fix this issue by moving the return before brown out deactivation. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/spl_power_init.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index c342217..42f3df2 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -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