From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: xiaoqiang zhao <zxq_yx_007@163.com>
Cc: peter.maydell@linaro.org, e.voevodin@samsung.com,
mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org,
michael@walle.cc, qemu-arm@nongnu.org, gxt@mprc.pku.edu.cn,
afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v3 03/16] hw/timer: QOM'ify etraxfs_timer
Date: Tue, 16 Feb 2016 12:24:17 +0100 [thread overview]
Message-ID: <20160216112417.GY31433@toto> (raw)
In-Reply-To: <1455620981-13868-4-git-send-email-zxq_yx_007@163.com>
On Tue, Feb 16, 2016 at 07:09:35PM +0800, xiaoqiang zhao wrote:
> assign etraxfs_timer_init to etraxfs_timer_info.instance_init
> and drop the SysBusDeviceClass::init
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
> ---
> hw/timer/etraxfs_timer.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/hw/timer/etraxfs_timer.c b/hw/timer/etraxfs_timer.c
> index 36d8f46..4f115c7 100644
> --- a/hw/timer/etraxfs_timer.c
> +++ b/hw/timer/etraxfs_timer.c
> @@ -315,9 +315,10 @@ static void etraxfs_timer_reset(void *opaque)
> qemu_irq_lower(t->irq);
> }
>
> -static int etraxfs_timer_init(SysBusDevice *dev)
> +static void etraxfs_timer_init(Object *obj)
> {
> - ETRAXTimerState *t = ETRAX_TIMER(dev);
> + ETRAXTimerState *t = ETRAX_TIMER(obj);
> + SysBusDevice *dev = SYS_BUS_DEVICE(obj);
>
> t->bh_t0 = qemu_bh_new(timer0_hit, t);
> t->bh_t1 = qemu_bh_new(timer1_hit, t);
> @@ -329,24 +330,23 @@ static int etraxfs_timer_init(SysBusDevice *dev)
> sysbus_init_irq(dev, &t->irq);
> sysbus_init_irq(dev, &t->nmi);
>
> - memory_region_init_io(&t->mmio, OBJECT(t), &timer_ops, t,
> + memory_region_init_io(&t->mmio, obj, &timer_ops, t,
> "etraxfs-timer", 0x5c);
> sysbus_init_mmio(dev, &t->mmio);
> - qemu_register_reset(etraxfs_timer_reset, t);
> - return 0;
> }
>
> static void etraxfs_timer_class_init(ObjectClass *klass, void *data)
> {
> - SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
> + DeviceClass *dc = DEVICE_CLASS(klass);
>
> - sdc->init = etraxfs_timer_init;
> + dc->reset = etraxfs_timer_reset;
> }
>
> static const TypeInfo etraxfs_timer_info = {
> .name = TYPE_ETRAX_FS_TIMER,
> .parent = TYPE_SYS_BUS_DEVICE,
> .instance_size = sizeof(ETRAXTimerState),
> + .instance_init = etraxfs_timer_init,
> .class_init = etraxfs_timer_class_init,
> };
>
> --
> 2.1.4
>
>
next prev parent reply other threads:[~2016-02-16 11:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 11:09 [Qemu-devel] [PATCH v3 00/16] QOM'ify hw/timer/* xiaoqiang zhao
2016-02-16 11:09 ` [Qemu-devel] [PATCH v3 01/16] hw/timer: QOM'ify arm_timer (pass 1) xiaoqiang zhao
2016-02-16 11:09 ` [Qemu-devel] [PATCH v3 02/16] hw/timer: QOM'ify arm_timer (pass 2) xiaoqiang zhao
2016-02-16 11:09 ` [Qemu-devel] [PATCH v3 03/16] hw/timer: QOM'ify etraxfs_timer xiaoqiang zhao
2016-02-16 11:24 ` Edgar E. Iglesias [this message]
2016-02-16 11:09 ` [Qemu-devel] [PATCH v3 04/16] hw/timer: QOM'ify exynos4210_mct xiaoqiang zhao
2016-02-16 11:09 ` [Qemu-devel] [PATCH v3 05/16] hw/timer: QOM'ify exynos4210_pwm xiaoqiang zhao
2016-02-16 11:09 ` [Qemu-devel] [PATCH v3 06/16] hw/timer: QOM'ify exynos4210_rtc xiaoqiang zhao
2016-02-16 11:09 ` [Qemu-devel] [PATCH v3 07/16] hw/timer: QOM'ify grlib_gptimer xiaoqiang zhao
2016-02-16 11:09 ` [Qemu-devel] [PATCH v3 08/16] hw/timer: QOM'ify lm32_timer xiaoqiang zhao
2016-02-16 11:09 ` [Qemu-devel] [PATCH v3 09/16] hw/timer: QOM'ify m48txx_sysbus (pass 1) xiaoqiang zhao
2016-02-18 14:16 ` [Qemu-devel] [PATCH v3 00/16] QOM'ify hw/timer/* 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=20160216112417.GY31433@toto \
--to=edgar.iglesias@gmail.com \
--cc=afaerber@suse.de \
--cc=e.voevodin@samsung.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 \
--cc=zxq_yx_007@163.com \
/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).