2019-07-01 19:26:15 +03:00
|
|
|
/*
|
|
|
|
* ASPEED Real Time Clock
|
|
|
|
* Joel Stanley <joel@jms.id.au>
|
|
|
|
*
|
|
|
|
* Copyright 2019 IBM Corp
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2019-10-04 02:04:01 +03:00
|
|
|
#ifndef HW_RTC_ASPEED_RTC_H
|
|
|
|
#define HW_RTC_ASPEED_RTC_H
|
2019-07-01 19:26:15 +03:00
|
|
|
|
|
|
|
#include "hw/sysbus.h"
|
2020-09-03 23:43:22 +03:00
|
|
|
#include "qom/object.h"
|
2019-07-01 19:26:15 +03:00
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
struct AspeedRtcState {
|
2019-07-01 19:26:15 +03:00
|
|
|
SysBusDevice parent_obj;
|
|
|
|
|
|
|
|
MemoryRegion iomem;
|
|
|
|
qemu_irq irq;
|
|
|
|
|
|
|
|
uint32_t reg[0x18];
|
|
|
|
int offset;
|
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
};
|
2019-07-01 19:26:15 +03:00
|
|
|
|
|
|
|
#define TYPE_ASPEED_RTC "aspeed.rtc"
|
2020-09-16 21:25:19 +03:00
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(AspeedRtcState, ASPEED_RTC)
|
2019-07-01 19:26:15 +03:00
|
|
|
|
2019-10-04 02:04:01 +03:00
|
|
|
#endif /* HW_RTC_ASPEED_RTC_H */
|