From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuW8d-0004Yc-NJ for qemu-devel@nongnu.org; Mon, 06 Feb 2012 16:30:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RuW8Y-0001Sc-GZ for qemu-devel@nongnu.org; Mon, 06 Feb 2012 16:30:15 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:34525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuW8X-0001RH-JV for qemu-devel@nongnu.org; Mon, 06 Feb 2012 16:30:10 -0500 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 6 Feb 2012 22:29:09 +0100 Message-Id: <1328563752-3976-9-git-send-email-hpoussin@reactos.org> In-Reply-To: <1328563752-3976-1-git-send-email-hpoussin@reactos.org> References: <1328563752-3976-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v4 08/11] fdc: add a 'check media rate' property. Not used yet List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Set it to true for current Qemu versions, and false for previous ones Signed-off-by: Herv=C3=A9 Poussineau --- hw/fdc.c | 3 +++ hw/pc_piix.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 0 deletions(-) diff --git a/hw/fdc.c b/hw/fdc.c index 7c675f6..af007ae 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@ -420,6 +420,7 @@ struct FDCtrl { int sun4m; FDrive drives[MAX_FD]; int reset_sensei; + uint32_t check_media_rate; /* Timers state */ uint8_t timer0; uint8_t timer1; @@ -2003,6 +2004,8 @@ static Property isa_fdc_properties[] =3D { DEFINE_PROP_DRIVE("driveB", FDCtrlISABus, state.drives[1].bs), DEFINE_PROP_INT32("bootindexA", FDCtrlISABus, bootindexA, -1), DEFINE_PROP_INT32("bootindexB", FDCtrlISABus, bootindexB, -1), + DEFINE_PROP_BIT("check_media_rate", FDCtrlISABus, state.check_media_= rate, + 0, true), DEFINE_PROP_END_OF_LIST(), }; =20 diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 400c6b6..baaecd9 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -386,6 +386,14 @@ static QEMUMachine pc_machine_v1_0 =3D { .init =3D pc_init_pci, .max_cpus =3D 255, .is_default =3D 1, + .compat_props =3D (GlobalProperty[]) { + { + .driver =3D "isa-fdc", + .property =3D "check_media_rate", + .value =3D "off", + }, + { /* end of list */ } + }, }; =20 static QEMUMachine pc_machine_v0_15 =3D { @@ -394,6 +402,14 @@ static QEMUMachine pc_machine_v0_15 =3D { .init =3D pc_init_pci, .max_cpus =3D 255, .is_default =3D 1, + .compat_props =3D (GlobalProperty[]) { + { + .driver =3D "isa-fdc", + .property =3D "check_media_rate", + .value =3D "off", + }, + { /* end of list */ } + }, }; =20 static QEMUMachine pc_machine_v0_14 =3D { @@ -426,6 +442,10 @@ static QEMUMachine pc_machine_v0_14 =3D { .driver =3D "virtio-balloon-pci", .property =3D "event_idx", .value =3D "off", + },{ + .driver =3D "isa-fdc", + .property =3D "check_media_rate", + .value =3D "off", }, { /* end of list */ } }, @@ -473,6 +493,10 @@ static QEMUMachine pc_machine_v0_13 =3D { .driver =3D "AC97", .property =3D "use_broken_id", .value =3D stringify(1), + },{ + .driver =3D "isa-fdc", + .property =3D "check_media_rate", + .value =3D "off", }, { /* end of list */ } }, @@ -524,6 +548,10 @@ static QEMUMachine pc_machine_v0_12 =3D { .driver =3D "AC97", .property =3D "use_broken_id", .value =3D stringify(1), + },{ + .driver =3D "isa-fdc", + .property =3D "check_media_rate", + .value =3D "off", }, { /* end of list */ } } @@ -583,6 +611,10 @@ static QEMUMachine pc_machine_v0_11 =3D { .driver =3D "AC97", .property =3D "use_broken_id", .value =3D stringify(1), + },{ + .driver =3D "isa-fdc", + .property =3D "check_media_rate", + .value =3D "off", }, { /* end of list */ } } @@ -654,6 +686,10 @@ static QEMUMachine pc_machine_v0_10 =3D { .driver =3D "AC97", .property =3D "use_broken_id", .value =3D stringify(1), + },{ + .driver =3D "isa-fdc", + .property =3D "check_media_rate", + .value =3D "off", }, { /* end of list */ } }, --=20 1.7.8.3