All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2]  i.MX28: bug fixes in PMU configuration code
@ 2012-07-27  8:53 Stathis Voukelatos
  2012-07-27 14:18 ` Marek Vasut
  2012-07-29 10:13 ` Stefano Babic
  0 siblings, 2 replies; 6+ messages in thread
From: Stathis Voukelatos @ 2012-07-27  8:53 UTC (permalink / raw)
  To: u-boot

Fixed some typos in the i.MX28 PMU code that sets up the VDDD and VDDIO power rails. In addition the VDDD and VDDIO brownout offset values should be divided by a step size before being programmed to the corresponding registers.

Signed-off-by: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
---

Changes for v2:
	- White space cleanup
 
 arch/arm/cpu/arm926ejs/mx28/spl_power_init.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git arch/arm/cpu/arm926ejs/mx28/spl_power_init.c arch/arm/cpu/arm926ejs/mx28/spl_power_init.c
index 4b09b0c..cc71af8 100644
--- arch/arm/cpu/arm926ejs/mx28/spl_power_init.c
+++ arch/arm/cpu/arm926ejs/mx28/spl_power_init.c
@@ -716,7 +716,7 @@ int mx28_get_vddio_power_source_off(void)
 		tmp = readl(&power_regs->hw_power_vddioctrl);
 		if (tmp & POWER_VDDIOCTRL_DISABLE_FET) {
 			if ((tmp & POWER_VDDIOCTRL_LINREG_OFFSET_MASK) ==
-				POWER_VDDDCTRL_LINREG_OFFSET_0STEPS) {
+				POWER_VDDIOCTRL_LINREG_OFFSET_0STEPS) {
 				return 1;
 			}
 		}
@@ -724,7 +724,7 @@ int mx28_get_vddio_power_source_off(void)
 		if (!(readl(&power_regs->hw_power_5vctrl) &
 			POWER_5VCTRL_ENABLE_DCDC)) {
 			if ((tmp & POWER_VDDIOCTRL_LINREG_OFFSET_MASK) ==
-				POWER_VDDDCTRL_LINREG_OFFSET_0STEPS) {
+				POWER_VDDIOCTRL_LINREG_OFFSET_0STEPS) {
 				return 1;
 			}
 		}
@@ -772,7 +772,7 @@ void mx28_power_set_vddio(uint32_t new_target, uint32_t new_brownout)
 	uint32_t cur_target, diff, bo_int = 0;
 	uint32_t powered_by_linreg = 0;
 
-	new_brownout = new_target - new_brownout;
+	new_brownout = (new_target - new_brownout + 25) / 50;
 
 	cur_target = readl(&power_regs->hw_power_vddioctrl);
 	cur_target &= POWER_VDDIOCTRL_TRG_MASK; @@ -858,8 +858,8 @@ void mx28_power_set_vddio(uint32_t new_target, uint32_t new_brownout)
 	}
 
 	clrsetbits_le32(&power_regs->hw_power_vddioctrl,
-			POWER_VDDDCTRL_BO_OFFSET_MASK,
-			new_brownout << POWER_VDDDCTRL_BO_OFFSET_OFFSET);
+			POWER_VDDIOCTRL_BO_OFFSET_MASK,
+			new_brownout << POWER_VDDIOCTRL_BO_OFFSET_OFFSET);
 }
 
 void mx28_power_set_vddd(uint32_t new_target, uint32_t new_brownout) @@ -869,7 +869,7 @@ void mx28_power_set_vddd(uint32_t new_target, uint32_t new_brownout)
 	uint32_t cur_target, diff, bo_int = 0;
 	uint32_t powered_by_linreg = 0;
 
-	new_brownout = new_target - new_brownout;
+	new_brownout = (new_target - new_brownout + 12) / 25;
 
 	cur_target = readl(&power_regs->hw_power_vdddctrl);
 	cur_target &= POWER_VDDDCTRL_TRG_MASK;
--
1.7.2.5


Stathis Voukelatos
Senior Software Engineer
Linn Products Ltd.
Glasgow Road
Eaglesham, Glasgow
G76 0EQ, UK
Tel: +44 (0)141 3035191
Email: stathis.voukelatos at linn.co.uk

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

* [U-Boot] [PATCH v2] i.MX28: bug fixes in PMU configuration code
  2012-07-27  8:53 [U-Boot] [PATCH v2] i.MX28: bug fixes in PMU configuration code Stathis Voukelatos
@ 2012-07-27 14:18 ` Marek Vasut
  2012-07-29 10:13 ` Stefano Babic
  1 sibling, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2012-07-27 14:18 UTC (permalink / raw)
  To: u-boot

Dear Stathis Voukelatos,

> Fixed some typos in the i.MX28 PMU code that sets up the VDDD and VDDIO
> power rails. In addition the VDDD and VDDIO brownout offset values should
> be divided by a step size before being programmed to the corresponding
> registers.
> 
> Signed-off-by: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Marek Vasut <marek.vasut@gmail.com>
[...]

Acked-by: Marek Vasut <marex@denx.de>

Stefano, can you please apply?

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH v2] i.MX28: bug fixes in PMU configuration code
  2012-07-27  8:53 [U-Boot] [PATCH v2] i.MX28: bug fixes in PMU configuration code Stathis Voukelatos
  2012-07-27 14:18 ` Marek Vasut
@ 2012-07-29 10:13 ` Stefano Babic
  2012-08-07 14:56   ` [U-Boot] [RESEND PATCH " Stathis Voukelatos
  1 sibling, 1 reply; 6+ messages in thread
From: Stefano Babic @ 2012-07-29 10:13 UTC (permalink / raw)
  To: u-boot

On 27/07/2012 10:53, Stathis Voukelatos wrote:
> Fixed some typos in the i.MX28 PMU code that sets up the VDDD and VDDIO power rails. In addition the VDDD and VDDIO brownout offset values should be divided by a step size before being programmed to the corresponding registers.
> 
> Signed-off-by: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Marek Vasut <marek.vasut@gmail.com>
> ---
> 

Hi Stathis,

your patch looks ok but it is mangled by your e-mailer. See how
patchwork shows your patch at:


	http://patchwork.ozlabs.org/patch/173592/

Part of your patch is moved into the comments and some characters are
replaced.

Your patch is surely ok because you use git-format-patch. Can you check
this issue and resend it, possibly using git send-email that avoids
these kind of problems ? Thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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] [RESEND PATCH v2] i.MX28: bug fixes in PMU configuration code
  2012-07-29 10:13 ` Stefano Babic
@ 2012-08-07 14:56   ` Stathis Voukelatos
  2012-08-07 15:47     ` Stefano Babic
  2012-08-07 19:15     ` Marek Vasut
  0 siblings, 2 replies; 6+ messages in thread
From: Stathis Voukelatos @ 2012-08-07 14:56 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
---

Changes for v2:
	- White space cleanup

 arch/arm/cpu/arm926ejs/mx28/spl_power_init.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/mx28/spl_power_init.c b/arch/arm/cpu/arm926ejs/mx28/spl_power_init.c
index 4b09b0c..cc71af8 100644
--- a/arch/arm/cpu/arm926ejs/mx28/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mx28/spl_power_init.c
@@ -716,7 +716,7 @@ int mx28_get_vddio_power_source_off(void)
 		tmp = readl(&power_regs->hw_power_vddioctrl);
 		if (tmp & POWER_VDDIOCTRL_DISABLE_FET) {
 			if ((tmp & POWER_VDDIOCTRL_LINREG_OFFSET_MASK) ==
-				POWER_VDDDCTRL_LINREG_OFFSET_0STEPS) {
+				POWER_VDDIOCTRL_LINREG_OFFSET_0STEPS) {
 				return 1;
 			}
 		}
@@ -724,7 +724,7 @@ int mx28_get_vddio_power_source_off(void)
 		if (!(readl(&power_regs->hw_power_5vctrl) &
 			POWER_5VCTRL_ENABLE_DCDC)) {
 			if ((tmp & POWER_VDDIOCTRL_LINREG_OFFSET_MASK) ==
-				POWER_VDDDCTRL_LINREG_OFFSET_0STEPS) {
+				POWER_VDDIOCTRL_LINREG_OFFSET_0STEPS) {
 				return 1;
 			}
 		}
@@ -772,7 +772,7 @@ void mx28_power_set_vddio(uint32_t new_target, uint32_t new_brownout)
 	uint32_t cur_target, diff, bo_int = 0;
 	uint32_t powered_by_linreg = 0;
 
-	new_brownout = new_target - new_brownout;
+	new_brownout = (new_target - new_brownout + 25) / 50;
 
 	cur_target = readl(&power_regs->hw_power_vddioctrl);
 	cur_target &= POWER_VDDIOCTRL_TRG_MASK;
@@ -858,8 +858,8 @@ void mx28_power_set_vddio(uint32_t new_target, uint32_t new_brownout)
 	}
 
 	clrsetbits_le32(&power_regs->hw_power_vddioctrl,
-			POWER_VDDDCTRL_BO_OFFSET_MASK,
-			new_brownout << POWER_VDDDCTRL_BO_OFFSET_OFFSET);
+			POWER_VDDIOCTRL_BO_OFFSET_MASK,
+			new_brownout << POWER_VDDIOCTRL_BO_OFFSET_OFFSET);
 }
 
 void mx28_power_set_vddd(uint32_t new_target, uint32_t new_brownout)
@@ -869,7 +869,7 @@ void mx28_power_set_vddd(uint32_t new_target, uint32_t new_brownout)
 	uint32_t cur_target, diff, bo_int = 0;
 	uint32_t powered_by_linreg = 0;
 
-	new_brownout = new_target - new_brownout;
+	new_brownout = (new_target - new_brownout + 12) / 25;
 
 	cur_target = readl(&power_regs->hw_power_vdddctrl);
 	cur_target &= POWER_VDDDCTRL_TRG_MASK;
-- 
1.7.2.5

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

* [U-Boot] [RESEND PATCH v2] i.MX28: bug fixes in PMU configuration code
  2012-08-07 14:56   ` [U-Boot] [RESEND PATCH " Stathis Voukelatos
@ 2012-08-07 15:47     ` Stefano Babic
  2012-08-07 19:15     ` Marek Vasut
  1 sibling, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2012-08-07 15:47 UTC (permalink / raw)
  To: u-boot

On 07/08/2012 16:56, Stathis Voukelatos wrote:
> Signed-off-by: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Marek Vasut <marek.vasut@gmail.com>
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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] [RESEND PATCH v2] i.MX28: bug fixes in PMU configuration code
  2012-08-07 14:56   ` [U-Boot] [RESEND PATCH " Stathis Voukelatos
  2012-08-07 15:47     ` Stefano Babic
@ 2012-08-07 19:15     ` Marek Vasut
  1 sibling, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2012-08-07 19:15 UTC (permalink / raw)
  To: u-boot

Dear Stathis Voukelatos,

> Signed-off-by: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Marek Vasut <marek.vasut@gmail.com>
> ---

Thanks for the patch and your effort !

btw. how did you find it ? :)

Best regards,
Marek Vasut

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

end of thread, other threads:[~2012-08-07 19:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-27  8:53 [U-Boot] [PATCH v2] i.MX28: bug fixes in PMU configuration code Stathis Voukelatos
2012-07-27 14:18 ` Marek Vasut
2012-07-29 10:13 ` Stefano Babic
2012-08-07 14:56   ` [U-Boot] [RESEND PATCH " Stathis Voukelatos
2012-08-07 15:47     ` Stefano Babic
2012-08-07 19:15     ` Marek Vasut

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.