1 /* 2 * ASPEED PWM Controller 3 * 4 * Copyright (C) 2017-2021 IBM Corp. 5 * 6 * This code is licensed under the GPL version 2 or later. See 7 * the COPYING file in the top-level directory. 8 */ 9 10 #ifndef ASPEED_PWM_H 11 #define ASPEED_PWM_H 12 13 #include "hw/sysbus.h" 14 15 #define TYPE_ASPEED_PWM "aspeed.pwm" 16 #define ASPEED_PWM(obj) OBJECT_CHECK(AspeedPWMState, (obj), TYPE_ASPEED_PWM) 17 18 #define ASPEED_PWM_NR_REGS (0x7C >> 2) 19 20 typedef struct AspeedPWMState { 21 /* <private> */ 22 SysBusDevice parent; 23 24 /*< public >*/ 25 MemoryRegion iomem; 26 qemu_irq irq; 27 28 uint32_t regs[ASPEED_PWM_NR_REGS]; 29 } AspeedPWMState; 30 31 #endif /* _ASPEED_PWM_H_ */ 32