qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	"Othmar Pasteka" <pasteka@kabsi.at>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH qom-next for-next 4/5] ide: Drop ide_init2_with_non_qdev_drives()
Date: Sun,  4 Aug 2013 16:22:10 +0200	[thread overview]
Message-ID: <1375626131-6857-5-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1375626131-6857-1-git-send-email-afaerber@suse.de>

All its users have finally been converted.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 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 = &ide_dma_nop;
 }
 
-/* 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 = 0; i < 2; i++) {
-        dinfo = i == 0 ? hd0 : hd1;
-        ide_init1(bus, i);
-        if (dinfo) {
-            cyls  = dinfo->cyls;
-            heads = dinfo->heads;
-            secs  = dinfo->secs;
-            trans = dinfo->trans;
-            if (!cyls && !heads && !secs) {
-                hd_geometry_guess(dinfo->bdrv, &cyls, &heads, &secs, &trans);
-            } else if (trans == BIOS_ATA_TRANSLATION_AUTO) {
-                trans = 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 = irq;
-    bus->dma = &ide_dma_nop;
-}
-
 static const MemoryRegionPortio ide_portio_list[] = {
     { 0, 8, 1, .read = ide_ioport_read, .write = ide_ioport_write },
     { 0, 2, 2, .read = ide_data_readw, .write = 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 iobase2);
 
 void ide_exec_cmd(IDEBus *bus, uint32_t val);
-- 
1.8.1.4

  parent reply	other threads:[~2013-08-04 14:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-04 14:22 [Qemu-devel] [PATCH qom-next for-next 0/5] QOM PCMCIA, MicroDrive and IDE cleanups Andreas Färber
2013-08-04 14:22 ` [Qemu-devel] [PATCH qom-next for-next 1/5] pxa: Fix typo "dettach" Andreas Färber
2013-08-04 14:22 ` [Qemu-devel] [PATCH qom-next for-next 2/5] pcmcia: QOM'ify PCMCIACardState and MicroDriveState Andreas Färber
2013-08-04 14:22 ` [Qemu-devel] [PATCH qom-next for-next 3/5] microdrive: Coding Style cleanups Andreas Färber
2013-08-04 14:22 ` Andreas Färber [this message]
2013-08-04 14:22 ` [Qemu-devel] [PATCH qom-next for-next 5/5] pcmcia/pxa2xx: QOM'ify PXA2xxPCMCIAState Andreas Färber
2013-08-06  7:30 ` [Qemu-devel] [PATCH qom-next for-next 0/5] QOM PCMCIA, MicroDrive and IDE cleanups Markus Armbruster
2013-10-01  9:15 ` Markus Armbruster
2013-10-01 11:56   ` Andreas Färber
2013-10-01 12:10     ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375626131-6857-5-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pasteka@kabsi.at \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).