1dc288de0SMichael Rolnik /* 2dc288de0SMichael Rolnik * AVR Power Reduction Management 3dc288de0SMichael Rolnik * 4dc288de0SMichael Rolnik * Copyright (c) 2019-2020 Michael Rolnik 5dc288de0SMichael Rolnik * 6dc288de0SMichael Rolnik * Permission is hereby granted, free of charge, to any person obtaining a copy 7dc288de0SMichael Rolnik * of this software and associated documentation files (the "Software"), to deal 8dc288de0SMichael Rolnik * in the Software without restriction, including without limitation the rights 9dc288de0SMichael Rolnik * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10dc288de0SMichael Rolnik * copies of the Software, and to permit persons to whom the Software is 11dc288de0SMichael Rolnik * furnished to do so, subject to the following conditions: 12dc288de0SMichael Rolnik * 13dc288de0SMichael Rolnik * The above copyright notice and this permission notice shall be included in 14dc288de0SMichael Rolnik * all copies or substantial portions of the Software. 15dc288de0SMichael Rolnik * 16dc288de0SMichael Rolnik * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17dc288de0SMichael Rolnik * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18dc288de0SMichael Rolnik * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19dc288de0SMichael Rolnik * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20dc288de0SMichael Rolnik * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21dc288de0SMichael Rolnik * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22dc288de0SMichael Rolnik * THE SOFTWARE. 23dc288de0SMichael Rolnik */ 24dc288de0SMichael Rolnik 25dc288de0SMichael Rolnik #ifndef HW_MISC_AVR_POWER_H 26dc288de0SMichael Rolnik #define HW_MISC_AVR_POWER_H 27dc288de0SMichael Rolnik 28dc288de0SMichael Rolnik #include "hw/sysbus.h" 29db1015e9SEduardo Habkost #include "qom/object.h" 30dc288de0SMichael Rolnik 31dc288de0SMichael Rolnik 32dc288de0SMichael Rolnik #define TYPE_AVR_MASK "avr-power" 33*8063396bSEduardo Habkost OBJECT_DECLARE_SIMPLE_TYPE(AVRMaskState, AVR_MASK) 34dc288de0SMichael Rolnik 35db1015e9SEduardo Habkost struct AVRMaskState { 36dc288de0SMichael Rolnik /* <private> */ 37dc288de0SMichael Rolnik SysBusDevice parent_obj; 38dc288de0SMichael Rolnik 39dc288de0SMichael Rolnik /* <public> */ 40dc288de0SMichael Rolnik MemoryRegion iomem; 41dc288de0SMichael Rolnik 42dc288de0SMichael Rolnik uint8_t val; 43dc288de0SMichael Rolnik qemu_irq irq[8]; 44db1015e9SEduardo Habkost }; 45dc288de0SMichael Rolnik 46dc288de0SMichael Rolnik #endif /* HW_MISC_AVR_POWER_H */ 47