All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mxs: Do not disable bo detection when DC-DC is already enabled
@ 2015-05-21 11:20 Stefan Wahren
  2015-05-21 12:21 ` Marek Vasut
  2015-06-01  7:22 ` Stefano Babic
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Wahren @ 2015-05-21 11:20 UTC (permalink / raw)
  To: u-boot

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>
---
 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c |   10 +++++-----
 1 file 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
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] mxs: Do not disable bo detection when DC-DC is already enabled
  2015-05-21 11:20 [U-Boot] [PATCH] mxs: Do not disable bo detection when DC-DC is already enabled Stefan Wahren
@ 2015-05-21 12:21 ` Marek Vasut
  2015-06-01  7:22 ` Stefano Babic
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2015-05-21 12:21 UTC (permalink / raw)
  To: u-boot

On Thursday, May 21, 2015 at 01:20:17 PM, Stefan Wahren wrote:
> 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>

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] mxs: Do not disable bo detection when DC-DC is already enabled
  2015-05-21 11:20 [U-Boot] [PATCH] mxs: Do not disable bo detection when DC-DC is already enabled Stefan Wahren
  2015-05-21 12:21 ` Marek Vasut
@ 2015-06-01  7:22 ` Stefano Babic
  1 sibling, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2015-06-01  7:22 UTC (permalink / raw)
  To: u-boot

On 21/05/2015 13:20, Stefan Wahren wrote:
> 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>
> ---
>  arch/arm/cpu/arm926ejs/mxs/spl_power_init.c |   10 +++++-----
>  1 file 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
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-01  7:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-21 11:20 [U-Boot] [PATCH] mxs: Do not disable bo detection when DC-DC is already enabled Stefan Wahren
2015-05-21 12:21 ` Marek Vasut
2015-06-01  7:22 ` Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.