diff mbox

[v2,4/4] virt: Set reset-cbar on CPUs

Message ID 1394462692-8871-5-git-send-email-peter.maydell@linaro.org
State Accepted
Headers show

Commit Message

Peter Maydell March 10, 2014, 2:44 p.m. UTC
Set the reset-cbar property on CPUs used by the virt board,
if they have it. This isn't necessary for correct functioning
under Linux (since the A9 isn't a valid CPU for the virt board),
but it is the correct behaviour.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm/virt.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Peter Crosthwaite March 14, 2014, 11:02 p.m. UTC | #1
On Tue, Mar 11, 2014 at 12:44 AM, Peter Maydell
<peter.maydell@linaro.org> wrote:
> Set the reset-cbar property on CPUs used by the virt board,
> if they have it. This isn't necessary for correct functioning
> under Linux (since the A9 isn't a valid CPU for the virt board),
> but it is the correct behaviour.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

> ---
>  hw/arm/virt.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 517f2fe..2bbc931 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -390,6 +390,12 @@ static void machvirt_init(QEMUMachineInitArgs *args)
>          if (n > 0) {
>              object_property_set_bool(cpuobj, true, "start-powered-off", NULL);
>          }
> +
> +        if (object_property_find(cpuobj, "reset-cbar", NULL)) {
> +            object_property_set_int(cpuobj, vbi->memmap[VIRT_CPUPERIPHS].base,
> +                                    "reset-cbar", &error_abort);
> +        }
> +
>          object_property_set_bool(cpuobj, true, "realized", NULL);
>      }
>      fdt_add_cpu_nodes(vbi);
> --
> 1.9.0
>
>
diff mbox

Patch

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 517f2fe..2bbc931 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -390,6 +390,12 @@  static void machvirt_init(QEMUMachineInitArgs *args)
         if (n > 0) {
             object_property_set_bool(cpuobj, true, "start-powered-off", NULL);
         }
+
+        if (object_property_find(cpuobj, "reset-cbar", NULL)) {
+            object_property_set_int(cpuobj, vbi->memmap[VIRT_CPUPERIPHS].base,
+                                    "reset-cbar", &error_abort);
+        }
+
         object_property_set_bool(cpuobj, true, "realized", NULL);
     }
     fdt_add_cpu_nodes(vbi);