xref: /openbmc/qemu/include/hw/char/parallel.h (revision dbdf841b)
1 #ifndef HW_PARALLEL_H
2 #define HW_PARALLEL_H
3 
4 #include "exec/ioport.h"
5 #include "exec/memory.h"
6 #include "hw/isa/isa.h"
7 #include "hw/irq.h"
8 #include "chardev/char-fe.h"
9 #include "chardev/char.h"
10 
11 typedef struct ParallelState {
12     MemoryRegion iomem;
13     uint8_t dataw;
14     uint8_t datar;
15     uint8_t status;
16     uint8_t control;
17     qemu_irq irq;
18     int irq_pending;
19     CharBackend chr;
20     int hw_driver;
21     int epp_timeout;
22     uint32_t last_read_offset; /* For debugging */
23     /* Memory-mapped interface */
24     int it_shift;
25     PortioList portio_list;
26 } ParallelState;
27 
28 void parallel_hds_isa_init(ISABus *bus, int n);
29 
30 bool parallel_mm_init(MemoryRegion *address_space,
31                       hwaddr base, int it_shift, qemu_irq irq,
32                       Chardev *chr);
33 
34 #endif
35