diff mbox

[U-Boot,3/3] mx7dsabresd: Directly write to register LDOGCTL

Message ID 1471437984-5281-3-git-send-email-fabio.estevam@nxp.com
State Accepted
Commit 946db0cbd01090b35eb1439fa7c4ca7e015fc18b
Delegated to: Stefano Babic
Headers show

Commit Message

Fabio Estevam Aug. 17, 2016, 12:46 p.m. UTC
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>
---
 board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Stefano Babic Sept. 6, 2016, 8:20 a.m. UTC | #1
On 17/08/2016 14:46, Fabio Estevam wrote:
> 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>
> ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
index 66d6795..0175a1b 100644
--- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
+++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
@@ -193,9 +193,7 @@  int power_init_board(void)
 		       reg, rev_id);
 
 		/* disable Low Power Mode during standby mode */
-		pmic_reg_read(pfuze, PFUZE3000_LDOGCTL, &reg);
-		reg |= 0x1;
-		pmic_reg_write(pfuze, PFUZE3000_LDOGCTL, reg);
+		pmic_reg_write(pfuze, PFUZE3000_LDOGCTL, 0x1);
 
 		/* SW1B step ramp up time from 2us to 4us/25mV */
 		reg = 0x40;