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