175750e4dSPeter Maydell /* 275750e4dSPeter Maydell * ARM IoTKit system control element 375750e4dSPeter Maydell * 475750e4dSPeter Maydell * Copyright (c) 2018 Linaro Limited 575750e4dSPeter Maydell * Written by Peter Maydell 675750e4dSPeter Maydell * 775750e4dSPeter Maydell * This program is free software; you can redistribute it and/or modify 875750e4dSPeter Maydell * it under the terms of the GNU General Public License version 2 or 975750e4dSPeter Maydell * (at your option) any later version. 1075750e4dSPeter Maydell */ 1175750e4dSPeter Maydell 1275750e4dSPeter Maydell /* 1375750e4dSPeter Maydell * This is a model of the "system control element" which is part of the 1475750e4dSPeter Maydell * Arm IoTKit and documented in 1550b52b18SPeter Maydell * https://developer.arm.com/documentation/ecm0601256/latest 1675750e4dSPeter Maydell * Specifically, it implements the "system information block" and 1775750e4dSPeter Maydell * "system control register" blocks. 1875750e4dSPeter Maydell * 1975750e4dSPeter Maydell * QEMU interface: 20419a7f80SPeter Maydell * + QOM property "sse-version": indicates which SSE version this is part of 21419a7f80SPeter Maydell * (used to identify whether to provide SSE-200-only registers, etc) 2275750e4dSPeter Maydell * + sysbus MMIO region 0: the system information register bank 2375750e4dSPeter Maydell * + sysbus MMIO region 1: the system control register bank 2475750e4dSPeter Maydell */ 2575750e4dSPeter Maydell 2675750e4dSPeter Maydell #ifndef HW_MISC_IOTKIT_SYSCTL_H 2775750e4dSPeter Maydell #define HW_MISC_IOTKIT_SYSCTL_H 2875750e4dSPeter Maydell 2975750e4dSPeter Maydell #include "hw/sysbus.h" 30db1015e9SEduardo Habkost #include "qom/object.h" 3175750e4dSPeter Maydell 3275750e4dSPeter Maydell #define TYPE_IOTKIT_SYSCTL "iotkit-sysctl" 338063396bSEduardo Habkost OBJECT_DECLARE_SIMPLE_TYPE(IoTKitSysCtl, IOTKIT_SYSCTL) 3475750e4dSPeter Maydell 35db1015e9SEduardo Habkost struct IoTKitSysCtl { 3675750e4dSPeter Maydell /*< private >*/ 3775750e4dSPeter Maydell SysBusDevice parent_obj; 3875750e4dSPeter Maydell 3975750e4dSPeter Maydell /*< public >*/ 4075750e4dSPeter Maydell MemoryRegion iomem; 4175750e4dSPeter Maydell 4275750e4dSPeter Maydell uint32_t secure_debug; 4375750e4dSPeter Maydell uint32_t reset_syndrome; 4475750e4dSPeter Maydell uint32_t reset_mask; 4575750e4dSPeter Maydell uint32_t gretreg; 46394e10d2SPeter Maydell uint32_t initsvtor0; 4775750e4dSPeter Maydell uint32_t cpuwait; 4875750e4dSPeter Maydell uint32_t wicctrl; 4904836414SPeter Maydell uint32_t scsecctrl; 5004836414SPeter Maydell uint32_t fclk_div; 5104836414SPeter Maydell uint32_t sysclk_div; 5204836414SPeter Maydell uint32_t clock_force; 5304836414SPeter Maydell uint32_t initsvtor1; 5404836414SPeter Maydell uint32_t nmi_enable; 5504836414SPeter Maydell uint32_t ewctrl; 562672a6caSPeter Maydell uint32_t pwrctrl; 5704836414SPeter Maydell uint32_t pdcm_pd_sys_sense; 5804836414SPeter Maydell uint32_t pdcm_pd_sram0_sense; 5904836414SPeter Maydell uint32_t pdcm_pd_sram1_sense; 6004836414SPeter Maydell uint32_t pdcm_pd_sram2_sense; 6104836414SPeter Maydell uint32_t pdcm_pd_sram3_sense; 62*c5ffe6c8SPeter Maydell uint32_t pdcm_pd_cpu0_sense; 63*c5ffe6c8SPeter Maydell uint32_t pdcm_pd_vmr0_sense; 64*c5ffe6c8SPeter Maydell uint32_t pdcm_pd_vmr1_sense; 6504836414SPeter Maydell 6604836414SPeter Maydell /* Properties */ 67419a7f80SPeter Maydell uint32_t sse_version; 68aab7a378SPeter Maydell uint32_t cpuwait_rst; 69aab7a378SPeter Maydell uint32_t initsvtor0_rst; 70aab7a378SPeter Maydell uint32_t initsvtor1_rst; 71db1015e9SEduardo Habkost }; 7275750e4dSPeter Maydell 7375750e4dSPeter Maydell #endif 74