aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/omap_sx1.c
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel.a@redhat.com>2014-05-07 17:42:57 +0300
committerAndreas Färber <afaerber@suse.de>2014-05-28 17:35:01 +0200
commit3ef9622182e598392855931e7a0437d3855cef5e (patch)
tree87765046f480836eb65ecbcd293cade13518c62f /hw/arm/omap_sx1.c
parent0380aef323154205a7d838fb9953423621290d41 (diff)
downloadqemu-3ef9622182e598392855931e7a0437d3855cef5e.zip
qemu-3ef9622182e598392855931e7a0437d3855cef5e.tar.gz
qemu-3ef9622182e598392855931e7a0437d3855cef5e.tar.bz2
machine: Conversion of QEMUMachineInitArgs to MachineState
Total removal of QEMUMachineInitArgs struct. QEMUMachineInitArgs's fields are copied into MachineState. Removed duplicated fields from MachineState. All the other changes are only mechanical refactoring, no semantic changes. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> (s390) Reviewed-by: Michael S. Tsirkin <mst@redhat.com> (PC) [AF: Renamed ms -> machine, use MACHINE_GET_CLASS()] Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/arm/omap_sx1.c')
-rw-r--r--hw/arm/omap_sx1.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c
index 3ba263a..b4f6da6 100644
--- a/hw/arm/omap_sx1.c
+++ b/hw/arm/omap_sx1.c
@@ -98,7 +98,7 @@ static struct arm_boot_info sx1_binfo = {
.board_id = 0x265,
};
-static void sx1_init(QEMUMachineInitArgs *args, const int version)
+static void sx1_init(MachineState *machine, const int version)
{
struct omap_mpu_state_s *mpu;
MemoryRegion *address_space = get_system_memory();
@@ -118,7 +118,8 @@ static void sx1_init(QEMUMachineInitArgs *args, const int version)
flash_size = flash2_size;
}
- mpu = omap310_mpu_init(address_space, sx1_binfo.ram_size, args->cpu_model);
+ mpu = omap310_mpu_init(address_space, sx1_binfo.ram_size,
+ machine->cpu_model);
/* External Flash (EMIFS) */
memory_region_init_ram(flash, NULL, "omap_sx1.flash0-0", flash_size);
@@ -189,29 +190,29 @@ static void sx1_init(QEMUMachineInitArgs *args, const int version)
OMAP_CS1_BASE, &cs[1]);
}
- if (!args->kernel_filename && !fl_idx && !qtest_enabled()) {
+ if (!machine->kernel_filename && !fl_idx && !qtest_enabled()) {
fprintf(stderr, "Kernel or Flash image must be specified\n");
exit(1);
}
/* Load the kernel. */
- sx1_binfo.kernel_filename = args->kernel_filename;
- sx1_binfo.kernel_cmdline = args->kernel_cmdline;
- sx1_binfo.initrd_filename = args->initrd_filename;
+ sx1_binfo.kernel_filename = machine->kernel_filename;
+ sx1_binfo.kernel_cmdline = machine->kernel_cmdline;
+ sx1_binfo.initrd_filename = machine->initrd_filename;
arm_load_kernel(mpu->cpu, &sx1_binfo);
/* TODO: fix next line */
//~ qemu_console_resize(ds, 640, 480);
}
-static void sx1_init_v1(QEMUMachineInitArgs *args)
+static void sx1_init_v1(MachineState *machine)
{
- sx1_init(args, 1);
+ sx1_init(machine, 1);
}
-static void sx1_init_v2(QEMUMachineInitArgs *args)
+static void sx1_init_v2(MachineState *machine)
{
- sx1_init(args, 2);
+ sx1_init(machine, 2);
}
static QEMUMachine sx1_machine_v2 = {