* [U-Boot] [PATCH] arm: ls102xa: Remove reduplicate definition for Generic Timer frequency
@ 2016-09-23 8:03 Alison Wang
2016-10-05 16:06 ` york sun
0 siblings, 1 reply; 4+ messages in thread
From: Alison Wang @ 2016-09-23 8:03 UTC (permalink / raw)
To: u-boot
GENERIC_TIMER_CLK and CONFIG_TIMER_CLK_FREQ are both used to define
Generic Timer frequency. It is reduplicate. This patch will remove
GENERIC_TIMER_CLK macro.
Signed-off-by: Alison Wang <alison.wang@nxp.com>
---
arch/arm/cpu/armv7/ls102xa/psci.S | 2 +-
arch/arm/cpu/armv7/ls102xa/timer.c | 2 +-
include/configs/ls1021aqds.h | 5 -----
include/configs/ls1021atwr.h | 5 -----
4 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/arch/arm/cpu/armv7/ls102xa/psci.S b/arch/arm/cpu/armv7/ls102xa/psci.S
index 8f38680..9efb6d8 100644
--- a/arch/arm/cpu/armv7/ls102xa/psci.S
+++ b/arch/arm/cpu/armv7/ls102xa/psci.S
@@ -36,7 +36,7 @@
.align 5
-#define ONE_MS (GENERIC_TIMER_CLK / 1000)
+#define ONE_MS (CONFIG_TIMER_CLK_FREQ / 1000)
#define RESET_WAIT (30 * ONE_MS)
.globl psci_version
diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c
index e6a32ca..c926877 100644
--- a/arch/arm/cpu/armv7/ls102xa/timer.c
+++ b/arch/arm/cpu/armv7/ls102xa/timer.c
@@ -62,7 +62,7 @@ int timer_init(void)
/* Enable System Counter */
writel(SYS_COUNTER_CTRL_ENABLE, &sctr->cntcr);
- freq = GENERIC_TIMER_CLK;
+ freq = CONFIG_TIMER_CLK_FREQ;
asm("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq));
/* Set PL1 Physical Timer Ctrl */
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 554c13c..374c705 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -34,11 +34,6 @@
#define CONFIG_SYS_INIT_RAM_ADDR OCRAM_BASE_ADDR
#define CONFIG_SYS_INIT_RAM_SIZE OCRAM_SIZE
-/*
- * Generic Timer Definitions
- */
-#define GENERIC_TIMER_CLK 12500000
-
#ifndef __ASSEMBLY__
unsigned long get_board_sys_clk(void);
unsigned long get_board_ddr_clk(void);
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index e5ac50e..af9d08b 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -63,11 +63,6 @@
#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
#endif
-/*
- * Generic Timer Definitions
- */
-#define GENERIC_TIMER_CLK 12500000
-
#define CONFIG_SYS_CLK_FREQ 100000000
#define CONFIG_DDR_CLK_FREQ 100000000
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] arm: ls102xa: Remove reduplicate definition for Generic Timer frequency
2016-09-23 8:03 [U-Boot] [PATCH] arm: ls102xa: Remove reduplicate definition for Generic Timer frequency Alison Wang
@ 2016-10-05 16:06 ` york sun
0 siblings, 0 replies; 4+ messages in thread
From: york sun @ 2016-10-05 16:06 UTC (permalink / raw)
To: u-boot
On 09/23/2016 01:15 AM, Alison Wang wrote:
> GENERIC_TIMER_CLK and CONFIG_TIMER_CLK_FREQ are both used to define
> Generic Timer frequency. It is reduplicate. This patch will remove
> GENERIC_TIMER_CLK macro.
>
> Signed-off-by: Alison Wang <alison.wang@nxp.com>
> ---
> arch/arm/cpu/armv7/ls102xa/psci.S | 2 +-
> arch/arm/cpu/armv7/ls102xa/timer.c | 2 +-
> include/configs/ls1021aqds.h | 5 -----
> include/configs/ls1021atwr.h | 5 -----
> 4 files changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/ls102xa/psci.S b/arch/arm/cpu/armv7/ls102xa/psci.S
> index 8f38680..9efb6d8 100644
> --- a/arch/arm/cpu/armv7/ls102xa/psci.S
> +++ b/arch/arm/cpu/armv7/ls102xa/psci.S
> @@ -36,7 +36,7 @@
>
> .align 5
>
> -#define ONE_MS (GENERIC_TIMER_CLK / 1000)
> +#define ONE_MS (CONFIG_TIMER_CLK_FREQ / 1000)
> #define RESET_WAIT (30 * ONE_MS)
>
Alison,
Can you use GENERIC_TIMER_CLK? Recent change in U-Boot doesn't favor
using CONFIG_* macros.
York
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] arm: ls102xa: Remove reduplicate definition for Generic Timer frequency
2016-10-08 2:21 Alison Wang
@ 2016-10-08 17:00 ` york sun
0 siblings, 0 replies; 4+ messages in thread
From: york sun @ 2016-10-08 17:00 UTC (permalink / raw)
To: u-boot
On 10/07/2016 07:21 PM, Alison Wang wrote:
> Hi, York,
>
>> On 09/23/2016 01:15 AM, Alison Wang wrote:
>>> GENERIC_TIMER_CLK and CONFIG_TIMER_CLK_FREQ are both used to define
>>> Generic Timer frequency. It is reduplicate. This patch will remove
>>> GENERIC_TIMER_CLK macro.
>>>
>>> Signed-off-by: Alison Wang <alison.wang@nxp.com>
>>> ---
>>> arch/arm/cpu/armv7/ls102xa/psci.S | 2 +-
>>> arch/arm/cpu/armv7/ls102xa/timer.c | 2 +-
>>> include/configs/ls1021aqds.h | 5 -----
>>> include/configs/ls1021atwr.h | 5 -----
>>> 4 files changed, 2 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/arch/arm/cpu/armv7/ls102xa/psci.S
>>> b/arch/arm/cpu/armv7/ls102xa/psci.S
>>> index 8f38680..9efb6d8 100644
>>> --- a/arch/arm/cpu/armv7/ls102xa/psci.S
>>> +++ b/arch/arm/cpu/armv7/ls102xa/psci.S
>>> @@ -36,7 +36,7 @@
>>>
>>> .align 5
>>>
>>> -#define ONE_MS (GENERIC_TIMER_CLK / 1000)
>>> +#define ONE_MS (CONFIG_TIMER_CLK_FREQ / 1000)
>>> #define RESET_WAIT (30 * ONE_MS)
>>>
>>
>> Alison,
>>
>> Can you use GENERIC_TIMER_CLK? Recent change in U-Boot doesn't favor
>> using CONFIG_* macros.
> [Alison Wang] If GENERIC_TIMER_CLK is used and CONFIG_TIMER_CLK_FREQ is removed,
> I need to modify the generic codes which use CONFIG_TIMER_CLK_FREQ in
> arch/arm/cpu/armv7/nonsec_virt.S. Some other platforms may be affected. So I
> remove GENERIC_TIMER_CLK in v1.
>
> What's your idea?
>
If it is too much change, then keep your current patch. We will come
back to these CONFIG_* macros later anyway.
York
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] arm: ls102xa: Remove reduplicate definition for Generic Timer frequency
@ 2016-10-08 2:21 Alison Wang
2016-10-08 17:00 ` york sun
0 siblings, 1 reply; 4+ messages in thread
From: Alison Wang @ 2016-10-08 2:21 UTC (permalink / raw)
To: u-boot
Hi, York,
> On 09/23/2016 01:15 AM, Alison Wang wrote:
> > GENERIC_TIMER_CLK and CONFIG_TIMER_CLK_FREQ are both used to define
> > Generic Timer frequency. It is reduplicate. This patch will remove
> > GENERIC_TIMER_CLK macro.
> >
> > Signed-off-by: Alison Wang <alison.wang@nxp.com>
> > ---
> > arch/arm/cpu/armv7/ls102xa/psci.S | 2 +-
> > arch/arm/cpu/armv7/ls102xa/timer.c | 2 +-
> > include/configs/ls1021aqds.h | 5 -----
> > include/configs/ls1021atwr.h | 5 -----
> > 4 files changed, 2 insertions(+), 12 deletions(-)
> >
> > diff --git a/arch/arm/cpu/armv7/ls102xa/psci.S
> > b/arch/arm/cpu/armv7/ls102xa/psci.S
> > index 8f38680..9efb6d8 100644
> > --- a/arch/arm/cpu/armv7/ls102xa/psci.S
> > +++ b/arch/arm/cpu/armv7/ls102xa/psci.S
> > @@ -36,7 +36,7 @@
> >
> > .align 5
> >
> > -#define ONE_MS (GENERIC_TIMER_CLK / 1000)
> > +#define ONE_MS (CONFIG_TIMER_CLK_FREQ / 1000)
> > #define RESET_WAIT (30 * ONE_MS)
> >
>
> Alison,
>
> Can you use GENERIC_TIMER_CLK? Recent change in U-Boot doesn't favor
> using CONFIG_* macros.
[Alison Wang] If GENERIC_TIMER_CLK is used and CONFIG_TIMER_CLK_FREQ is removed,
I need to modify the generic codes which use CONFIG_TIMER_CLK_FREQ in
arch/arm/cpu/armv7/nonsec_virt.S. Some other platforms may be affected. So I
remove GENERIC_TIMER_CLK in v1.
What's your idea?
Best Regards,
Alison Wang
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-08 17:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23 8:03 [U-Boot] [PATCH] arm: ls102xa: Remove reduplicate definition for Generic Timer frequency Alison Wang
2016-10-05 16:06 ` york sun
2016-10-08 2:21 Alison Wang
2016-10-08 17:00 ` york sun
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.