]> git.proxmox.com Git - mirror_qemu.git/blame - include/hw/dma/i8257.h
Use DECLARE_*CHECKER* macros
[mirror_qemu.git] / include / hw / dma / i8257.h
CommitLineData
f5f19ee2
HP
1#ifndef HW_I8257_H
2#define HW_I8257_H
3
55f613ac
PMD
4#include "hw/isa/isa.h"
5#include "exec/ioport.h"
db1015e9 6#include "qom/object.h"
55f613ac 7
f5f19ee2 8#define TYPE_I8257 "i8257"
db1015e9 9typedef struct I8257State I8257State;
8110fa1d
EH
10DECLARE_INSTANCE_CHECKER(I8257State, I8257,
11 TYPE_I8257)
f5f19ee2
HP
12
13typedef struct I8257Regs {
14 int now[2];
15 uint16_t base[2];
16 uint8_t mode;
17 uint8_t page;
18 uint8_t pageh;
19 uint8_t dack;
20 uint8_t eop;
bd36a618 21 IsaDmaTransferHandler transfer_handler;
f5f19ee2
HP
22 void *opaque;
23} I8257Regs;
24
db1015e9 25struct I8257State {
f5f19ee2
HP
26 /* <private> */
27 ISADevice parent_obj;
28
29 /* <public> */
30 int32_t base;
31 int32_t page_base;
32 int32_t pageh_base;
33 int32_t dshift;
34
35 uint8_t status;
36 uint8_t command;
37 uint8_t mask;
38 uint8_t flip_flop;
39 I8257Regs regs[4];
40 MemoryRegion channel_io;
41 MemoryRegion cont_io;
42
43 QEMUBH *dma_bh;
44 bool dma_bh_scheduled;
45 int running;
e305a165
MAL
46 PortioList portio_page;
47 PortioList portio_pageh;
db1015e9 48};
f5f19ee2 49
55f613ac
PMD
50void i8257_dma_init(ISABus *bus, bool high_page_enable);
51
f5f19ee2 52#endif