root / hw / isa.h @ b443ae67
History | View | Annotate | Download (1.5 kB)
1 | 79383c9c | blueswir1 | #ifndef HW_ISA_H
|
---|---|---|---|
2 | 79383c9c | blueswir1 | #define HW_ISA_H
|
3 | f915a115 | Gerd Hoffmann | |
4 | 87ecb68b | pbrook | /* ISA bus */
|
5 | 87ecb68b | pbrook | |
6 | 32993977 | Isaku Yamahata | #include "ioport.h" |
7 | f915a115 | Gerd Hoffmann | #include "qdev.h" |
8 | f915a115 | Gerd Hoffmann | |
9 | f915a115 | Gerd Hoffmann | typedef struct ISABus ISABus; |
10 | f915a115 | Gerd Hoffmann | typedef struct ISADevice ISADevice; |
11 | f915a115 | Gerd Hoffmann | typedef struct ISADeviceInfo ISADeviceInfo; |
12 | f915a115 | Gerd Hoffmann | |
13 | f915a115 | Gerd Hoffmann | struct ISADevice {
|
14 | f915a115 | Gerd Hoffmann | DeviceState qdev; |
15 | 2091ba23 | Gerd Hoffmann | uint32_t isairq[2];
|
16 | f915a115 | Gerd Hoffmann | int nirqs;
|
17 | dee41d58 | Gleb Natapov | uint16_t ioports[32];
|
18 | dee41d58 | Gleb Natapov | int nioports;
|
19 | f915a115 | Gerd Hoffmann | }; |
20 | f915a115 | Gerd Hoffmann | |
21 | 81a322d4 | Gerd Hoffmann | typedef int (*isa_qdev_initfn)(ISADevice *dev); |
22 | f915a115 | Gerd Hoffmann | struct ISADeviceInfo {
|
23 | f915a115 | Gerd Hoffmann | DeviceInfo qdev; |
24 | f915a115 | Gerd Hoffmann | isa_qdev_initfn init; |
25 | f915a115 | Gerd Hoffmann | }; |
26 | f915a115 | Gerd Hoffmann | |
27 | f915a115 | Gerd Hoffmann | ISABus *isa_bus_new(DeviceState *dev); |
28 | 2091ba23 | Gerd Hoffmann | void isa_bus_irqs(qemu_irq *irqs);
|
29 | ee951a37 | Jan Kiszka | qemu_irq isa_get_irq(int isairq);
|
30 | 2e15e23b | Gerd Hoffmann | void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq); |
31 | dee41d58 | Gleb Natapov | void isa_init_ioport(ISADevice *dev, uint16_t ioport);
|
32 | dee41d58 | Gleb Natapov | void isa_init_ioport_range(ISADevice *dev, uint16_t start, uint16_t length);
|
33 | f915a115 | Gerd Hoffmann | void isa_qdev_register(ISADeviceInfo *info);
|
34 | 924f6d72 | Gerd Hoffmann | ISADevice *isa_create(const char *name); |
35 | 86f4a9a5 | Blue Swirl | ISADevice *isa_try_create(const char *name); |
36 | 2e15e23b | Gerd Hoffmann | ISADevice *isa_create_simple(const char *name); |
37 | 87ecb68b | pbrook | |
38 | c227f099 | Anthony Liguori | extern target_phys_addr_t isa_mem_base;
|
39 | 87ecb68b | pbrook | |
40 | 968d683c | Alexander Graf | void isa_mmio_init(target_phys_addr_t base, target_phys_addr_t size);
|
41 | 87ecb68b | pbrook | |
42 | 87ecb68b | pbrook | /* dma.c */
|
43 | 87ecb68b | pbrook | int DMA_get_channel_mode (int nchan); |
44 | 87ecb68b | pbrook | int DMA_read_memory (int nchan, void *buf, int pos, int size); |
45 | 87ecb68b | pbrook | int DMA_write_memory (int nchan, void *buf, int pos, int size); |
46 | 87ecb68b | pbrook | void DMA_hold_DREQ (int nchan); |
47 | 87ecb68b | pbrook | void DMA_release_DREQ (int nchan); |
48 | 87ecb68b | pbrook | void DMA_schedule(int nchan); |
49 | 4556bd8b | Blue Swirl | void DMA_init(int high_page_enable, qemu_irq *cpu_request_exit); |
50 | 87ecb68b | pbrook | void DMA_register_channel (int nchan, |
51 | 87ecb68b | pbrook | DMA_transfer_handler transfer_handler, |
52 | 87ecb68b | pbrook | void *opaque);
|
53 | 79383c9c | blueswir1 | #endif |