summaryrefslogtreecommitdiffstats
path: root/hw/arm/mcimx7d-sabre.c
diff options
context:
space:
mode:
authorTao Xu2019-08-09 08:57:21 +0200
committerEduardo Habkost2019-09-03 16:26:55 +0200
commit2744ece8095b8cdb0d667654debc1d80dd57bbd3 (patch)
tree9c179bad978ed83c26f6f16ecc9355666ff3e1d5 /hw/arm/mcimx7d-sabre.c
parentincludes: remove stale [smp|max]_cpus externs (diff)
downloadqemu-2744ece8095b8cdb0d667654debc1d80dd57bbd3.tar.gz
qemu-2744ece8095b8cdb0d667654debc1d80dd57bbd3.tar.xz
qemu-2744ece8095b8cdb0d667654debc1d80dd57bbd3.zip
hw/arm: simplify arm_load_dtb
In struct arm_boot_info, kernel_filename, initrd_filename and kernel_cmdline are copied from from MachineState. This patch add MachineState as a parameter into arm_load_dtb() and move the copy chunk of kernel_filename, initrd_filename and kernel_cmdline into arm_load_kernel(). Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Liu Jingqi <jingqi.liu@intel.com> Suggested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Tao Xu <tao3.xu@intel.com> Message-Id: <20190809065731.9097-2-tao3.xu@intel.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Acked-by: Andrew Jeffery <andrew@aj.id.au> Acked-by: Cédric Le Goater <clg@kaod.org> [ehabkost: include hw/boards.h again to fix build failures] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/arm/mcimx7d-sabre.c')
-rw-r--r--hw/arm/mcimx7d-sabre.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/arm/mcimx7d-sabre.c b/hw/arm/mcimx7d-sabre.c
index 97b8bb788a..2df2223611 100644
--- a/hw/arm/mcimx7d-sabre.c
+++ b/hw/arm/mcimx7d-sabre.c
@@ -43,9 +43,6 @@ static void mcimx7d_sabre_init(MachineState *machine)
.loader_start = FSL_IMX7_MMDC_ADDR,
.board_id = -1,
.ram_size = machine->ram_size,
- .kernel_filename = machine->kernel_filename,
- .kernel_cmdline = machine->kernel_cmdline,
- .initrd_filename = machine->initrd_filename,
.nb_cpus = machine->smp.cpus,
};
@@ -75,7 +72,7 @@ static void mcimx7d_sabre_init(MachineState *machine)
}
if (!qtest_enabled()) {
- arm_load_kernel(&s->soc.cpu[0], &boot_info);
+ arm_load_kernel(&s->soc.cpu[0], machine, &boot_info);
}
}