Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / include / hw / rtc / pl031.h
blob9fd4be1abba06dcfc5666fbb618c481f14d6ff70
1 /*
2 * ARM AMBA PrimeCell PL031 RTC
4 * Copyright (c) 2007 CodeSourcery
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * Contributions after 2012-01-13 are licensed under the terms of the
11 * GNU GPL, version 2 or (at your option) any later version.
14 #ifndef HW_RTC_PL031_H
15 #define HW_RTC_PL031_H
17 #include "hw/sysbus.h"
18 #include "qemu/timer.h"
19 #include "qom/object.h"
21 #define TYPE_PL031 "pl031"
22 OBJECT_DECLARE_SIMPLE_TYPE(PL031State, PL031)
24 struct PL031State {
25 SysBusDevice parent_obj;
27 MemoryRegion iomem;
28 QEMUTimer *timer;
29 qemu_irq irq;
32 * Needed to preserve the tick_count across migration, even if the
33 * absolute value of the rtc_clock is different on the source and
34 * destination.
36 uint32_t tick_offset_vmstate;
37 uint32_t tick_offset;
38 bool tick_offset_migrated;
39 bool migrate_tick_offset;
41 uint32_t mr;
42 uint32_t lr;
43 uint32_t cr;
44 uint32_t im;
45 uint32_t is;
48 #endif