Patchwork [U-Boot,2/2] mxs: Properly setup VDDD in power supply setup code

login
register
mail settings
Submitter Marek Vasut
Date Nov. 30, 2012, 3:22 p.m.
Message ID <1354288933-18926-2-git-send-email-marex@denx.de>
Download mbox | patch
Permalink /patch/202970/
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Comments

Marek Vasut - Nov. 30, 2012, 3:22 p.m.
The memory setup code adjusted the VDDD voltage. Remove this adjustment
and configure the VDDD voltage correctly in the power supply setup code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c   |   13 -------------
 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c |    2 +-
 2 files changed, 1 insertion(+), 14 deletions(-)
Stefano Babic - Dec. 4, 2012, 8:28 a.m.
On 30/11/2012 16:22, Marek Vasut wrote:
> The memory setup code adjusted the VDDD voltage. Remove this adjustment
> and configure the VDDD voltage correctly in the power supply setup code.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c   |   13 -------------
>  arch/arm/cpu/arm926ejs/mxs/spl_power_init.c |    2 +-
>  2 files changed, 1 insertion(+), 14 deletions(-)
> 

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Patch

diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
index e693145..8904e24 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
@@ -171,17 +171,6 @@  void mxs_mem_setup_vdda(void)
 		&power_regs->hw_power_vddactrl);
 }
 
-void mxs_mem_setup_vddd(void)
-{
-	struct mxs_power_regs *power_regs =
-		(struct mxs_power_regs *)MXS_POWER_BASE;
-
-	writel((0x1c << POWER_VDDDCTRL_TRG_OFFSET) |
-		(0x7 << POWER_VDDDCTRL_BO_OFFSET_OFFSET) |
-		POWER_VDDDCTRL_LINREG_OFFSET_1STEPS_BELOW,
-		&power_regs->hw_power_vdddctrl);
-}
-
 uint32_t mxs_mem_get_size(void)
 {
 	uint32_t sz, da;
@@ -241,8 +230,6 @@  void mxs_mem_init(void)
 	while (!(readl(MXS_DRAM_BASE + 0xe8) & (1 << 20)))
 		;
 
-	mxs_mem_setup_vddd();
-
 	early_delay(10000);
 
 	mxs_mem_setup_cpu_and_hbus();
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index 0d80158..2bc6ad1 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -897,7 +897,7 @@  void mxs_power_init(void)
 	mxs_enable_output_rail_protection();
 
 	mxs_power_set_vddx(&mxs_vddio_cfg, 3300, 3150);
-	mxs_power_set_vddx(&mxs_vddd_cfg, 1350, 1200);
+	mxs_power_set_vddx(&mxs_vddd_cfg, 1500, 1000);
 
 	writel(POWER_CTRL_VDDD_BO_IRQ | POWER_CTRL_VDDA_BO_IRQ |
 		POWER_CTRL_VDDIO_BO_IRQ | POWER_CTRL_VDD5V_DROOP_IRQ |