qemu-devel
[Top][All Lists]
Advanced

[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: Fri, 17 Jul 2009 20:37:12 +0300

On Fri, Jul 17, 2009 at 5:58 PM, Paul Brook<address@hidden> wrote:
>> >      .qdev.props = (Property[]) {
>> >          {
>> >              .name = "io_base",
>> > -            .info = &qdev_prop_uint32,
>> > +            .info = &qdev_prop_taddr,
>>
>> fdc probably shouldn't use target_phys_addr_t and instead should just
>> use a uint64_t for io_base.  target_phys is a CPU type, devices
>> shouldn't depend on it.
>
> The qdev support for this device is almost completely bogus.  The device code
> should not be dealing with the base address at all. It should be handled by a
> SysBus MMIO region. fdctrl_init should not be calling fdctrl_init_common.
> Instead everything should be done by the qdev init routine (fdctrl_init1).

Right, but we don't have sysbus_init_pio()/sysbus_pio_map() yet.

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

Yes, I think the code looks strange today, properties should not be
used at all. It looked much better a few days ago. ;-)




reply via email to

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