[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: Paul Brook
Subject: Re: [Qemu-devel] Re: [Qemu-commits] [COMMIT e813376] Sparc32: fix fdc io_base
Date: Sat, 18 Jul 2009 00:37:17 +0100
User-agent: KMail/1.11.4 (Linux/2.6.29-2-amd64; KDE/4.2.4; x86_64; ; )

> > 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.

sun4m_fdctrl_init should really live in sun4m.c, not fdc.c. This should make 
it clear whether you're honoring the abstraction boundaries.

>+    .qdev.props = (Property[]) {
>         {/* end of properties */}
>     }

It is not necessary to specify an empty property list.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]