[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 10/28] serial: add "base" property
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 10/28] serial: add "base" property |
Date: |
Tue, 22 Oct 2019 17:50:13 +0100 |
On Tue, 22 Oct 2019 at 17:42, Marc-André Lureau
<address@hidden> wrote:
>
> Hi
>
> On Tue, Oct 22, 2019 at 6:32 PM Peter Maydell <address@hidden> wrote:
> >
> > On Tue, 22 Oct 2019 at 17:23, Marc-André Lureau
> > <address@hidden> wrote:
> > Devices shouldn't have properties to set their MMIO base
> > address -- instead the memory-mapped serial device should
> > be a child of TYPE_SYSBUS_DEVICE, and should provide
> > a sysbus mmio region, which users of the device can
> > map at the address they want to map the registers.
>
>
> Can we make serial a sysbus device? It seems to be embedded from
> various places, in various buses. Not sure that makes sense, please
> advise me :)
You want the SerialMMState to be is-a sysbus-device, and to
has-a SerialState, I think.
> "base" is mostly needed to set qdev_set_legacy_instance_id(), I should
> have added a commit comment. Otherwise, it can be passed to
> serial_mm_connect() directly.
serial_mm_connect() shouldn't exist at all, though -- we
want to end up with a normal sysbus device whose users
create it and wire up its MMIO and IRQ in the same way they
do any other sysbus device.
thanks
-- PMM
- [PATCH v2 03/28] serial: initial qom-ification, (continued)
- [PATCH v2 03/28] serial: initial qom-ification, Marc-André Lureau, 2019/10/22
- [PATCH v2 04/28] serial: register vmsd with DeviceClass, Marc-André Lureau, 2019/10/22
- [PATCH v2 05/28] serial: add and set "chardev" property, Marc-André Lureau, 2019/10/22
- [PATCH v2 06/28] serial: make SerialMMState actually a different type, Marc-André Lureau, 2019/10/22
- [PATCH v2 07/28] serial: add and set "regshift" property, Marc-André Lureau, 2019/10/22
- [PATCH v2 08/28] serial: convert irq to qdev gpio properties, Marc-André Lureau, 2019/10/22
- [PATCH v2 09/28] serial: add "baudbase" property, Marc-André Lureau, 2019/10/22
- [PATCH v2 10/28] serial: add "base" property, Marc-André Lureau, 2019/10/22
- [PATCH v2 11/28] serial: realize the serial device, Marc-André Lureau, 2019/10/22
- [PATCH v2 12/28] serial: replace serial_exit_core() with unrealize, Marc-André Lureau, 2019/10/22
- [PATCH v2 13/28] serial: factor out serial_mm_connect, Marc-André Lureau, 2019/10/22
- [PATCH v2 14/28] sm501: embed the serial device, Marc-André Lureau, 2019/10/22
- [PATCH v2 15/28] vmmouse: replace PROP_PTR with PROP_LINK, Marc-André Lureau, 2019/10/22
- [PATCH v2 17/28] etraxfs: remove PROP_PTR usage, Marc-André Lureau, 2019/10/22
- [PATCH v2 16/28] lance: replace PROP_PTR with PROP_LINK, Marc-André Lureau, 2019/10/22
- [PATCH v2 18/28] dp8393x: replace PROP_PTR with PROP_LINK, Marc-André Lureau, 2019/10/22
- [PATCH v2 19/28] leon3: use qemu_irq framework instead of callback as property, Marc-André Lureau, 2019/10/22