All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] armv8: configs: ls1012a: correct the generic timer frequency issue
@ 2017-10-09  6:30 andy.tang at nxp.com
  2017-10-09 15:59 ` York Sun
  0 siblings, 1 reply; 4+ messages in thread
From: andy.tang at nxp.com @ 2017-10-09  6:30 UTC (permalink / raw)
  To: u-boot

From: Yuantian Tang <andy.tang@nxp.com>

Generic Timer frequency should be 25Mhz. Current setting is
CONFIG_SYS_CLK_FREQ/4 which is about 31Mhz, which is not correct.
So correct it.

Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
---
 include/configs/ls1012a_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h
index 096799eb64..a4e78f335f 100644
--- a/include/configs/ls1012a_common.h
+++ b/include/configs/ls1012a_common.h
@@ -32,7 +32,7 @@
 #define CONFIG_SYS_DDR_BLOCK2_BASE     0x880000000ULL
 
 /* Generic Timer Definitions */
-#define COUNTER_FREQUENCY		CONFIG_SYS_CLK_FREQ/4	/* 25MHz */
+#define COUNTER_FREQUENCY		25000000	/* 25MHz */
 
 /* CSU */
 #define CONFIG_LAYERSCAPE_NS_ACCESS
-- 
2.14.1

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

* [U-Boot] [PATCH] armv8: configs: ls1012a: correct the generic timer frequency issue
  2017-10-09  6:30 [U-Boot] [PATCH] armv8: configs: ls1012a: correct the generic timer frequency issue andy.tang at nxp.com
@ 2017-10-09 15:59 ` York Sun
  2017-10-10  1:06   ` Andy Tang
  0 siblings, 1 reply; 4+ messages in thread
From: York Sun @ 2017-10-09 15:59 UTC (permalink / raw)
  To: u-boot

On 10/08/2017 11:48 PM, andy.tang at nxp.com wrote:
> From: Yuantian Tang <andy.tang@nxp.com>
> 
> Generic Timer frequency should be 25Mhz. Current setting is
> CONFIG_SYS_CLK_FREQ/4 which is about 31Mhz, which is not correct.
> So correct it.
> 
> Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
> ---
>  include/configs/ls1012a_common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h
> index 096799eb64..a4e78f335f 100644
> --- a/include/configs/ls1012a_common.h
> +++ b/include/configs/ls1012a_common.h
> @@ -32,7 +32,7 @@
>  #define CONFIG_SYS_DDR_BLOCK2_BASE     0x880000000ULL
>  
>  /* Generic Timer Definitions */
> -#define COUNTER_FREQUENCY		CONFIG_SYS_CLK_FREQ/4	/* 25MHz */
> +#define COUNTER_FREQUENCY		25000000	/* 25MHz */
>  


Yuantian,

LS1012A use fixed 25MHz clock, doesn't it? If so, that's the reason a
fixed value should be used, not because CONFIG_SYS_CLK_FREQ/4 isn't
correct. It is correct for many other platform. Please update the commit
message.

York

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

* [U-Boot] [PATCH] armv8: configs: ls1012a: correct the generic timer frequency issue
  2017-10-09 15:59 ` York Sun
@ 2017-10-10  1:06   ` Andy Tang
  2017-10-10  4:42     ` Prabhakar Kushwaha
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Tang @ 2017-10-10  1:06 UTC (permalink / raw)
  To: u-boot

Hi York,

Ls1012a uses the fixed 25Mhz clock, I will update the commit message and resend the patch. 

Thanks,
Andy

> -----Original Message-----
> From: York Sun
> Sent: Tuesday, October 10, 2017 12:00 AM
> To: Andy Tang <andy.tang@nxp.com>
> Cc: sjg at chromium.org; u-boot at lists.denx.de
> Subject: Re: [PATCH] armv8: configs: ls1012a: correct the generic timer
> frequency issue
> 
> On 10/08/2017 11:48 PM, andy.tang at nxp.com wrote:
> > From: Yuantian Tang <andy.tang@nxp.com>
> >
> > Generic Timer frequency should be 25Mhz. Current setting is
> > CONFIG_SYS_CLK_FREQ/4 which is about 31Mhz, which is not correct.
> > So correct it.
> >
> > Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
> > ---
> >  include/configs/ls1012a_common.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/configs/ls1012a_common.h
> > b/include/configs/ls1012a_common.h
> > index 096799eb64..a4e78f335f 100644
> > --- a/include/configs/ls1012a_common.h
> > +++ b/include/configs/ls1012a_common.h
> > @@ -32,7 +32,7 @@
> >  #define CONFIG_SYS_DDR_BLOCK2_BASE     0x880000000ULL
> >
> >  /* Generic Timer Definitions */
> > -#define COUNTER_FREQUENCY		CONFIG_SYS_CLK_FREQ/4
> 	/* 25MHz */
> > +#define COUNTER_FREQUENCY		25000000	/* 25MHz */
> >
> 
> 
> Yuantian,
> 
> LS1012A use fixed 25MHz clock, doesn't it? If so, that's the reason a fixed
> value should be used, not because CONFIG_SYS_CLK_FREQ/4 isn't correct. It
> is correct for many other platform. Please update the commit message.
> 
> York
> 

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

* [U-Boot] [PATCH] armv8: configs: ls1012a: correct the generic timer frequency issue
  2017-10-10  1:06   ` Andy Tang
@ 2017-10-10  4:42     ` Prabhakar Kushwaha
  0 siblings, 0 replies; 4+ messages in thread
From: Prabhakar Kushwaha @ 2017-10-10  4:42 UTC (permalink / raw)
  To: u-boot

Hi York,


> -----Original Message-----
> From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Andy Tang
> Sent: Tuesday, October 10, 2017 6:36 AM
> To: York Sun <york.sun@nxp.com>
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] [PATCH] armv8: configs: ls1012a: correct the generic timer
> frequency issue
> 
> Hi York,
> 
> Ls1012a uses the fixed 25Mhz clock, I will update the commit message and
> resend the patch.
> 
> Thanks,
> Andy
> 
> > -----Original Message-----
> > From: York Sun
> > Sent: Tuesday, October 10, 2017 12:00 AM
> > To: Andy Tang <andy.tang@nxp.com>
> > Cc: sjg at chromium.org; u-boot at lists.denx.de
> > Subject: Re: [PATCH] armv8: configs: ls1012a: correct the generic timer
> > frequency issue
> >
> > On 10/08/2017 11:48 PM, andy.tang at nxp.com wrote:
> > > From: Yuantian Tang <andy.tang@nxp.com>
> > >
> > > Generic Timer frequency should be 25Mhz. Current setting is
> > > CONFIG_SYS_CLK_FREQ/4 which is about 31Mhz, which is not correct.
> > > So correct it.
> > >
> > > Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
> > > ---
> > >  include/configs/ls1012a_common.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/include/configs/ls1012a_common.h
> > > b/include/configs/ls1012a_common.h
> > > index 096799eb64..a4e78f335f 100644
> > > --- a/include/configs/ls1012a_common.h
> > > +++ b/include/configs/ls1012a_common.h
> > > @@ -32,7 +32,7 @@
> > >  #define CONFIG_SYS_DDR_BLOCK2_BASE     0x880000000ULL
> > >
> > >  /* Generic Timer Definitions */
> > > -#define COUNTER_FREQUENCY		CONFIG_SYS_CLK_FREQ/4
> > 	/* 25MHz */
> > > +#define COUNTER_FREQUENCY		25000000	/* 25MHz */
> > >
> >
> >
> > Yuantian,
> >
> > LS1012A use fixed 25MHz clock, doesn't it? If so, that's the reason a fixed
> > value should be used, not because CONFIG_SYS_CLK_FREQ/4 isn't correct. It
> > is correct for many other platform. Please update the commit message.
> >


LS1012A has fixed external clock 25MHz which generates following 2 internal clocks
- Core clock (100MHz)
- Platform clock (133MHz)

System counter run with  Core clock i.e. 100MHz. 

So patch description should mention reference of Core Clock instead of external 25MHz fix clock. 

--pk

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

end of thread, other threads:[~2017-10-10  4:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-09  6:30 [U-Boot] [PATCH] armv8: configs: ls1012a: correct the generic timer frequency issue andy.tang at nxp.com
2017-10-09 15:59 ` York Sun
2017-10-10  1:06   ` Andy Tang
2017-10-10  4:42     ` Prabhakar Kushwaha

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.