xref: /openbmc/qemu/include/hw/misc/iotkit-sysctl.h (revision 503bb0b9)
1 /*
2  * ARM IoTKit system control element
3  *
4  * Copyright (c) 2018 Linaro Limited
5  * Written by Peter Maydell
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 or
9  *  (at your option) any later version.
10  */
11 
12 /*
13  * This is a model of the "system control element" which is part of the
14  * Arm IoTKit and documented in
15  * http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ecm0601256/index.html
16  * Specifically, it implements the "system information block" and
17  * "system control register" blocks.
18  *
19  * QEMU interface:
20  *  + sysbus MMIO region 0: the system information register bank
21  *  + sysbus MMIO region 1: the system control register bank
22  */
23 
24 #ifndef HW_MISC_IOTKIT_SYSCTL_H
25 #define HW_MISC_IOTKIT_SYSCTL_H
26 
27 #include "hw/sysbus.h"
28 
29 #define TYPE_IOTKIT_SYSCTL "iotkit-sysctl"
30 #define IOTKIT_SYSCTL(obj) OBJECT_CHECK(IoTKitSysCtl, (obj), \
31                                         TYPE_IOTKIT_SYSCTL)
32 
33 typedef struct IoTKitSysCtl {
34     /*< private >*/
35     SysBusDevice parent_obj;
36 
37     /*< public >*/
38     MemoryRegion iomem;
39 
40     uint32_t secure_debug;
41     uint32_t reset_syndrome;
42     uint32_t reset_mask;
43     uint32_t gretreg;
44     uint32_t initsvrtor0;
45     uint32_t cpuwait;
46     uint32_t wicctrl;
47 } IoTKitSysCtl;
48 
49 #endif
50