]>
Commit | Line | Data |
---|---|---|
979672cf JS |
1 | /* |
2 | * ASPEED Real Time Clock | |
3 | * Joel Stanley <joel@jms.id.au> | |
4 | * | |
5 | * Copyright 2019 IBM Corp | |
6 | * SPDX-License-Identifier: GPL-2.0-or-later | |
7 | */ | |
8 | #ifndef ASPEED_RTC_H | |
9 | #define ASPEED_RTC_H | |
10 | ||
11 | #include <stdint.h> | |
12 | ||
13 | #include "hw/hw.h" | |
14 | #include "hw/irq.h" | |
15 | #include "hw/sysbus.h" | |
16 | ||
17 | typedef struct AspeedRtcState { | |
18 | SysBusDevice parent_obj; | |
19 | ||
20 | MemoryRegion iomem; | |
21 | qemu_irq irq; | |
22 | ||
23 | uint32_t reg[0x18]; | |
24 | int offset; | |
25 | ||
26 | } AspeedRtcState; | |
27 | ||
28 | #define TYPE_ASPEED_RTC "aspeed.rtc" | |
29 | #define ASPEED_RTC(obj) OBJECT_CHECK(AspeedRtcState, (obj), TYPE_ASPEED_RTC) | |
30 | ||
31 | #endif /* ASPEED_RTC_H */ |