mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-6.1-pull-request' into staging
Pull request trivial-branch 20210515 # gpg: Signature made Sat 15 May 2021 11:02:59 BST # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/trivial-branch-for-6.1-pull-request: target/avr: Ignore unimplemented WDR opcode hw/avr/atmega.c: use the avr51 cpu for atmega1280 target/sh4: Return error if CPUClass::get_phys_page_debug() fails multi-process: Avoid logical AND of mutually exclusive tests hw/pci-host: Do not build gpex-acpi.c if GPEX is not selected hw/mem/meson: Fix linking sparse-mem device with fuzzer cutils: fix memory leak in get_relocated_path() hw/rtc/mc146818rtc: Convert to 3-phase reset (Resettable interface) hw/timer/etraxfs_timer: Convert to 3-phase reset (Resettable interface) hw/gpio/aspeed: spelling fix (addtional) qapi: spelling fix (addtional) virtiofsd: Fix check of chown()'s return value virtio-net: Constify VirtIOFeature feature_sizes[] virtio-blk: Constify VirtIOFeature feature_sizes[] hw/virtio: Pass virtio_feature_get_config_size() a const argument backends/tpm: Replace qemu_mutex_lock calls with QEMU_LOCK_GUARD Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -309,9 +309,9 @@ static const MemoryRegionOps timer_ops = {
|
||||
}
|
||||
};
|
||||
|
||||
static void etraxfs_timer_reset(void *opaque)
|
||||
static void etraxfs_timer_reset_enter(Object *obj, ResetType type)
|
||||
{
|
||||
ETRAXTimerState *t = opaque;
|
||||
ETRAXTimerState *t = ETRAX_TIMER(obj);
|
||||
|
||||
ptimer_transaction_begin(t->ptimer_t0);
|
||||
ptimer_stop(t->ptimer_t0);
|
||||
@@ -325,6 +325,12 @@ static void etraxfs_timer_reset(void *opaque)
|
||||
t->rw_wd_ctrl = 0;
|
||||
t->r_intr = 0;
|
||||
t->rw_intr_mask = 0;
|
||||
}
|
||||
|
||||
static void etraxfs_timer_reset_hold(Object *obj)
|
||||
{
|
||||
ETRAXTimerState *t = ETRAX_TIMER(obj);
|
||||
|
||||
qemu_irq_lower(t->irq);
|
||||
}
|
||||
|
||||
@@ -343,14 +349,16 @@ static void etraxfs_timer_realize(DeviceState *dev, Error **errp)
|
||||
memory_region_init_io(&t->mmio, OBJECT(t), &timer_ops, t,
|
||||
"etraxfs-timer", 0x5c);
|
||||
sysbus_init_mmio(sbd, &t->mmio);
|
||||
qemu_register_reset(etraxfs_timer_reset, t);
|
||||
}
|
||||
|
||||
static void etraxfs_timer_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
ResettableClass *rc = RESETTABLE_CLASS(klass);
|
||||
|
||||
dc->realize = etraxfs_timer_realize;
|
||||
rc->phases.enter = etraxfs_timer_reset_enter;
|
||||
rc->phases.hold = etraxfs_timer_reset_hold;
|
||||
}
|
||||
|
||||
static const TypeInfo etraxfs_timer_info = {
|
||||
|
||||
Reference in New Issue
Block a user