mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <r.hieber@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Roland Hieber <r.hieber@pengutronix.de>
Subject: [PATCH 09/13] ARM: MXS: fix VDDx brownout setup logic
Date: Wed, 25 Jul 2018 15:36:14 +0200	[thread overview]
Message-ID: <20180725133618.1510-10-r.hieber@pengutronix.de> (raw)
In-Reply-To: <20180725133618.1510-1-r.hieber@pengutronix.de>

The cfg->bo_irq and cfg->bo_enirq (i.e. VDDx_BO_IRQ and ENIRQ_VDDx_BO)
flags are part of POWER_CTRL, so setting those flag in cfg->reg (i.e.
POWER_VDDxCTRL) makes no sense. Fortunately, those bits are reserved in
ENIRQ_VDDx_BO, so writing them did no harm, but also doesn't work as
intended.

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
 arch/arm/mach-mxs/power-init.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-mxs/power-init.c b/arch/arm/mach-mxs/power-init.c
index d4b88a4b2c..db597ef65c 100644
--- a/arch/arm/mach-mxs/power-init.c
+++ b/arch/arm/mach-mxs/power-init.c
@@ -1083,8 +1083,8 @@ static void mxs_power_set_vddx(const struct mxs_vddx_cfg *cfg,
 
 	if (adjust_up && cfg->bo_irq) {
 		if (powered_by_linreg) {
-			bo_int = readl(cfg->reg);
-			clrbits_le32(cfg->reg, cfg->bo_enirq);
+			bo_int = readl(&power_regs->hw_power_ctrl);
+			writel(cfg->bo_enirq, &power_regs->hw_power_ctrl_clr);
 		}
 		setbits_le32(cfg->reg, cfg->bo_offset_mask);
 	}
@@ -1126,7 +1126,7 @@ static void mxs_power_set_vddx(const struct mxs_vddx_cfg *cfg,
 		if (adjust_up && powered_by_linreg) {
 			writel(cfg->bo_irq, &power_regs->hw_power_ctrl_clr);
 			if (bo_int & cfg->bo_enirq)
-				setbits_le32(cfg->reg, cfg->bo_enirq);
+				writel(cfg->bo_enirq, &power_regs->hw_power_ctrl_set);
 		}
 
 		clrsetbits_le32(cfg->reg, cfg->bo_offset_mask,
-- 
2.18.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2018-07-25 13:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25 13:36 [PATCH 00/13] MXS/MX28 low-level improvements Roland Hieber
2018-07-25 13:36 ` [PATCH 01/13] scripts: mxsimage: Allow unencrypted images Roland Hieber
2018-07-25 13:36 ` [PATCH 02/13] images: MXS: allow generation of unencrypted bootstreams Roland Hieber
2018-07-25 13:36 ` [PATCH 03/13] ARM: MXS: i.MX28: allow setup of low-voltage SDRAM Roland Hieber
2018-07-25 13:36 ` [PATCH 04/13] ARM: MXS: allow configuration of EMI clock dividers Roland Hieber
2018-08-08  6:41   ` Sascha Hauer
2018-07-25 13:36 ` [PATCH 05/13] ARM: MXS: i.MX28: add autodetection of memory banks Roland Hieber
2018-07-27  8:28   ` Roland Hieber
2018-07-31 10:07   ` Roland Hieber
2018-08-08  6:40     ` Sascha Hauer
2018-07-25 13:36 ` [PATCH 06/13] ARM: MXS: refactor mx2*_power_init source configuration Roland Hieber
2018-07-25 13:36 ` [PATCH 07/13] ARM: MXS: allow starting from battery input without 4P2 source enabled Roland Hieber
2018-07-25 13:36 ` [PATCH 08/13] ARM: MXS: make power levels configurable in mx2*_power_init Roland Hieber
2018-07-25 13:36 ` Roland Hieber [this message]
2018-07-25 13:36 ` [PATCH 10/13] ARM: MXS: make VDDx brownout setup more understandable Roland Hieber
2018-07-25 13:36 ` [PATCH 11/13] ARM: MXS: mxs_power_status: use less magic values Roland Hieber
2018-07-25 13:36 ` [PATCH 12/13] ARM: MXS: mxs_power_status: align output Roland Hieber
2018-07-25 13:36 ` [PATCH 13/13] Documentation: MXS: general update and improvements Roland Hieber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180725133618.1510-10-r.hieber@pengutronix.de \
    --to=r.hieber@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox