From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5zCU-00063N-2O for qemu-devel@nongnu.org; Sun, 04 Aug 2013 10:22:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5zCN-0000iE-Sz for qemu-devel@nongnu.org; Sun, 04 Aug 2013 10:22:26 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48095 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5zCN-0000i4-KA for qemu-devel@nongnu.org; Sun, 04 Aug 2013 10:22:19 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 4 Aug 2013 16:22:10 +0200 Message-Id: <1375626131-6857-5-git-send-email-afaerber@suse.de> In-Reply-To: <1375626131-6857-1-git-send-email-afaerber@suse.de> References: <1375626131-6857-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-next for-next 4/5] ide: Drop ide_init2_with_non_qdev_drives() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Othmar Pasteka , Markus Armbruster , =?UTF-8?q?Andreas=20F=C3=A4rber?= All its users have finally been converted. Signed-off-by: Andreas F=C3=A4rber --- hw/ide/core.c | 49 ------------------------------------------------- hw/ide/internal.h | 2 -- 2 files changed, 51 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index a73af72..ac0ffcf 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2215,55 +2215,6 @@ void ide_init2(IDEBus *bus, qemu_irq irq) bus->dma =3D &ide_dma_nop; } =20 -/* TODO convert users to qdev and remove */ -void ide_init2_with_non_qdev_drives(IDEBus *bus, DriveInfo *hd0, - DriveInfo *hd1, qemu_irq irq) -{ - int i, trans; - DriveInfo *dinfo; - uint32_t cyls, heads, secs; - - for(i =3D 0; i < 2; i++) { - dinfo =3D i =3D=3D 0 ? hd0 : hd1; - ide_init1(bus, i); - if (dinfo) { - cyls =3D dinfo->cyls; - heads =3D dinfo->heads; - secs =3D dinfo->secs; - trans =3D dinfo->trans; - if (!cyls && !heads && !secs) { - hd_geometry_guess(dinfo->bdrv, &cyls, &heads, &secs, &tr= ans); - } else if (trans =3D=3D BIOS_ATA_TRANSLATION_AUTO) { - trans =3D hd_bios_chs_auto_trans(cyls, heads, secs); - } - if (cyls < 1 || cyls > 65535) { - error_report("cyls must be between 1 and 65535"); - exit(1); - } - if (heads < 1 || heads > 16) { - error_report("heads must be between 1 and 16"); - exit(1); - } - if (secs < 1 || secs > 255) { - error_report("secs must be between 1 and 255"); - exit(1); - } - if (ide_init_drive(&bus->ifs[i], dinfo->bdrv, - dinfo->media_cd ? IDE_CD : IDE_HD, - NULL, dinfo->serial, NULL, 0, - cyls, heads, secs, trans) < 0) { - error_report("Can't set up IDE drive %s", dinfo->id); - exit(1); - } - bdrv_attach_dev_nofail(dinfo->bdrv, &bus->ifs[i]); - } else { - ide_reset(&bus->ifs[i]); - } - } - bus->irq =3D irq; - bus->dma =3D &ide_dma_nop; -} - static const MemoryRegionPortio ide_portio_list[] =3D { { 0, 8, 1, .read =3D ide_ioport_read, .write =3D ide_ioport_write }, { 0, 2, 2, .read =3D ide_data_readw, .write =3D ide_data_writew }, diff --git a/hw/ide/internal.h b/hw/ide/internal.h index 048a052..d5d130f 100644 --- a/hw/ide/internal.h +++ b/hw/ide/internal.h @@ -553,8 +553,6 @@ int ide_init_drive(IDEState *s, BlockDriverState *bs,= IDEDriveKind kind, uint32_t cylinders, uint32_t heads, uint32_t secs, int chs_trans); void ide_init2(IDEBus *bus, qemu_irq irq); -void ide_init2_with_non_qdev_drives(IDEBus *bus, DriveInfo *hd0, - DriveInfo *hd1, qemu_irq irq); void ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase= 2); =20 void ide_exec_cmd(IDEBus *bus, uint32_t val); --=20 1.8.1.4