Patchwork [U-Boot] mx28: Show CPU frequency

login
register
mail settings
Submitter Fabio Estevam
Date Jan. 23, 2012, 2:38 a.m.
Message ID <1327286288-2265-1-git-send-email-festevam@gmail.com>
Download mbox | patch
Permalink /patch/137260/
State Accepted
Commit 82182720e799389aa86ae3dcc085f47f7b9dc161
Delegated to: Stefano Babic
Headers show

Comments

Fabio Estevam - Jan. 23, 2012, 2:38 a.m.
Showing CPU frequency during boot is useful information.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/cpu/arm926ejs/mx28/mx28.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Marek Vasut - Jan. 23, 2012, 4:21 a.m.
> Showing CPU frequency during boot is useful information.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  arch/arm/cpu/arm926ejs/mx28/mx28.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c
> b/arch/arm/cpu/arm926ejs/mx28/mx28.c index da90360..683777f 100644
> --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c
> +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c
> @@ -169,7 +169,8 @@ int arch_cpu_init(void)
>  #if defined(CONFIG_DISPLAY_CPUINFO)
>  int print_cpuinfo(void)
>  {
> -	printf("Freescale i.MX28 family\n");
> +	printf("Freescale i.MX28 family at %d MHz\n",
> +			mxc_get_clock(MXC_ARM_CLK) / 1000000);
>  	return 0;
>  }
>  #endif

Just put it amongst the other frequencies displayed by the clock command.
Stefano Babic - Jan. 24, 2012, 8:36 a.m.
On 23/01/2012 03:38, Fabio Estevam wrote:
> Showing CPU frequency during boot is useful information.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  arch/arm/cpu/arm926ejs/mx28/mx28.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c
> index da90360..683777f 100644
> --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c
> +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c
> @@ -169,7 +169,8 @@ int arch_cpu_init(void)
>  #if defined(CONFIG_DISPLAY_CPUINFO)
>  int print_cpuinfo(void)
>  {
> -	printf("Freescale i.MX28 family\n");
> +	printf("Freescale i.MX28 family at %d MHz\n",
> +			mxc_get_clock(MXC_ARM_CLK) / 1000000);
>  	return 0;
>  }
>  #endif

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Patch

diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c
index da90360..683777f 100644
--- a/arch/arm/cpu/arm926ejs/mx28/mx28.c
+++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c
@@ -169,7 +169,8 @@  int arch_cpu_init(void)
 #if defined(CONFIG_DISPLAY_CPUINFO)
 int print_cpuinfo(void)
 {
-	printf("Freescale i.MX28 family\n");
+	printf("Freescale i.MX28 family at %d MHz\n",
+			mxc_get_clock(MXC_ARM_CLK) / 1000000);
 	return 0;
 }
 #endif