aboutsummaryrefslogtreecommitdiff
path: root/hw/timer/exynos4210_rtc.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-02-18 15:20:35 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-02-18 15:20:35 +0000
commitdd5e38b19d7cb07d317e1285941d8245c01da540 (patch)
tree14384280c7a13635eff94a14d9740f8efe0ab505 /hw/timer/exynos4210_rtc.c
parent339b665c883b209982fa161dc090ffaf242ab12b (diff)
parent5d83e348e7f6499f27b6431b0d91af8dcfb06763 (diff)
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160218-1' into staging
target-arm queue: * implement or fix various EL3 trap behaviour for system registers * clean up the trap/undef handling of the SRS instruction * add some missing AArch64 performance monitor system registers * implement reset for the PL061 GPIO device * QOMify sd.c and the pxa2xx_mmci device * SD card emulation fixes for booting Tianocore UEFI on RPi2 * QOMify various ARM timer devices # gpg: Signature made Thu 18 Feb 2016 15:19:31 GMT using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" # gpg: aka "Peter Maydell <pmaydell@gmail.com>" # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" * remotes/pmaydell/tags/pull-target-arm-20160218-1: (36 commits) hw/timer: QOM'ify pxa2xx_timer hw/timer: QOM'ify pl031 hw/timer: QOM'ify exynos4210_rtc hw/timer: QOM'ify exynos4210_pwm hw/timer: QOM'ify exynos4210_mct hw/timer: QOM'ify arm_timer (pass 2) hw/timer: QOM'ify arm_timer (pass 1) hw/sd: use guest error logging rather than fprintf to stderr hw/sd: model a power-up delay, as a workaround for an EDK2 bug hw/sd: implement CMD23 (SET_BLOCK_COUNT) for MMC compatibility hw/sd/pxa2xx_mmci: Add reset function hw/sd/pxa2xx_mmci: Convert to VMStateDescription hw/sd/pxa2xx_mmci: Update to use new SDBus APIs hw/sd/pxa2xx_mmci: convert to SysBusDevice object sdhci_sysbus: Create SD card device in users, not the device itself hw/sd/sdhci.c: Update to use SDBus APIs hw/sd: Add QOM bus which SD cards plug in to hw/sd/sd.c: Convert sd_reset() function into Device reset method hw/sd/sd.c: QOMify hw/sd/sdhci.c: Remove x-drive property ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/timer/exynos4210_rtc.c')
-rw-r--r--hw/timer/exynos4210_rtc.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/hw/timer/exynos4210_rtc.c b/hw/timer/exynos4210_rtc.c
index 33413039aa..f21fb54f5c 100644
--- a/hw/timer/exynos4210_rtc.c
+++ b/hw/timer/exynos4210_rtc.c
@@ -547,9 +547,10 @@ static const MemoryRegionOps exynos4210_rtc_ops = {
/*
* RTC timer initialization
*/
-static int exynos4210_rtc_init(SysBusDevice *dev)
+static void exynos4210_rtc_init(Object *obj)
{
- Exynos4210RTCState *s = EXYNOS4210_RTC(dev);
+ Exynos4210RTCState *s = EXYNOS4210_RTC(obj);
+ SysBusDevice *dev = SYS_BUS_DEVICE(obj);
QEMUBH *bh;
bh = qemu_bh_new(exynos4210_rtc_tick, s);
@@ -564,19 +565,15 @@ static int exynos4210_rtc_init(SysBusDevice *dev)
sysbus_init_irq(dev, &s->alm_irq);
sysbus_init_irq(dev, &s->tick_irq);
- memory_region_init_io(&s->iomem, OBJECT(s), &exynos4210_rtc_ops, s,
+ memory_region_init_io(&s->iomem, obj, &exynos4210_rtc_ops, s,
"exynos4210-rtc", EXYNOS4210_RTC_REG_MEM_SIZE);
sysbus_init_mmio(dev, &s->iomem);
-
- return 0;
}
static void exynos4210_rtc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
- k->init = exynos4210_rtc_init;
dc->reset = exynos4210_rtc_reset;
dc->vmsd = &vmstate_exynos4210_rtc_state;
}
@@ -585,6 +582,7 @@ static const TypeInfo exynos4210_rtc_info = {
.name = TYPE_EXYNOS4210_RTC,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(Exynos4210RTCState),
+ .instance_init = exynos4210_rtc_init,
.class_init = exynos4210_rtc_class_init,
};