mxs: Fix VDDx brownout interrupt disable/enable
Subsystems (2)
PATCH 1/2 mxs: Fix VDDx brownout interrupt disable/enable
HW_POWER_CTRL register contains brownout interrupt enable bits ENIRQ_VDDIO_BO, ENIRQ_VDDA_BO and ENIRQ_VDDD_BO.
--- arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +5 -3
@@ -1142,8 +1142,9 @@ 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); +clrbits_le32 (&power_regs->hw_power_ctrl, + cfg->bo_enirq); }setbits_le32 (cfg->reg, cfg->bo_offset_mask); }
@@ -1185,7 +1186,8 @@ 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); +setbits_le32 (&power_regs->hw_power_ctrl, + cfg->bo_enirq); } clrsetbits_le32(cfg->reg, cfg->bo_offset_mask,
Signature · 1 line
2.25.1
Quoted 3 lines · Cody Green
HW_POWER_CTRLregister contains brownout interrupt enable bitsENIRQ_VDDIO_BO,ENIRQ_VDDA_BOandENIRQ_VDDD_BO.
So what does this patch do (that is missing in the commit message) ?
Quoted 7 lines · Marek Vasut
Quoted 3 lines · Cody Green
HW_POWER_CTRLregister contains brownout interrupt enable bitsENIRQ_VDDIO_BO,ENIRQ_VDDA_BOandENIRQ_VDDD_BO.So what does this patch do (that is missing in the commit message) ?
There are incorrect registers HW_POWER_VDDIOCTRL, HW_POWER_VDDACTRL and HW_POWER_VDDDCTRL used in the current code to disable/enable brownout interrupts in 'mxs_power_set_vddx()'. This patch ensures the correct register HW_POWER_CTRL is used.
Sorry for the unspecific commit message, I will amend the patch.
Quoted 7 lines · Cody Green
Quoted 6 lines · Marek Vasut
Quoted 3 lines · Cody Green
HW_POWER_CTRLregister contains brownout interrupt enable bitsENIRQ_VDDIO_BO,ENIRQ_VDDA_BOandENIRQ_VDDD_BO.
Quoted 7 lines
Quoted 1 line
So what does this patch do (that is missing in the commit message) ?
There are incorrect registers
HW_POWER_VDDIOCTRL,HW_POWER_VDDACTRLandHW_POWER_VDDDCTRLused in the current code to disable/enable brownout interrupts in 'mxs_power_set_vddx()'. This patch ensures the correct registerHW_POWER_CTRLis used.
Sorry for the unspecific commit message, I will amend the patch.
Much better, thank you.
Also CC Lukasz (on CC here) on V2.
PATCH v2 1/2 mxs: Fix VDDx brownout interrupt disable/enable
In reply to Cody GreenIncorrect registers HW_POWER_VDDIOCTRL, HW_POWER_VDDACTRL and HW_POWER_VDDDCTRL are used in the current code to disable/enable brownout interrupts in 'mxs_power_set_vddx()'.
Change register to HW_POWER_CTRL which contains brownout interrupt enable bits ENIRQ_VDDIO_BO, ENIRQ_VDDA_BO and ENIRQ_VDDD_BO.
---
Changes for v2:
- Commit message reworded to be more specific.
arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +5 -3
@@ -1142,8 +1142,9 @@ 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); +clrbits_le32 (&power_regs->hw_power_ctrl, + cfg->bo_enirq); }setbits_le32 (cfg->reg, cfg->bo_offset_mask); }
@@ -1185,7 +1186,8 @@ 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); +setbits_le32 (&power_regs->hw_power_ctrl, + cfg->bo_enirq); } clrsetbits_le32(cfg->reg, cfg->bo_offset_mask,
Signature · 1 line
2.25.1