All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Cc: "Hervé Poussineau" <hpoussin@reactos.org>
Subject: [Qemu-devel] [PATCH 4/8] [MIPS] qdev: Use qdev floppy disk controller in Jazz emulation
Date: Wed,  8 Sep 2010 22:39:48 +0200	[thread overview]
Message-ID: <1283978392-6313-5-git-send-email-hpoussin@reactos.org> (raw)
In-Reply-To: <1283978392-6313-1-git-send-email-hpoussin@reactos.org>

Remove fdctrl_init_sysbus() function, which is not used anymore

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
 hw/fdc.c       |   24 ------------------------
 hw/fdc.h       |    2 --
 hw/mips_jazz.c |   10 +---------
 3 files changed, 1 insertions(+), 35 deletions(-)

diff --git a/hw/fdc.c b/hw/fdc.c
index c159dcb..57d7e06 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -1889,30 +1889,6 @@ FDCtrl *fdctrl_init_isa(DriveInfo **fds)
     return &(DO_UPCAST(FDCtrlISABus, busdev, dev)->state);
 }
 
-FDCtrl *fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
-                           target_phys_addr_t mmio_base, DriveInfo **fds)
-{
-    FDCtrl *fdctrl;
-    DeviceState *dev;
-    FDCtrlSysBus *sys;
-
-    dev = qdev_create(NULL, "sysbus-fdc");
-    sys = DO_UPCAST(FDCtrlSysBus, busdev.qdev, dev);
-    fdctrl = &sys->state;
-    fdctrl->dma_chann = dma_chann; /* FIXME */
-    if (fds[0]) {
-        qdev_prop_set_drive_nofail(dev, "driveA", fds[0]->bdrv);
-    }
-    if (fds[1]) {
-        qdev_prop_set_drive_nofail(dev, "driveB", fds[1]->bdrv);
-    }
-    qdev_init_nofail(dev);
-    sysbus_connect_irq(&sys->busdev, 0, irq);
-    sysbus_mmio_map(&sys->busdev, 0, mmio_base);
-
-    return fdctrl;
-}
-
 FDCtrl *sun4m_fdctrl_init(qemu_irq irq, target_phys_addr_t io_base,
                           DriveInfo **fds, qemu_irq *fdc_tc)
 {
diff --git a/hw/fdc.h b/hw/fdc.h
index 242730a..c99e08a 100644
--- a/hw/fdc.h
+++ b/hw/fdc.h
@@ -7,8 +7,6 @@
 typedef struct FDCtrl FDCtrl;
 
 FDCtrl *fdctrl_init_isa(DriveInfo **fds);
-FDCtrl *fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
-                           target_phys_addr_t mmio_base, DriveInfo **fds);
 FDCtrl *sun4m_fdctrl_init(qemu_irq irq, target_phys_addr_t io_base,
                           DriveInfo **fds, qemu_irq *fdc_tc);
 int fdctrl_get_drive_type(FDCtrl *fdctrl, int drive_num);
diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c
index 0af4044..5c66cd4 100644
--- a/hw/mips_jazz.c
+++ b/hw/mips_jazz.c
@@ -137,7 +137,6 @@ void mips_jazz_init (ram_addr_t ram_size,
     int s_rtc, s_dma_dummy;
     NICInfo *nd;
     PITState *pit;
-    DriveInfo *fds[MAX_FD];
     qemu_irq esp_reset;
     qemu_irq *cpu_exit_irq;
     ram_addr_t ram_offset;
@@ -249,14 +248,7 @@ void mips_jazz_init (ram_addr_t ram_size,
              rc4030[5], &esp_reset);
 
     /* Floppy */
-    if (drive_get_max_bus(IF_FLOPPY) >= MAX_FD) {
-        fprintf(stderr, "qemu: too many floppy drives\n");
-        exit(1);
-    }
-    for (n = 0; n < MAX_FD; n++) {
-        fds[n] = drive_get(IF_FLOPPY, 0, n);
-    }
-    fdctrl_init_sysbus(rc4030[1], 0, 0x80003000, fds);
+    sysbus_create_simple("sysbus-fdc", 0x80003000, rc4030[1]);
 
     /* Real time clock */
     rtc_init(1980, NULL);
-- 
1.7.1.GIT

  parent reply	other threads:[~2010-09-08 20:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 20:39 [Qemu-devel] [PATCH v2 0/8] Convert some MIPS Jazz devices to qdev Hervé Poussineau
2010-09-08 20:39 ` [Qemu-devel] [PATCH 1/8] [MIPS] qdev: convert i8042 to sysbus device Hervé Poussineau
2010-09-25  9:47   ` Markus Armbruster
2010-09-08 20:39 ` [Qemu-devel] [PATCH 2/8] [MIPS] qdev: convert ds1225y nvram " Hervé Poussineau
2010-09-09 14:21   ` Blue Swirl
2010-09-25  9:52   ` Markus Armbruster
2010-09-08 20:39 ` [Qemu-devel] [PATCH 3/8] [MIPS] qdev: convert jazz-led " Hervé Poussineau
2010-09-25  9:55   ` Markus Armbruster
2010-09-08 20:39 ` Hervé Poussineau [this message]
2010-09-08 20:39 ` [Qemu-devel] [PATCH 5/8] [MIPS] qdev: convert ISA VGA MM " Hervé Poussineau
2010-09-09 14:28   ` Blue Swirl
2010-09-08 20:39 ` [Qemu-devel] [PATCH 6/8] [MIPS] qdev: convert g364fb " Hervé Poussineau
2010-09-09 14:32   ` Blue Swirl
2010-09-08 20:39 ` [Qemu-devel] [PATCH 7/8] [MIPS] qdev: convert jazz irq controller " Hervé Poussineau
2010-09-08 20:39 ` [Qemu-devel] [PATCH 8/8] [MIPS] qdev: convert rc4030 " Hervé Poussineau
2010-09-09 14:37   ` Blue Swirl
2010-09-25  9:59     ` Markus Armbruster
2010-09-25 10:43       ` Blue Swirl

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=1283978392-6313-5-git-send-email-hpoussin@reactos.org \
    --to=hpoussin@reactos.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.