All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] pico-imx6ul: Directly write to register LDOGCTL
@ 2016-08-17 12:46 Fabio Estevam
  2016-08-17 12:46 ` [U-Boot] [PATCH 2/3] mx7dsabresd: " Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Fabio Estevam @ 2016-08-17 12:46 UTC (permalink / raw)
  To: u-boot

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/technexion/pico-imx6ul/pico-imx6ul.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c
index 5cbf803..49aeb80 100644
--- a/board/technexion/pico-imx6ul/pico-imx6ul.c
+++ b/board/technexion/pico-imx6ul/pico-imx6ul.c
@@ -231,9 +231,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(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 */
 	pmic_reg_write(pfuze, PFUZE3000_SW1BCONF, 0x40);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/3] mx7dsabresd: Directly write to register LDOGCTL
  2016-08-17 12:46 [U-Boot] [PATCH 1/3] pico-imx6ul: Directly write to register LDOGCTL Fabio Estevam
@ 2016-08-17 12:46 ` Fabio Estevam
  2016-09-06  8:20   ` Stefano Babic
  2016-08-17 12:46 ` [U-Boot] [PATCH 3/3] " Fabio Estevam
  2016-09-06  8:19 ` [U-Boot] [PATCH 1/3] pico-imx6ul: " Stefano Babic
  2 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2016-08-17 12:46 UTC (permalink / raw)
  To: u-boot

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/mx7dsabresd/mx7dsabresd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 3098e1a..b936544 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;
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 3/3] mx7dsabresd: Directly write to register LDOGCTL
  2016-08-17 12:46 [U-Boot] [PATCH 1/3] pico-imx6ul: Directly write to register LDOGCTL Fabio Estevam
  2016-08-17 12:46 ` [U-Boot] [PATCH 2/3] mx7dsabresd: " Fabio Estevam
@ 2016-08-17 12:46 ` Fabio Estevam
  2016-09-06  8:20   ` Stefano Babic
  2016-09-06  8:19 ` [U-Boot] [PATCH 1/3] pico-imx6ul: " Stefano Babic
  2 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2016-08-17 12:46 UTC (permalink / raw)
  To: u-boot

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(-)

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;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/3] pico-imx6ul: Directly write to register LDOGCTL
  2016-08-17 12:46 [U-Boot] [PATCH 1/3] pico-imx6ul: Directly write to register LDOGCTL Fabio Estevam
  2016-08-17 12:46 ` [U-Boot] [PATCH 2/3] mx7dsabresd: " Fabio Estevam
  2016-08-17 12:46 ` [U-Boot] [PATCH 3/3] " Fabio Estevam
@ 2016-09-06  8:19 ` Stefano Babic
  2 siblings, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2016-09-06  8:19 UTC (permalink / raw)
  To: u-boot

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



-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/3] mx7dsabresd: Directly write to register LDOGCTL
  2016-08-17 12:46 ` [U-Boot] [PATCH 2/3] mx7dsabresd: " Fabio Estevam
@ 2016-09-06  8:20   ` Stefano Babic
  0 siblings, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2016-09-06  8:20 UTC (permalink / raw)
  To: u-boot

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



-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 3/3] mx7dsabresd: Directly write to register LDOGCTL
  2016-08-17 12:46 ` [U-Boot] [PATCH 3/3] " Fabio Estevam
@ 2016-09-06  8:20   ` Stefano Babic
  0 siblings, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2016-09-06  8:20 UTC (permalink / raw)
  To: u-boot

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



-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-06  8:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-17 12:46 [U-Boot] [PATCH 1/3] pico-imx6ul: Directly write to register LDOGCTL Fabio Estevam
2016-08-17 12:46 ` [U-Boot] [PATCH 2/3] mx7dsabresd: " Fabio Estevam
2016-09-06  8:20   ` Stefano Babic
2016-08-17 12:46 ` [U-Boot] [PATCH 3/3] " Fabio Estevam
2016-09-06  8:20   ` Stefano Babic
2016-09-06  8:19 ` [U-Boot] [PATCH 1/3] pico-imx6ul: " Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.