[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [Qemu-commits] [COMMIT e813376] Sparc32: fix fdc io
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] Re: [Qemu-commits] [COMMIT e813376] Sparc32: fix fdc io_base |
Date: |
Sat, 18 Jul 2009 11:25:38 +0300 |
On Sat, Jul 18, 2009 at 2:37 AM, Paul Brook<address@hidden> wrote:
>> > The qdev support for this device is almost completely bogus.
>> >...
>> > The mem_mapped property is also fairly suspect. We almost certainly want
>> > two different devices. On SysBus device a MMIO region, and the other an
>> > ISA device (using IO ports) - Note that qdev ISA bus support does not
>> > exist yet.
>>
>> How about this cleanup?
>
> It's a start. However the init code is still backwards. For example:
>
>>@@ -1944,6 +1937,7 @@ fdctrl_t *sun4m_fdctrl_init
>> fdctrl = FROM_SYSBUS(fdctrl_t, s);
>>+ fdctrl->sun4m = 1;
>> fdctrl_init_common(fdctrl, -1, io_base, fds);
>
> This code should be in sun4m_fdc_init1.
OK. Better now?
> sun4m_fdctrl_init should really live in sun4m.c, not fdc.c. This should make
> it clear whether you're honoring the abstraction boundaries.
I know, but I tried to preserve the existing interface at this stage
of conversion. Later I'm going to move all such init functions to
sun4m.c. Then I should add a SBus bus type.
0001-Clean-up-fdc-qdev-conversion.patch
Description: Source code patch