From: Gerd Hoffmann <kraxel@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/5] floppy: move dma setup + drive connect to fdctrl_init_common()
Date: Fri, 18 Sep 2009 16:58:17 +0200 [thread overview]
Message-ID: <4AB3A009.1070104@redhat.com> (raw)
In-Reply-To: <87fxak48cv.fsf@pike.pond.sub.org>
>> fdctrl_t *fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
>> @@ -1870,19 +1861,16 @@ fdctrl_t *fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
>> fdctrl_sysbus_t *sys;
>>
>> dev = qdev_create(NULL, "sysbus-fdc");
>> + sys = DO_UPCAST(fdctrl_sysbus_t, busdev.qdev, dev);
>> + fdctrl =&sys->state;
>> + fdctrl->dma_chann = dma_chann; /* FIXME */
>
> What needs to be fixed here? Could that be explained in the comment?
See below.
>> - fdctrl_connect_drives(fdctrl);
>> + *fdc_tc = qdev_get_gpio_in(dev, 0); /* FIXME */
>
> Same question.
fdctrl_init_$kind() should just be convinience wrappers. Creating the
devices via -device should work too. Which means the convinience
wrappers must do nothing but qdev_create + set properties + qdev_init.
> Hmm, as far as I can see, initialization of fdctrl->dma_chann moved to
> the qdev init() method for ISA and Sun4m, but not for sysbus.
> Intentional? If yes, what about explaining it in the code, or perhaps
> the commit message?
Yes, intentional. On the ISA bus the dma channel is fixed: #2. sun4m
doesn't use dma. The third variant has one user which uses dma channel
#0. So we could either hard-code that one too (like we do for isa). Or
we could make it a property so it can be configured as needed. Dunno
which of the two variants would be the correct one.
cheers,
Gerd
next prev parent reply other threads:[~2009-09-18 14:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-16 20:25 [Qemu-devel] [PATCH 0/5] isa: more qdev conversions Gerd Hoffmann
2009-09-16 20:25 ` [Qemu-devel] [PATCH 1/5] floppy: add drive properties Gerd Hoffmann
2009-09-18 14:34 ` Markus Armbruster
2009-09-16 20:25 ` [Qemu-devel] [PATCH 2/5] floppy: move dma setup + drive connect to fdctrl_init_common() Gerd Hoffmann
2009-09-18 14:48 ` Markus Armbruster
2009-09-18 14:58 ` Gerd Hoffmann [this message]
2009-09-16 20:25 ` [Qemu-devel] [PATCH 3/5] qdev: don't crash on unset drive properties Gerd Hoffmann
2009-09-16 20:25 ` [Qemu-devel] [PATCH 4/5] serial: convert isa to qdev Gerd Hoffmann
2009-09-18 15:04 ` Markus Armbruster
2009-09-18 15:18 ` Gerd Hoffmann
2009-09-16 20:25 ` [Qemu-devel] [PATCH 5/5] parallel: " Gerd Hoffmann
2009-09-18 15:10 ` Markus Armbruster
2009-09-18 15:11 ` [Qemu-devel] [PATCH 0/5] isa: more qdev conversions Markus Armbruster
-- strict thread matches above, loose matches on Subject: below --
2009-09-22 11:53 Gerd Hoffmann
2009-09-22 11:53 ` [Qemu-devel] [PATCH 2/5] floppy: move dma setup + drive connect to fdctrl_init_common() Gerd Hoffmann
2009-09-22 17:41 ` 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=4AB3A009.1070104@redhat.com \
--to=kraxel@redhat.com \
--cc=armbru@redhat.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 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.