xref: /qemu/include/hw/rtc/aspeed_rtc.h (revision c0a63857282afebaeed606a3dca803bb3bfb6aa3)
1979672cfSJoel Stanley /*
2979672cfSJoel Stanley  * ASPEED Real Time Clock
3979672cfSJoel Stanley  * Joel Stanley <joel@jms.id.au>
4979672cfSJoel Stanley  *
5979672cfSJoel Stanley  * Copyright 2019 IBM Corp
6979672cfSJoel Stanley  * SPDX-License-Identifier: GPL-2.0-or-later
7979672cfSJoel Stanley  */
8ea5dcf4eSPhilippe Mathieu-Daudé #ifndef HW_RTC_ASPEED_RTC_H
9ea5dcf4eSPhilippe Mathieu-Daudé #define HW_RTC_ASPEED_RTC_H
10979672cfSJoel Stanley 
11979672cfSJoel Stanley #include "hw/sysbus.h"
12db1015e9SEduardo Habkost #include "qom/object.h"
13979672cfSJoel Stanley 
14db1015e9SEduardo Habkost struct AspeedRtcState {
15979672cfSJoel Stanley     SysBusDevice parent_obj;
16979672cfSJoel Stanley 
17979672cfSJoel Stanley     MemoryRegion iomem;
18979672cfSJoel Stanley     qemu_irq irq;
19979672cfSJoel Stanley 
20979672cfSJoel Stanley     uint32_t reg[0x18];
21*c0a63857SPeter Maydell     int64_t offset;
22979672cfSJoel Stanley 
23db1015e9SEduardo Habkost };
24979672cfSJoel Stanley 
25979672cfSJoel Stanley #define TYPE_ASPEED_RTC "aspeed.rtc"
268063396bSEduardo Habkost OBJECT_DECLARE_SIMPLE_TYPE(AspeedRtcState, ASPEED_RTC)
27979672cfSJoel Stanley 
28ea5dcf4eSPhilippe Mathieu-Daudé #endif /* HW_RTC_ASPEED_RTC_H */
29