All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mx6: Fix calculation of emi_slow clock rate
@ 2013-07-04 11:27 Andrew Gabbasov
  2013-07-04 11:36 ` Dirk Behme
  2013-09-10 17:00 ` Stefano Babic
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Gabbasov @ 2013-07-04 11:27 UTC (permalink / raw)
  To: u-boot

This is porting of Freescale's patch from version imx_v2009.08_3.0.35_4.0.0,
that fixes the obvious mistype of bits offset macro name (ACLK_EMI_PODF_OFFSET
was used instead of ACLK_EMI_SLOW_PODF_OFFSET).

Using the occasion, change the variable name 'emi_slow_pof' to more consistent
'emi_slow_podf'.

Signed-off-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
---
 arch/arm/cpu/armv7/mx6/clock.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
index 3c0d908..064f8c8 100644
--- a/arch/arm/cpu/armv7/mx6/clock.c
+++ b/arch/arm/cpu/armv7/mx6/clock.c
@@ -244,13 +244,13 @@ static u32 get_axi_clk(void)
 
 static u32 get_emi_slow_clk(void)
 {
-	u32 emi_clk_sel, emi_slow_pof, cscmr1, root_freq = 0;
+	u32 emi_clk_sel, emi_slow_podf, cscmr1, root_freq = 0;
 
 	cscmr1 =  __raw_readl(&imx_ccm->cscmr1);
 	emi_clk_sel = cscmr1 & MXC_CCM_CSCMR1_ACLK_EMI_SLOW_MASK;
 	emi_clk_sel >>= MXC_CCM_CSCMR1_ACLK_EMI_SLOW_OFFSET;
-	emi_slow_pof = cscmr1 & MXC_CCM_CSCMR1_ACLK_EMI_SLOW_PODF_MASK;
-	emi_slow_pof >>= MXC_CCM_CSCMR1_ACLK_EMI_PODF_OFFSET;
+	emi_slow_podf = cscmr1 & MXC_CCM_CSCMR1_ACLK_EMI_SLOW_PODF_MASK;
+	emi_slow_podf >>= MXC_CCM_CSCMR1_ACLK_EMI_SLOW_PODF_OFFSET;
 
 	switch (emi_clk_sel) {
 	case 0:
@@ -267,7 +267,7 @@ static u32 get_emi_slow_clk(void)
 		break;
 	}
 
-	return root_freq / (emi_slow_pof + 1);
+	return root_freq / (emi_slow_podf + 1);
 }
 
 #ifdef CONFIG_MX6SL
-- 
1.7.10.4

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

* [U-Boot] [PATCH] mx6: Fix calculation of emi_slow clock rate
  2013-07-04 11:27 [U-Boot] [PATCH] mx6: Fix calculation of emi_slow clock rate Andrew Gabbasov
@ 2013-07-04 11:36 ` Dirk Behme
  2013-09-10 17:00 ` Stefano Babic
  1 sibling, 0 replies; 3+ messages in thread
From: Dirk Behme @ 2013-07-04 11:36 UTC (permalink / raw)
  To: u-boot

On 04.07.2013 13:27, Andrew Gabbasov wrote:
> This is porting of Freescale's patch from version imx_v2009.08_3.0.35_4.0.0,
> that fixes the obvious mistype of bits offset macro name (ACLK_EMI_PODF_OFFSET
> was used instead of ACLK_EMI_SLOW_PODF_OFFSET).
>
> Using the occasion, change the variable name 'emi_slow_pof' to more consistent
> 'emi_slow_podf'.
>
> Signed-off-by: Jason Liu <r64343@freescale.com>
> Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>

Acked-by: Dirk Behme <dirk.behme@de.bosch.com>

Thanks

Dirk

> ---
>   arch/arm/cpu/armv7/mx6/clock.c |    8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
> index 3c0d908..064f8c8 100644
> --- a/arch/arm/cpu/armv7/mx6/clock.c
> +++ b/arch/arm/cpu/armv7/mx6/clock.c
> @@ -244,13 +244,13 @@ static u32 get_axi_clk(void)
>
>   static u32 get_emi_slow_clk(void)
>   {
> -	u32 emi_clk_sel, emi_slow_pof, cscmr1, root_freq = 0;
> +	u32 emi_clk_sel, emi_slow_podf, cscmr1, root_freq = 0;
>
>   	cscmr1 =  __raw_readl(&imx_ccm->cscmr1);
>   	emi_clk_sel = cscmr1 & MXC_CCM_CSCMR1_ACLK_EMI_SLOW_MASK;
>   	emi_clk_sel >>= MXC_CCM_CSCMR1_ACLK_EMI_SLOW_OFFSET;
> -	emi_slow_pof = cscmr1 & MXC_CCM_CSCMR1_ACLK_EMI_SLOW_PODF_MASK;
> -	emi_slow_pof >>= MXC_CCM_CSCMR1_ACLK_EMI_PODF_OFFSET;
> +	emi_slow_podf = cscmr1 & MXC_CCM_CSCMR1_ACLK_EMI_SLOW_PODF_MASK;
> +	emi_slow_podf >>= MXC_CCM_CSCMR1_ACLK_EMI_SLOW_PODF_OFFSET;
>
>   	switch (emi_clk_sel) {
>   	case 0:
> @@ -267,7 +267,7 @@ static u32 get_emi_slow_clk(void)
>   		break;
>   	}
>
> -	return root_freq / (emi_slow_pof + 1);
> +	return root_freq / (emi_slow_podf + 1);
>   }
>
>   #ifdef CONFIG_MX6SL
>

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

* [U-Boot] [PATCH] mx6: Fix calculation of emi_slow clock rate
  2013-07-04 11:27 [U-Boot] [PATCH] mx6: Fix calculation of emi_slow clock rate Andrew Gabbasov
  2013-07-04 11:36 ` Dirk Behme
@ 2013-09-10 17:00 ` Stefano Babic
  1 sibling, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2013-09-10 17:00 UTC (permalink / raw)
  To: u-boot

On 04/07/2013 13:27, Andrew Gabbasov wrote:
> This is porting of Freescale's patch from version imx_v2009.08_3.0.35_4.0.0,
> that fixes the obvious mistype of bits offset macro name (ACLK_EMI_PODF_OFFSET
> was used instead of ACLK_EMI_SLOW_PODF_OFFSET).
> 
> Using the occasion, change the variable name 'emi_slow_pof' to more consistent
> 'emi_slow_podf'.
> 
> Signed-off-by: Jason Liu <r64343@freescale.com>
> Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.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] 3+ messages in thread

end of thread, other threads:[~2013-09-10 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-04 11:27 [U-Boot] [PATCH] mx6: Fix calculation of emi_slow clock rate Andrew Gabbasov
2013-07-04 11:36 ` Dirk Behme
2013-09-10 17:00 ` 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.