From: Fabio Estevam <fabio.estevam@nxp.com>
Date: Wed, 17 Aug 2016 12:46:23 +0000 (-0300)
Subject: mx7dsabresd: Directly write to register LDOGCTL
X-Git-Tag: v2025.01-rc5-pxa1908~8613^2~8
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/kyber.dk/phpMyBuilder/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=78eed0a6d56fd5e4cdf71ffc7ab4e74aed62a5c9;p=u-boot.git

mx7dsabresd: Directly write to register LDOGCTL

Register LDOGCTL contains only bit 0 as a valid bit, so there is no need
to do a read-modify-write operation.

Simplify the code by writing directly to this register.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---

diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 3098e1a3dd..b9365445e8 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -578,9 +578,7 @@ int power_init_board(void)
 	printf("PMIC: PFUZE3000 DEV_ID=0x%x REV_ID=0x%x\n", reg, rev_id);
 
 	/* disable Low Power Mode during standby mode */
-	pmic_reg_read(p, PFUZE3000_LDOGCTL, &reg);
-	reg |= 0x1;
-	pmic_reg_write(p, PFUZE3000_LDOGCTL, reg);
+	pmic_reg_write(p, PFUZE3000_LDOGCTL, 0x1);
 
 	return 0;
 }