From 1702967f9991dedb7f4255fcc28acda8d9f6b0d2 Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Tue, 25 Aug 2015 13:25:41 +0900 Subject: [PATCH] upstream: PC board is updated Change-Id: I46932542a3f57c80db52e3a89adc1e52093de6a4 Signed-off-by: SeokYeon Hwang --- hw/i386/pc_piix.c | 18 +++++++++--------- tizen/src/hw/maru_board.c | 40 ++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index bd84766c35..61c4a2466f 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -304,6 +304,15 @@ static void pc_init1(MachineState *machine) } } +#ifdef CONFIG_MARU +void maru_pc_init(MachineState *machine); + +void maru_pc_init(MachineState *machine) +{ + pc_init1(machine); +} +#endif + static void pc_compat_2_3(MachineState *machine) { PCMachineState *pcms = PC_MACHINE(machine); @@ -340,15 +349,6 @@ static void pc_compat_2_2(MachineState *machine) machine->suppress_vmdesc = true; } -#ifdef CONFIG_MARU -void maru_pc_init(MachineState *machine); - -void maru_pc_init(MachineState *machine) -{ - pc_init1(machine); -} -#endif - static void pc_compat_2_1(MachineState *machine) { PCMachineState *pcms = PC_MACHINE(machine); diff --git a/tizen/src/hw/maru_board.c b/tizen/src/hw/maru_board.c index a45d1251ea..c00398baf8 100644 --- a/tizen/src/hw/maru_board.c +++ b/tizen/src/hw/maru_board.c @@ -4,7 +4,6 @@ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: - * YeongKyoon Lee * SeokYeon Hwang * SangJin Kim * KiTae Kim @@ -50,32 +49,29 @@ static void maru_device_init(void) // do nothing for now... } -extern void maru_pc_init_pci(MachineState *args); -static void maru_x86_board_init(MachineState *args) +extern void maru_pc_init(MachineState *args); +static void maru_x86_board_init(MachineState *machine) { - maru_pc_init_pci(args); + maru_pc_init(machine); maru_device_init(); } -static QEMUMachine maru_x86_machine = { - PC_DEFAULT_MACHINE_OPTIONS, - .name = "maru-x86-machine", - .alias = "maru-x86-machine", - .desc = "Maru Board (x86)", - .init = maru_x86_board_init, - .hot_add_cpu = pc_hot_add_cpu, - .no_parallel = 1, - .no_floppy = 1, - .no_cdrom = 1, - .no_sdcard = 1, - .default_machine_opts = "firmware=bios-256k.bin", - .default_boot_order = "c", -}; - -static void maru_machine_init(void) +static void maru_x86_machine_options(MachineClass *m) { - qemu_register_pc_machine(&maru_x86_machine); + pc_default_machine_options(m); + m->family = "pc_piix"; + m->desc = "Maru Board (x86)"; + m->hot_add_cpu = pc_hot_add_cpu; + m->default_machine_opts = "firmware=bios-256k.bin"; + m->default_display = "std"; + m->alias = "maru-x86-machine"; + m->no_parallel = 1; + m->no_floppy = 1; + m->no_cdrom = 1; + m->no_sdcard = 1; + m->default_boot_order = "c"; } -machine_init(maru_machine_init); +DEFINE_PC_MACHINE(maru, "maru-x86-machine", maru_x86_board_init, + maru_x86_machine_options); -- 2.34.1