diff mbox series

[v2,4/4] ast2600: Configure CNTFRQ at 1125MHz

Message ID 20191203041440.6275-5-andrew@aj.id.au (mailing list archive)
State New, archived
Headers show
Series Expose GT CNTFRQ as a CPU property to support AST2600 | expand

Commit Message

Andrew Jeffery Dec. 3, 2019, 4:14 a.m. UTC
This matches the configuration set by u-boot on the AST2600.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
---
 hw/arm/aspeed_ast2600.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Philippe Mathieu-Daudé Dec. 3, 2019, 6:20 a.m. UTC | #1
On 12/3/19 5:14 AM, Andrew Jeffery wrote:
> This matches the configuration set by u-boot on the AST2600.
> 
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
> ---
>   hw/arm/aspeed_ast2600.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
> index 931887ac681f..5aecc3b3caec 100644
> --- a/hw/arm/aspeed_ast2600.c
> +++ b/hw/arm/aspeed_ast2600.c
> @@ -259,6 +259,9 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
>           object_property_set_int(OBJECT(&s->cpu[i]), aspeed_calc_affinity(i),
>                                   "mp-affinity", &error_abort);
>   
> +        object_property_set_int(OBJECT(&s->cpu[i]), 1125000000, "cntfrq",
> +                                &error_abort);
> +
>           /*
>            * TODO: the secondary CPUs are started and a boot helper
>            * is needed when using -kernel
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
index 931887ac681f..5aecc3b3caec 100644
--- a/hw/arm/aspeed_ast2600.c
+++ b/hw/arm/aspeed_ast2600.c
@@ -259,6 +259,9 @@  static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
         object_property_set_int(OBJECT(&s->cpu[i]), aspeed_calc_affinity(i),
                                 "mp-affinity", &error_abort);
 
+        object_property_set_int(OBJECT(&s->cpu[i]), 1125000000, "cntfrq",
+                                &error_abort);
+
         /*
          * TODO: the secondary CPUs are started and a boot helper
          * is needed when using -kernel