monitor/hmp: move hmp_drive_mirror and hmp_drive_backup to block-hmp-cmds.c
[qemu/ar7.git] / include / hw / dma / i8257.h
blob03e2c166be72a677c5e97821ead8496da4000e25
1 #ifndef HW_I8257_H
2 #define HW_I8257_H
4 #include "hw/isa/isa.h"
5 #include "exec/ioport.h"
7 #define TYPE_I8257 "i8257"
9 typedef struct I8257Regs {
10 int now[2];
11 uint16_t base[2];
12 uint8_t mode;
13 uint8_t page;
14 uint8_t pageh;
15 uint8_t dack;
16 uint8_t eop;
17 IsaDmaTransferHandler transfer_handler;
18 void *opaque;
19 } I8257Regs;
21 typedef struct I8257State {
22 /* <private> */
23 ISADevice parent_obj;
25 /* <public> */
26 int32_t base;
27 int32_t page_base;
28 int32_t pageh_base;
29 int32_t dshift;
31 uint8_t status;
32 uint8_t command;
33 uint8_t mask;
34 uint8_t flip_flop;
35 I8257Regs regs[4];
36 MemoryRegion channel_io;
37 MemoryRegion cont_io;
39 QEMUBH *dma_bh;
40 bool dma_bh_scheduled;
41 int running;
42 PortioList portio_page;
43 PortioList portio_pageh;
44 } I8257State;
46 void i8257_dma_init(ISABus *bus, bool high_page_enable);
48 #endif