diff mbox

[U-Boot] mx7_common: initialize generic timer on all CPU's

Message ID 20160726055747.32409-1-stefan@agner.ch
State Accepted
Commit 7626ba488ed4d465902d97da9b163e0e4e054b75
Delegated to: Stefano Babic
Headers show

Commit Message

Stefan Agner July 26, 2016, 5:57 a.m. UTC
From: Stefan Agner <stefan.agner@toradex.com>

Use CONFIG_TIMER_CLK_FREQ to let the non-secure init code initialize
the generic timer on all CPU's. This allows to make use of the timer
freuquency register also on other CPU than the start CPU which is
important for KVM.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
---

 include/configs/mx7_common.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Max Krummenacher July 26, 2016, 9:31 a.m. UTC | #1
Hi Stefan

> From: Stefan Agner [mailto:stefan@agner.ch]
> Sent: Dienstag, 26. Juli 2016 07:58
> 
> Use CONFIG_TIMER_CLK_FREQ to let the non-secure init code initialize the
> generic timer on all CPU's. This allows to make use of the timer freuquency
> register also on other CPU than the start CPU which is important for KVM.
[Krummenacher Max] 
Could you elaborate on the 'other CPUs'? The SMP companions Cortex A7 or the Cortex M4.
And what exactly is KVM here?

> 
> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
> ---
> 
>  include/configs/mx7_common.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/configs/mx7_common.h
> b/include/configs/mx7_common.h index 9f80f9f..7295fa6 100644
> --- a/include/configs/mx7_common.h
> +++ b/include/configs/mx7_common.h
> @@ -21,6 +21,7 @@
>  #define CONFIG_MXC_GPT_HCLK
>  #define CONFIG_SYSCOUNTER_TIMER
>  #define CONFIG_SC_TIMER_CLK 8000000 /* 8Mhz */
> +#define CONFIG_TIMER_CLK_FREQ CONFIG_SC_TIMER_CLK
>  #define CONFIG_SYS_FSL_CLK
> 
>  #define CONFIG_SYS_BOOTM_LEN	0x1000000
> --
> 2.9.0

Thanks & Regards, 
Max Krummenacher
Stefan Agner July 26, 2016, 5:35 p.m. UTC | #2
Hi Max,

On 2016-07-26 02:31, Max Krummenacher wrote:
> Hi Stefan
> 
>> From: Stefan Agner [mailto:stefan@agner.ch]
>> Sent: Dienstag, 26. Juli 2016 07:58
>>
>> Use CONFIG_TIMER_CLK_FREQ to let the non-secure init code initialize the
>> generic timer on all CPU's. This allows to make use of the timer freuquency
>> register also on other CPU than the start CPU which is important for KVM.
> [Krummenacher Max] 
> Could you elaborate on the 'other CPUs'? The SMP companions Cortex A7
> or the Cortex M4.

This is only for the primary A-Class CPU complex. The generic timer is
only available there.

> And what exactly is KVM here?

Kernel-based Virtual Machine, the Linux integrated hypervisor. The
Cortex-A7 support ARM's virtualization extensions which allow to make
use of KVM...

--
Stefan

> 
>>
>> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
>> ---
>>
>>  include/configs/mx7_common.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/include/configs/mx7_common.h
>> b/include/configs/mx7_common.h index 9f80f9f..7295fa6 100644
>> --- a/include/configs/mx7_common.h
>> +++ b/include/configs/mx7_common.h
>> @@ -21,6 +21,7 @@
>>  #define CONFIG_MXC_GPT_HCLK
>>  #define CONFIG_SYSCOUNTER_TIMER
>>  #define CONFIG_SC_TIMER_CLK 8000000 /* 8Mhz */
>> +#define CONFIG_TIMER_CLK_FREQ CONFIG_SC_TIMER_CLK
>>  #define CONFIG_SYS_FSL_CLK
>>
>>  #define CONFIG_SYS_BOOTM_LEN	0x1000000
>> --
>> 2.9.0
> 
> Thanks & Regards, 
> Max Krummenacher
Stefano Babic July 28, 2016, 10:49 a.m. UTC | #3
On 26/07/2016 19:35, Stefan Agner wrote:
> Hi Max,
> 
> On 2016-07-26 02:31, Max Krummenacher wrote:
>> Hi Stefan
>>
>>> From: Stefan Agner [mailto:stefan@agner.ch]
>>> Sent: Dienstag, 26. Juli 2016 07:58
>>>
>>> Use CONFIG_TIMER_CLK_FREQ to let the non-secure init code initialize the
>>> generic timer on all CPU's. This allows to make use of the timer freuquency
>>> register also on other CPU than the start CPU which is important for KVM.
>> [Krummenacher Max] 
>> Could you elaborate on the 'other CPUs'? The SMP companions Cortex A7
>> or the Cortex M4.
> 
> This is only for the primary A-Class CPU complex. The generic timer is
> only available there.
> 
>> And what exactly is KVM here?
> 
> Kernel-based Virtual Machine, the Linux integrated hypervisor. The
> Cortex-A7 support ARM's virtualization extensions which allow to make
> use of KVM...
> 


Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h
index 9f80f9f..7295fa6 100644
--- a/include/configs/mx7_common.h
+++ b/include/configs/mx7_common.h
@@ -21,6 +21,7 @@ 
 #define CONFIG_MXC_GPT_HCLK
 #define CONFIG_SYSCOUNTER_TIMER
 #define CONFIG_SC_TIMER_CLK 8000000 /* 8Mhz */
+#define CONFIG_TIMER_CLK_FREQ CONFIG_SC_TIMER_CLK
 #define CONFIG_SYS_FSL_CLK
 
 #define CONFIG_SYS_BOOTM_LEN	0x1000000