Patchwork [U-Boot,2/3,v2] MX51EVK: Use SWx macros in PMIC init

login
register
mail settings
Submitter Marek Vasut
Date Jan. 19, 2011, 2:40 p.m.
Message ID <1295448037-3676-2-git-send-email-marek.vasut@gmail.com>
Download mbox | patch
Permalink /patch/79476/
State Accepted
Commit c4a3c7442bfcd226da8fe8747c3d7141fc531348
Delegated to: Stefano Babic
Headers show

Comments

Marek Vasut - Jan. 19, 2011, 2:40 p.m.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
v2: Remove stray newline and useless parens

 board/freescale/mx51evk/mx51evk.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Stefano Babic - Feb. 1, 2011, 5:44 p.m.
On 01/19/2011 03:40 PM, Marek Vasut wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> v2: Remove stray newline and useless parens
> 
>  board/freescale/mx51evk/mx51evk.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Applied to u-boot-imx, thanks

Best regards,
Stefano Babic

Patch

diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index 2160d5a..726ce18 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -198,17 +198,17 @@  static void power_init(void)
 
 	/* Set core voltage to 1.1V */
 	val = pmic_reg_read(REG_SW_0);
-	val = (val & (~0x1F)) | 0x14;
+	val = (val & ~SWx_VOLT_MASK) | SWx_1_100V;
 	pmic_reg_write(REG_SW_0, val);
 
 	/* Setup VCC (SW2) to 1.25 */
 	val = pmic_reg_read(REG_SW_1);
-	val = (val & (~0x1F)) | 0x1A;
+	val = (val & ~SWx_VOLT_MASK) | SWx_1_250V;
 	pmic_reg_write(REG_SW_1, val);
 
 	/* Setup 1V2_DIG1 (SW3) to 1.25 */
 	val = pmic_reg_read(REG_SW_2);
-	val = (val & (~0x1F)) | 0x1A;
+	val = (val & ~SWx_VOLT_MASK) | SWx_1_250V;
 	pmic_reg_write(REG_SW_2, val);
 	udelay(50);