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 */ 8*ea5dcf4eSPhilippe Mathieu-Daudé #ifndef HW_RTC_ASPEED_RTC_H 9*ea5dcf4eSPhilippe Mathieu-Daudé #define HW_RTC_ASPEED_RTC_H 10979672cfSJoel Stanley 11979672cfSJoel Stanley #include <stdint.h> 12979672cfSJoel Stanley 13979672cfSJoel Stanley #include "hw/irq.h" 14979672cfSJoel Stanley #include "hw/sysbus.h" 15979672cfSJoel Stanley 16979672cfSJoel Stanley typedef struct AspeedRtcState { 17979672cfSJoel Stanley SysBusDevice parent_obj; 18979672cfSJoel Stanley 19979672cfSJoel Stanley MemoryRegion iomem; 20979672cfSJoel Stanley qemu_irq irq; 21979672cfSJoel Stanley 22979672cfSJoel Stanley uint32_t reg[0x18]; 23979672cfSJoel Stanley int offset; 24979672cfSJoel Stanley 25979672cfSJoel Stanley } AspeedRtcState; 26979672cfSJoel Stanley 27979672cfSJoel Stanley #define TYPE_ASPEED_RTC "aspeed.rtc" 28979672cfSJoel Stanley #define ASPEED_RTC(obj) OBJECT_CHECK(AspeedRtcState, (obj), TYPE_ASPEED_RTC) 29979672cfSJoel Stanley 30*ea5dcf4eSPhilippe Mathieu-Daudé #endif /* HW_RTC_ASPEED_RTC_H */ 31