qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: hitmoon <zxq_yx_007@163.com>
To: Peter Crosthwaite <crosthwaitepeter@gmail.com>
Cc: Rob Herring <robh@kernel.org>, qemu-arm <qemu-arm@nongnu.org>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 2/9] hw/arm: QOM'ify highbank.c
Date: Tue, 8 Mar 2016 09:50:20 +0800	[thread overview]
Message-ID: <56DE2FDC.3020807@163.com> (raw)
In-Reply-To: <CAPokK=rjX4k9JXnJH8Fv1-0rEaV4JRADv5xGDh8TY8Mf6upoAA@mail.gmail.com>



在 2016年03月08日 01:40, Peter Crosthwaite 写道:
> On Sun, Mar 6, 2016 at 11:05 PM, xiaoqiang zhao <zxq_yx_007@163.com> wrote:
>> Drop the use of old SysBus init function and use instance_init
>>
>> Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
>
> (just this one as I have done some highbank work recently - I cant do
> the whole series).
>
> Regards,
> Peter
>
>> ---
>>   hw/arm/highbank.c | 12 +++++-------
>>   1 file changed, 5 insertions(+), 7 deletions(-)
>>
>> diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
>> index e25cf5e..8f38dff 100644
>> --- a/hw/arm/highbank.c
>> +++ b/hw/arm/highbank.c
>> @@ -167,23 +167,20 @@ static void highbank_regs_reset(DeviceState *dev)
>>       s->regs[0x43] = 0x05F40121;
>>   }
>>
>> -static int highbank_regs_init(SysBusDevice *dev)
>> +static void highbank_regs_init(Object *obj)
>>   {
>> -    HighbankRegsState *s = HIGHBANK_REGISTERS(dev);
>> +    HighbankRegsState *s = HIGHBANK_REGISTERS(obj);
>> +    SysBusDevice *dev = SYS_BUS_DEVICE(obj);
>>
>> -    memory_region_init_io(&s->iomem, OBJECT(s), &hb_mem_ops, s->regs,
>> +    memory_region_init_io(&s->iomem, obj, &hb_mem_ops, s->regs,
>>                             "highbank_regs", 0x1000);
>>       sysbus_init_mmio(dev, &s->iomem);
>> -
>> -    return 0;
>>   }
>>
>>   static void highbank_regs_class_init(ObjectClass *klass, void *data)
>>   {
>> -    SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass);
>>       DeviceClass *dc = DEVICE_CLASS(klass);
>>
>> -    sbc->init = highbank_regs_init;
>>       dc->desc = "Calxeda Highbank registers";
>>       dc->vmsd = &vmstate_highbank_regs;
>>       dc->reset = highbank_regs_reset;
>> @@ -193,6 +190,7 @@ static const TypeInfo highbank_regs_info = {
>>       .name          = TYPE_HIGHBANK_REGISTERS,
>>       .parent        = TYPE_SYS_BUS_DEVICE,
>>       .instance_size = sizeof(HighbankRegsState),
>> +    .instance_init = highbank_regs_init,
>>       .class_init    = highbank_regs_class_init,
>>   };
>>
>> --
>> 2.1.4
>>
>>
>>
Thanks for your reply, Peter !

  reply	other threads:[~2016-03-08  1:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07  7:05 [Qemu-devel] [PATCH 0/9] some QOM'ify work under hw/arm xiaoqiang zhao
2016-03-07  7:05 ` [Qemu-devel] [PATCH 1/9] hw/arm: QOM'ify armv7m.c xiaoqiang zhao
2016-03-16 11:51   ` Peter Maydell
2016-03-07  7:05 ` [Qemu-devel] [PATCH 2/9] hw/arm: QOM'ify highbank.c xiaoqiang zhao
2016-03-07 17:40   ` Peter Crosthwaite
2016-03-08  1:50     ` hitmoon [this message]
2016-03-07  7:05 ` [Qemu-devel] [PATCH 3/9] hw/arm: QOM'ify integratorcp.c xiaoqiang zhao
2016-03-16 11:47   ` Peter Maydell
2016-09-18 11:43   ` Peter Maydell
2016-03-07  7:05 ` [Qemu-devel] [PATCH 4/9] hw/arm: QOM'ify pxa2xx.c xiaoqiang zhao
2016-03-16 11:56   ` Peter Maydell
2016-03-07  7:05 ` [Qemu-devel] [PATCH 5/9] hw/arm: QOM'ify pxa2xx_pic.c xiaoqiang zhao
2016-03-16 11:35   ` Peter Maydell
2016-03-07  7:05 ` [Qemu-devel] [PATCH 7/9] hw/arm: QOM'ify stellaris.c xiaoqiang zhao
2016-03-16 11:54   ` Peter Maydell
2016-03-07  7:05 ` [Qemu-devel] [PATCH 8/9] hw/arm: QOM'ify strongarm.c xiaoqiang zhao
2016-03-16 11:50   ` Peter Maydell
2016-03-07  7:05 ` [Qemu-devel] [PATCH 9/9] hw/arm: QOM'ify versatilepb.c xiaoqiang zhao
2016-03-16 11:39   ` Peter Maydell
2016-03-16  2:34 ` [Qemu-devel] [PATCH 0/9] some QOM'ify work under hw/arm zxq_yx_007
2016-03-16 11:31 ` Peter Maydell
2016-03-16 12:00   ` Peter Maydell
2016-03-16 12:06     ` xiaoqiang zhao
2016-03-31  1:48     ` xiaoqiang zhao
2016-03-31  8:05       ` Peter Maydell
2016-03-31  8:15         ` xiaoqiang zhao
2016-05-12  1:46           ` 赵小强
2016-05-13 15:34             ` Peter Maydell

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=56DE2FDC.3020807@163.com \
    --to=zxq_yx_007@163.com \
    --cc=crosthwaitepeter@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=robh@kernel.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).