10d09e41aSPaolo Bonzini /* 20d09e41aSPaolo Bonzini * QEMU National Semiconductor PC87312 (Super I/O) 30d09e41aSPaolo Bonzini * 40d09e41aSPaolo Bonzini * Copyright (c) 2010-2012 Herve Poussineau 50d09e41aSPaolo Bonzini * Copyright (c) 2011-2012 Andreas Färber 60d09e41aSPaolo Bonzini * 70d09e41aSPaolo Bonzini * Permission is hereby granted, free of charge, to any person obtaining a copy 80d09e41aSPaolo Bonzini * of this software and associated documentation files (the "Software"), to deal 90d09e41aSPaolo Bonzini * in the Software without restriction, including without limitation the rights 100d09e41aSPaolo Bonzini * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 110d09e41aSPaolo Bonzini * copies of the Software, and to permit persons to whom the Software is 120d09e41aSPaolo Bonzini * furnished to do so, subject to the following conditions: 130d09e41aSPaolo Bonzini * 140d09e41aSPaolo Bonzini * The above copyright notice and this permission notice shall be included in 150d09e41aSPaolo Bonzini * all copies or substantial portions of the Software. 160d09e41aSPaolo Bonzini * 170d09e41aSPaolo Bonzini * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 180d09e41aSPaolo Bonzini * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 190d09e41aSPaolo Bonzini * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 200d09e41aSPaolo Bonzini * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 210d09e41aSPaolo Bonzini * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 220d09e41aSPaolo Bonzini * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 230d09e41aSPaolo Bonzini * THE SOFTWARE. 240d09e41aSPaolo Bonzini */ 250d09e41aSPaolo Bonzini #ifndef QEMU_PC87312_H 260d09e41aSPaolo Bonzini #define QEMU_PC87312_H 270d09e41aSPaolo Bonzini 2863f01a74SPhilippe Mathieu-Daudé #include "hw/isa/superio.h" 29db1015e9SEduardo Habkost #include "qom/object.h" 300d09e41aSPaolo Bonzini 310d09e41aSPaolo Bonzini 32b3270669SEduardo Habkost #define TYPE_PC87312 "pc87312" 33*8063396bSEduardo Habkost OBJECT_DECLARE_SIMPLE_TYPE(PC87312State, PC87312) 340d09e41aSPaolo Bonzini 35db1015e9SEduardo Habkost struct PC87312State { 3663f01a74SPhilippe Mathieu-Daudé /*< private >*/ 3763f01a74SPhilippe Mathieu-Daudé ISASuperIODevice parent_dev; 3863f01a74SPhilippe Mathieu-Daudé /*< public >*/ 390d09e41aSPaolo Bonzini 404e00105aSPhilippe Mathieu-Daudé uint16_t iobase; 410d09e41aSPaolo Bonzini uint8_t config; /* initial configuration */ 420d09e41aSPaolo Bonzini 430d09e41aSPaolo Bonzini struct { 440d09e41aSPaolo Bonzini ISADevice *dev; 450d09e41aSPaolo Bonzini } ide; 460d09e41aSPaolo Bonzini 470d09e41aSPaolo Bonzini MemoryRegion io; 480d09e41aSPaolo Bonzini 490d09e41aSPaolo Bonzini uint8_t read_id_step; 500d09e41aSPaolo Bonzini uint8_t selected_index; 510d09e41aSPaolo Bonzini 520d09e41aSPaolo Bonzini uint8_t regs[3]; 53db1015e9SEduardo Habkost }; 540d09e41aSPaolo Bonzini 550d09e41aSPaolo Bonzini 560d09e41aSPaolo Bonzini #endif 57