From: hitmoon <zxq_yx_007@163.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Evgeny Voevodin" <e.voevodin@samsung.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Michael Walle" <michael@walle.cc>,
qemu-arm <qemu-arm@nongnu.org>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Guan Xuetao" <gxt@mprc.pku.edu.cn>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v3 16/16] hw/timer: QOM'ify tusb6010
Date: Fri, 19 Feb 2016 19:02:18 +0800 [thread overview]
Message-ID: <56C6F63A.9060907@163.com> (raw)
In-Reply-To: <CAFEAcA98eqLbA863L-t3y7wFFO8eiXgZZvaSge0e6cUTu8S0-A@mail.gmail.com>
在 2016年02月18日 21:48, Peter Maydell 写道:
> On 16 February 2016 at 11:10, xiaoqiang zhao <zxq_yx_007@163.com> wrote:
>> assign tusb6010_init to tusb6010_info.instance_init and drop
>> the SysBusDeviceClass::init
>>
>> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
> (Again, I didn't review this patch.)
>
>> ---
>> hw/timer/tusb6010.c | 13 ++++++-------
>> 1 file changed, 6 insertions(+), 7 deletions(-)
>>
>> diff --git a/hw/timer/tusb6010.c b/hw/timer/tusb6010.c
>> index 9f6af90..205127c 100644
>> --- a/hw/timer/tusb6010.c
>> +++ b/hw/timer/tusb6010.c
>> @@ -776,29 +776,27 @@ static void tusb6010_reset(DeviceState *dev)
>> musb_reset(s->musb);
>> }
>>
>> -static int tusb6010_init(SysBusDevice *sbd)
>> +static void tusb6010_init(Object *obj)
>> {
>> - DeviceState *dev = DEVICE(sbd);
>> - TUSBState *s = TUSB(dev);
>> + DeviceState *dev = DEVICE(obj);
>> + TUSBState *s = TUSB(obj);
>> + SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
>>
>> s->otg_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, tusb_otg_tick, s);
>> s->pwr_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, tusb_power_tick, s);
>> - memory_region_init_io(&s->iomem[1], OBJECT(s), &tusb_async_ops, s,
>> + memory_region_init_io(&s->iomem[1], obj, &tusb_async_ops, s,
>> "tusb-async", UINT32_MAX);
>> sysbus_init_mmio(sbd, &s->iomem[0]);
>> sysbus_init_mmio(sbd, &s->iomem[1]);
>> sysbus_init_irq(sbd, &s->irq);
>> qdev_init_gpio_in(dev, tusb6010_irq, musb_irq_max + 1);
>> s->musb = musb_init(dev, 1);
>> - return 0;
>> }
>>
>> static void tusb6010_class_init(ObjectClass *klass, void *data)
>> {
>> DeviceClass *dc = DEVICE_CLASS(klass);
>> - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>>
>> - k->init = tusb6010_init;
>> dc->reset = tusb6010_reset;
>> }
>>
>> @@ -806,6 +804,7 @@ static const TypeInfo tusb6010_info = {
>> .name = TYPE_TUSB6010,
>> .parent = TYPE_SYS_BUS_DEVICE,
>> .instance_size = sizeof(TUSBState),
>> + .instance_init = tusb6010_init,
>> .class_init = tusb6010_class_init,
>> };
> This patch seems to break "make check":
>
> TEST: tests/device-introspect-test... (pid=6070)
> /arm/device/introspect/list: OK
> /arm/device/introspect/none: OK
> /arm/device/introspect/abstract: OK
> /arm/device/introspect/concrete: **
> ERROR:/home/petmay01/linaro/qemu-from-laptop/qemu/qom/object.c:1576:object_get_canonical_path_component:
> assertion failed: (obj->parent != NULL)
> Broken pipe
> FAIL
> GTester: last random seed: R02S57c9475befd55374bcf61f6f190cd8ad
> (pid=6093)
> FAIL: tests/device-introspect-test
>
> thanks
> -- PMM
Hi: peter
After some debug, I found
s->musb = musb_init(dev, 1);
must be called in SysBus' init. Otherwise it will break the
"/arm/device/introspect/concrete" check test.
next prev parent reply other threads:[~2016-02-19 11:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 11:10 [Qemu-devel] [PATCH v3 10/16] hw/timer: QOM'ify m48txx_sysbus (pass 2) xiaoqiang zhao
2016-02-16 11:10 ` [Qemu-devel] [PATCH v3 11/16] hw/timer: QOM'ify milkymist_sysctl xiaoqiang zhao
2016-02-16 11:10 ` [Qemu-devel] [PATCH v3 12/16] hw/timer: QOM'ify pl031 xiaoqiang zhao
2016-02-18 13:02 ` Peter Maydell
2016-02-18 14:26 ` zxq_yx_007
2016-02-18 14:31 ` Peter Maydell
2016-02-18 14:44 ` [Qemu-devel] 回复:Re: Re[2]: " zxq_yx_007
2016-02-16 11:10 ` [Qemu-devel] [PATCH v3 13/16] hw/timer: QOM'ify puv3_ost xiaoqiang zhao
2016-02-16 11:10 ` [Qemu-devel] [PATCH v3 14/16] hw/timer: QOM'ify pxa2xx_timer xiaoqiang zhao
2016-02-16 11:10 ` [Qemu-devel] [PATCH v3 15/16] hw/timer: QOM'ify slavio_timer xiaoqiang zhao
2016-02-16 11:10 ` [Qemu-devel] [PATCH v3 16/16] hw/timer: QOM'ify tusb6010 xiaoqiang zhao
2016-02-18 13:48 ` Peter Maydell
2016-02-18 14:27 ` zxq_yx_007
2016-02-19 11:02 ` hitmoon [this message]
2016-02-19 11:37 ` Peter Maydell
2016-02-19 11:49 ` xiaoqiang zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C6F63A.9060907@163.com \
--to=zxq_yx_007@163.com \
--cc=afaerber@suse.de \
--cc=e.voevodin@samsung.com \
--cc=edgar.iglesias@gmail.com \
--cc=gxt@mprc.pku.edu.cn \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=michael@walle.cc \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).