diff mbox series

[v1,2/3] hw/arm: xlnx-zcu102: Move arm_boot_info into XlnxZCU102

Message ID 20200419162727.19148-3-edgar.iglesias@gmail.com (mailing list archive)
State New, archived
Headers show
Series hw/arm: xlnx-zcu102: Disable unsupported FDT firmware nodes | expand

Commit Message

Edgar E. Iglesias April 19, 2020, 4:27 p.m. UTC
From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Move arm_boot_info into XlnxZCU102.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 hw/arm/xlnx-zcu102.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Philippe Mathieu-Daudé April 20, 2020, 6:47 a.m. UTC | #1
On 4/19/20 6:27 PM, Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
> 
> Move arm_boot_info into XlnxZCU102.
> 
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> ---
>  hw/arm/xlnx-zcu102.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c
> index bd645ad818..4eb117c755 100644
> --- a/hw/arm/xlnx-zcu102.c
> +++ b/hw/arm/xlnx-zcu102.c
> @@ -31,13 +31,14 @@ typedef struct XlnxZCU102 {
>  
>      bool secure;
>      bool virt;
> +
> +    struct arm_boot_info binfo;
>  } XlnxZCU102;
>  
>  #define TYPE_ZCU102_MACHINE   MACHINE_TYPE_NAME("xlnx-zcu102")
>  #define ZCU102_MACHINE(obj) \
>      OBJECT_CHECK(XlnxZCU102, (obj), TYPE_ZCU102_MACHINE)
>  
> -static struct arm_boot_info xlnx_zcu102_binfo;
>  
>  static bool zcu102_get_secure(Object *obj, Error **errp)
>  {
> @@ -166,9 +167,9 @@ static void xlnx_zcu102_init(MachineState *machine)
>  
>      /* TODO create and connect IDE devices for ide_drive_get() */
>  
> -    xlnx_zcu102_binfo.ram_size = ram_size;
> -    xlnx_zcu102_binfo.loader_start = 0;
> -    arm_load_kernel(s->soc.boot_cpu_ptr, machine, &xlnx_zcu102_binfo);
> +    s->binfo.ram_size = ram_size;
> +    s->binfo.loader_start = 0;
> +    arm_load_kernel(s->soc.boot_cpu_ptr, machine, &s->binfo);
>  }
>  
>  static void xlnx_zcu102_machine_instance_init(Object *obj)
> 

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff mbox series

Patch

diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c
index bd645ad818..4eb117c755 100644
--- a/hw/arm/xlnx-zcu102.c
+++ b/hw/arm/xlnx-zcu102.c
@@ -31,13 +31,14 @@  typedef struct XlnxZCU102 {
 
     bool secure;
     bool virt;
+
+    struct arm_boot_info binfo;
 } XlnxZCU102;
 
 #define TYPE_ZCU102_MACHINE   MACHINE_TYPE_NAME("xlnx-zcu102")
 #define ZCU102_MACHINE(obj) \
     OBJECT_CHECK(XlnxZCU102, (obj), TYPE_ZCU102_MACHINE)
 
-static struct arm_boot_info xlnx_zcu102_binfo;
 
 static bool zcu102_get_secure(Object *obj, Error **errp)
 {
@@ -166,9 +167,9 @@  static void xlnx_zcu102_init(MachineState *machine)
 
     /* TODO create and connect IDE devices for ide_drive_get() */
 
-    xlnx_zcu102_binfo.ram_size = ram_size;
-    xlnx_zcu102_binfo.loader_start = 0;
-    arm_load_kernel(s->soc.boot_cpu_ptr, machine, &xlnx_zcu102_binfo);
+    s->binfo.ram_size = ram_size;
+    s->binfo.loader_start = 0;
+    arm_load_kernel(s->soc.boot_cpu_ptr, machine, &s->binfo);
 }
 
 static void xlnx_zcu102_machine_instance_init(Object *obj)