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