aboutsummaryrefslogtreecommitdiff
path: root/include/hw/timer/aspeed_rtc.h
blob: 1f1155a676c112ee999a07e1f597c5cfdc2e4719 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * ASPEED Real Time Clock
 * Joel Stanley <joel@jms.id.au>
 *
 * Copyright 2019 IBM Corp
 * SPDX-License-Identifier: GPL-2.0-or-later
 */
#ifndef ASPEED_RTC_H
#define ASPEED_RTC_H

#include <stdint.h>

#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sysbus.h"

typedef struct AspeedRtcState {
    SysBusDevice parent_obj;

    MemoryRegion iomem;
    qemu_irq irq;

    uint32_t reg[0x18];
    int offset;

} AspeedRtcState;

#define TYPE_ASPEED_RTC "aspeed.rtc"
#define ASPEED_RTC(obj) OBJECT_CHECK(AspeedRtcState, (obj), TYPE_ASPEED_RTC)

#endif /* ASPEED_RTC_H */