[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-moxie: Add moxie Marin SoC support
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH] target-moxie: Add moxie Marin SoC support |
Date: |
Sun, 15 Dec 2013 20:31:50 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
Am 15.12.2013 13:48, schrieb Anthony Green:
> Peter Crosthwaite <address@hidden> writes:
>> On Sun, Dec 15, 2013 at 1:59 PM, Anthony Green <address@hidden> wrote:
>>> diff --git a/hw/moxie/marin.c b/hw/moxie/marin.c
>>> new file mode 100644
>>> index 0000000..0a998e4
>>> --- /dev/null
>>> +++ b/hw/moxie/marin.c
[...]
>>> +static inline DeviceState *marin_uart_create(hwaddr base,
>>> + qemu_irq irq)
>>> +{
>>> + DeviceState *dev;
>>> +
>>> + dev = qdev_create(NULL, "marin-uart");
>>> + qdev_init_nofail(dev);
>>> + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
>>> + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq);
>>> +
>>> + return dev;
>>> +}
>>
>> This is an old style qdev init function.
>
> Any good pointers for a new style init function?
What Peter C. probably meant here was it is a pre-qdev init function.
Unless there is a strong need for reuse, just inline it into the machine
init function to show that it is using pure QOM constructs.
As for new-style init functions, since you are not setting any
properties, chances are good that you can do in an instance_init
function (rather than realize function) what you did in a deprecated
SysBus init function IIRC.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg