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