All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mx28: Show CPU frequency
@ 2012-01-23  2:38 Fabio Estevam
  2012-01-23  4:21 ` Marek Vasut
  2012-01-24  8:36 ` Stefano Babic
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2012-01-23  2:38 UTC (permalink / raw)
  To: u-boot

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
-- 
1.7.1

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

* [U-Boot] [PATCH] mx28: Show CPU frequency
  2012-01-23  2:38 [U-Boot] [PATCH] mx28: Show CPU frequency Fabio Estevam
@ 2012-01-23  4:21 ` Marek Vasut
  2012-01-23 15:52   ` Fabio Estevam
  2012-01-24  8:36 ` Stefano Babic
  1 sibling, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2012-01-23  4:21 UTC (permalink / raw)
  To: u-boot

> 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.

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

* [U-Boot] [PATCH] mx28: Show CPU frequency
  2012-01-23  4:21 ` Marek Vasut
@ 2012-01-23 15:52   ` Fabio Estevam
  2012-01-23 16:02     ` Stefano Babic
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2012-01-23 15:52 UTC (permalink / raw)
  To: u-boot

On 1/23/12, Marek Vasut <marek.vasut@gmail.com> wrote:

> Just put it amongst the other frequencies displayed by the clock command.

What about this?

--- a/arch/arm/cpu/arm926ejs/mx28/mx28.c
+++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c
@@ -170,6 +170,7 @@ int arch_cpu_init(void)
 int print_cpuinfo(void)
 {
        printf("Freescale i.MX28 family\n");
+       do_mx28_showclocks();
        return 0;
 }
 #endif

It will print a lot more info though.

Regards,

Fabio Estevam

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

* [U-Boot] [PATCH] mx28: Show CPU frequency
  2012-01-23 15:52   ` Fabio Estevam
@ 2012-01-23 16:02     ` Stefano Babic
  2012-01-23 16:52       ` Marek Vasut
  0 siblings, 1 reply; 6+ messages in thread
From: Stefano Babic @ 2012-01-23 16:02 UTC (permalink / raw)
  To: u-boot

On 23/01/2012 16:52, Fabio Estevam wrote:
> On 1/23/12, Marek Vasut <marek.vasut@gmail.com> wrote:
> 
>> Just put it amongst the other frequencies displayed by the clock command.
> 
> What about this?
> 
> --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c
> +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c
> @@ -170,6 +170,7 @@ int arch_cpu_init(void)
>  int print_cpuinfo(void)
>  {
>         printf("Freescale i.MX28 family\n");
> +       do_mx28_showclocks();
>         return 0;
>  }
>  #endif
> 
> It will print a lot more info though.

Well, this is the reason we have a separate function / command (clocks)
that can be called only when needed. Generally, we avoid to print too
much information if they are not required and can slow down the boot
process.

In print_cpuinfo() we output the processor type, the revision if it is
available and maybe the processor frequency - nothing more. And if we
need a complete overview of the clocks, there is the "clocks" command.

So really I prefer the patch as it is - the information printed are the
same as for other SOCs, not only i.MX.

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-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

* [U-Boot] [PATCH] mx28: Show CPU frequency
  2012-01-23 16:02     ` Stefano Babic
@ 2012-01-23 16:52       ` Marek Vasut
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2012-01-23 16:52 UTC (permalink / raw)
  To: u-boot

> On 23/01/2012 16:52, Fabio Estevam wrote:
> > On 1/23/12, Marek Vasut <marek.vasut@gmail.com> wrote:
> >> Just put it amongst the other frequencies displayed by the clock
> >> command.
> > 
> > What about this?
> > 
> > --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c
> > +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c
> > @@ -170,6 +170,7 @@ int arch_cpu_init(void)
> > 
> >  int print_cpuinfo(void)
> >  {
> >  
> >         printf("Freescale i.MX28 family\n");
> > 
> > +       do_mx28_showclocks();
> > 
> >         return 0;
> >  
> >  }
> >  #endif
> > 
> > It will print a lot more info though.
> 
> Well, this is the reason we have a separate function / command (clocks)
> that can be called only when needed. Generally, we avoid to print too
> much information if they are not required and can slow down the boot
> process.
> 
> In print_cpuinfo() we output the processor type, the revision if it is
> available and maybe the processor frequency - nothing more. And if we
> need a complete overview of the clocks, there is the "clocks" command.
> 
> So really I prefer the patch as it is - the information printed are the
> same as for other SOCs, not only i.MX.
> 
> Best regards,
> Stefano Babic

Ok, fine by me then.

Acked-by: Marek Vasut <marek.vasut@gmail.com>

M

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

* [U-Boot] [PATCH] mx28: Show CPU frequency
  2012-01-23  2:38 [U-Boot] [PATCH] mx28: Show CPU frequency Fabio Estevam
  2012-01-23  4:21 ` Marek Vasut
@ 2012-01-24  8:36 ` Stefano Babic
  1 sibling, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2012-01-24  8:36 UTC (permalink / raw)
  To: u-boot

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

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

end of thread, other threads:[~2012-01-24  8:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-23  2:38 [U-Boot] [PATCH] mx28: Show CPU frequency Fabio Estevam
2012-01-23  4:21 ` Marek Vasut
2012-01-23 15:52   ` Fabio Estevam
2012-01-23 16:02     ` Stefano Babic
2012-01-23 16:52       ` Marek Vasut
2012-01-24  8:36 ` 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.