From: Gerd Hoffmann <kraxel@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] Move isa_connect_irq calls into isa_create_simple
Date: Thu, 27 Aug 2009 13:51:37 +0200 [thread overview]
Message-ID: <4A967349.1040808@redhat.com> (raw)
In-Reply-To: <f43fc5580908261019x68d31a8do135e658440003a54@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 411 bytes --]
On 08/26/09 19:19, Blue Swirl wrote:
> On Wed, Aug 26, 2009 at 4:35 PM, Gerd Hoffmann<kraxel@redhat.com> wrote:
>> Now with isa-bus maintaining the isa irqs we can move the
>> isa_connect_irq() calls into isa_create_simple().
>
>> + if (-1 != irq)
>> + if (-1 != irq2)
>
> Not again.
Oh well. Probably needs some time to teach my fingers to stop doing
that ...
Fixed patch attached.
cheers,
Gerd
[-- Attachment #2: 0001-Move-isa_connect_irq-calls-into-isa_create_simple.patch --]
[-- Type: text/plain, Size: 2888 bytes --]
>From cb189da691cd3bf62a846c1e94e74b28ee9f3f40 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Fri, 14 Aug 2009 10:50:49 +0200
Subject: [PATCH] Move isa_connect_irq calls into isa_create_simple
Now with isa-bus maintaining the isa irqs we can move the
isa_connect_irq() calls into isa_create_simple().
---
hw/fdc.c | 3 +--
hw/isa-bus.c | 7 ++++++-
hw/isa.h | 3 ++-
hw/pc.c | 4 +---
4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/hw/fdc.c b/hw/fdc.c
index 0ece6db..e5a650a 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -1878,9 +1878,8 @@ fdctrl_t *fdctrl_init_isa(int isairq, int dma_chann,
fdctrl_t *fdctrl;
ISADevice *dev;
- dev = isa_create_simple("isa-fdc", io_base, 0);
+ dev = isa_create_simple("isa-fdc", io_base, 0, isairq, -1);
fdctrl = &(DO_UPCAST(fdctrl_isabus_t, busdev, dev)->state);
- isa_connect_irq(dev, 0, isairq);
fdctrl->dma_chann = dma_chann;
DMA_register_channel(dma_chann, &fdctrl_transfer_handler, fdctrl);
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index 4ac4fad..1b12676 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -121,7 +121,8 @@ void isa_qdev_register(ISADeviceInfo *info)
qdev_register(&info->qdev);
}
-ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2)
+ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2,
+ uint32_t irq, uint32 irq2)
{
DeviceState *dev;
ISADevice *isa;
@@ -135,6 +136,10 @@ ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2
isa->iobase[0] = iobase;
isa->iobase[1] = iobase2;
qdev_init(dev);
+ if (irq != -1)
+ isa_connect_irq(isa, 0, irq);
+ if (irq2 != -1)
+ isa_connect_irq(isa, 1, irq2);
return isa;
}
diff --git a/hw/isa.h b/hw/isa.h
index 31853a0..872e3ef 100644
--- a/hw/isa.h
+++ b/hw/isa.h
@@ -30,7 +30,8 @@ void isa_connect_irq(ISADevice *dev, int devirq, int isairq);
qemu_irq isa_reserve_irq(int isairq);
void isa_init_irq(ISADevice *dev, qemu_irq *p);
void isa_qdev_register(ISADeviceInfo *info);
-ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2);
+ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2,
+ uint32_t irq, uint32_t irq2);
extern target_phys_addr_t isa_mem_base;
diff --git a/hw/pc.c b/hw/pc.c
index fc6a925..ab7ce20 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1375,9 +1375,7 @@ static void pc_init1(ram_addr_t ram_size,
}
}
- isa_dev = isa_create_simple("i8042", 0x60, 0x64);
- isa_connect_irq(isa_dev, 0, 1);
- isa_connect_irq(isa_dev, 1, 12);
+ isa_dev = isa_create_simple("i8042", 0x60, 0x64, 1, 12);
DMA_init(0);
#ifdef HAS_AUDIO
audio_init(pci_enabled ? pci_bus : NULL, isa_irq);
--
1.6.2.5
next prev parent reply other threads:[~2009-08-27 11:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-26 13:35 [Qemu-devel] [PATCH 0/3] isa bus irq patches Gerd Hoffmann
2009-08-26 13:35 ` [Qemu-devel] [PATCH 1/3] isa bus irq changes and fixes Gerd Hoffmann
2009-08-26 13:35 ` [Qemu-devel] [PATCH 2/3] Add isa_reserve_irq() Gerd Hoffmann
2009-08-26 13:35 ` [Qemu-devel] [PATCH 3/3] Move isa_connect_irq calls into isa_create_simple Gerd Hoffmann
2009-08-26 17:19 ` Blue Swirl
2009-08-27 11:51 ` Gerd Hoffmann [this message]
2009-08-28 0:47 ` [Qemu-devel] [PATCH 0/3] isa bus irq patches Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2009-08-14 9:36 [Qemu-devel] [PATCH 1/3] isa bus irq changes and fixes Gerd Hoffmann
2009-08-14 9:36 ` [Qemu-devel] [PATCH 3/3] Move isa_connect_irq calls into isa_create_simple Gerd Hoffmann
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=4A967349.1040808@redhat.com \
--to=kraxel@redhat.com \
--cc=blauwirbel@gmail.com \
--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).