From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Cc: "Hervé Poussineau" <hpoussin@reactos.org>
Subject: [Qemu-devel] [PATCH 07/11] fulong2e: give ISA bus to ISA methods
Date: Mon, 24 Oct 2011 22:18:21 +0200 [thread overview]
Message-ID: <1319487505-5915-8-git-send-email-hpoussin@reactos.org> (raw)
In-Reply-To: <1319487505-5915-1-git-send-email-hpoussin@reactos.org>
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
hw/mips_fulong2e.c | 6 ++----
hw/vt82c686.c | 4 ++--
hw/vt82c686.h | 2 +-
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c
index e6e120c..5e87665 100644
--- a/hw/mips_fulong2e.c
+++ b/hw/mips_fulong2e.c
@@ -264,7 +264,6 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
int64_t kernel_entry;
qemu_irq *i8259;
qemu_irq *cpu_exit_irq;
- int via_devfn;
PCIBus *pci_bus;
ISABus *isa_bus;
i2c_bus *smbus;
@@ -338,12 +337,11 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
/* South bridge */
ide_drive_get(hd, MAX_IDE_BUS);
- via_devfn = vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 0));
- if (via_devfn < 0) {
+ isa_bus = vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 0));
+ if (!isa_bus) {
fprintf(stderr, "vt82c686b_init error\n");
exit(1);
}
- isa_bus = NULL;
/* Interrupt controller */
/* The 8259 -> IP5 */
diff --git a/hw/vt82c686.c b/hw/vt82c686.c
index 2845959..038128b 100644
--- a/hw/vt82c686.c
+++ b/hw/vt82c686.c
@@ -507,13 +507,13 @@ static int vt82c686b_initfn(PCIDevice *d)
return 0;
}
-int vt82c686b_init(PCIBus *bus, int devfn)
+ISABus *vt82c686b_init(PCIBus *bus, int devfn)
{
PCIDevice *d;
d = pci_create_simple_multifunction(bus, devfn, true, "VT82C686B");
- return d->devfn;
+ return DO_UPCAST(ISABus, qbus, qdev_get_child_bus(&d->qdev, "isa.0"));
}
static PCIDeviceInfo via_info = {
diff --git a/hw/vt82c686.h b/hw/vt82c686.h
index e3270ca..6ef876d 100644
--- a/hw/vt82c686.h
+++ b/hw/vt82c686.h
@@ -2,7 +2,7 @@
#define HW_VT82C686_H
/* vt82c686.c */
-int vt82c686b_init(PCIBus * bus, int devfn);
+ISABus *vt82c686b_init(PCIBus * bus, int devfn);
void vt82c686b_ac97_init(PCIBus *bus, int devfn);
void vt82c686b_mc97_init(PCIBus *bus, int devfn);
i2c_bus *vt82c686b_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
--
1.7.6.3
next prev parent reply other threads:[~2011-10-24 20:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 20:18 [Qemu-devel] [PATCH 00/11] isa: preliminary work for multiple buses Hervé Poussineau
2011-10-24 20:18 ` [Qemu-devel] [PATCH 01/11] isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() functions Hervé Poussineau
2011-12-12 16:38 ` Anthony Liguori
2011-10-24 20:18 ` [Qemu-devel] [PATCH 02/11] isa: move ISABus structure definition to header file Hervé Poussineau
2011-12-12 16:39 ` Anthony Liguori
2011-10-24 20:18 ` [Qemu-devel] [PATCH 03/11] i8259: give ISA device to isa_register_ioport() Hervé Poussineau
2011-12-12 16:39 ` Anthony Liguori
2011-10-24 20:18 ` [Qemu-devel] [PATCH 04/11] pc: give ISA bus to ISA methods Hervé Poussineau
2011-12-12 16:40 ` Anthony Liguori
2011-10-24 20:18 ` [Qemu-devel] [PATCH 05/11] alpha: " Hervé Poussineau
2011-10-24 20:18 ` [Qemu-devel] [PATCH 06/11] sun4u: " Hervé Poussineau
2011-10-24 20:18 ` Hervé Poussineau [this message]
2011-10-24 20:18 ` [Qemu-devel] [PATCH 08/11] malta: " Hervé Poussineau
2011-10-24 20:18 ` [Qemu-devel] [PATCH 09/11] isa: always use provided ISA bus when creating an isa device Hervé Poussineau
2011-10-24 20:18 ` [Qemu-devel] [PATCH 10/11] isa: always use provided ISA bus in isa_bus_irqs() Hervé Poussineau
2011-10-24 20:18 ` [Qemu-devel] [PATCH 11/11] audio: remove unused parameter isa_pic Hervé Poussineau
2011-10-28 17:24 ` [Qemu-devel] [PATCH 00/11] isa: preliminary work for multiple buses Hervé Poussineau
2011-11-05 8:27 ` Hervé Poussineau
2011-12-12 16:41 ` Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2011-12-14 23:02 [Qemu-devel] [PATCH v2 " Hervé Poussineau
2011-12-14 23:02 ` [Qemu-devel] [PATCH 07/11] fulong2e: give ISA bus to ISA methods Hervé Poussineau
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=1319487505-5915-8-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 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).