hw/arm/xlnx-zynqmp: Remove obsolete 'has_rpu' property
[qemu/ar7.git] / include / hw / isa / superio.h
blobb9f5c19155f25c8be4bc14cc33c445024f7a9fe4
1 /*
2 * Generic ISA Super I/O
4 * Copyright (c) 2018 Philippe Mathieu-Daudé
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10 #ifndef HW_ISA_SUPERIO_H
11 #define HW_ISA_SUPERIO_H
13 #include "sysemu/sysemu.h"
14 #include "hw/isa/isa.h"
15 #include "qom/object.h"
17 #define TYPE_ISA_SUPERIO "isa-superio"
18 typedef struct ISASuperIOClass ISASuperIOClass;
19 typedef struct ISASuperIODevice ISASuperIODevice;
20 DECLARE_OBJ_CHECKERS(ISASuperIODevice, ISASuperIOClass,
21 ISA_SUPERIO, TYPE_ISA_SUPERIO)
23 #define SUPERIO_MAX_SERIAL_PORTS 4
25 struct ISASuperIODevice {
26 /*< private >*/
27 ISADevice parent_obj;
28 /*< public >*/
30 ISADevice *parallel[MAX_PARALLEL_PORTS];
31 ISADevice *serial[SUPERIO_MAX_SERIAL_PORTS];
32 ISADevice *floppy;
33 ISADevice *kbc;
34 ISADevice *ide;
37 typedef struct ISASuperIOFuncs {
38 size_t count;
39 bool (*is_enabled)(ISASuperIODevice *sio, uint8_t index);
40 uint16_t (*get_iobase)(ISASuperIODevice *sio, uint8_t index);
41 unsigned int (*get_irq)(ISASuperIODevice *sio, uint8_t index);
42 unsigned int (*get_dma)(ISASuperIODevice *sio, uint8_t index);
43 } ISASuperIOFuncs;
45 struct ISASuperIOClass {
46 /*< private >*/
47 ISADeviceClass parent_class;
48 /*< public >*/
49 DeviceRealize parent_realize;
51 ISASuperIOFuncs parallel;
52 ISASuperIOFuncs serial;
53 ISASuperIOFuncs floppy;
54 ISASuperIOFuncs ide;
57 #define TYPE_FDC37M81X_SUPERIO "fdc37m81x-superio"
58 #define TYPE_SMC37C669_SUPERIO "smc37c669-superio"
60 #endif /* HW_ISA_SUPERIO_H */