root / hw / isa.h @ fd37d881
History | View | Annotate | Download (1.4 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 | f915a115 | Gerd Hoffmann | uint32_t iobase[2];
|
16 | 2091ba23 | Gerd Hoffmann | uint32_t isairq[2];
|
17 | f915a115 | Gerd Hoffmann | qemu_irq *irqs[2];
|
18 | f915a115 | Gerd Hoffmann | int nirqs;
|
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 | 2091ba23 | Gerd Hoffmann | void isa_connect_irq(ISADevice *dev, int devirq, int isairq); |
30 | 3a38d437 | Jes Sorensen | qemu_irq isa_reserve_irq(int isairq);
|
31 | f915a115 | Gerd Hoffmann | void isa_init_irq(ISADevice *dev, qemu_irq *p);
|
32 | f915a115 | Gerd Hoffmann | void isa_qdev_register(ISADeviceInfo *info);
|
33 | e8935eef | Gerd Hoffmann | ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2, |
34 | e8935eef | Gerd Hoffmann | uint32_t irq, uint32_t irq2); |
35 | 87ecb68b | pbrook | |
36 | 32993977 | Isaku Yamahata | extern target_phys_addr_t isa_mem_base;
|
37 | 87ecb68b | pbrook | |
38 | 87ecb68b | pbrook | void isa_mmio_init(target_phys_addr_t base, target_phys_addr_t size);
|
39 | 87ecb68b | pbrook | |
40 | 87ecb68b | pbrook | /* dma.c */
|
41 | 87ecb68b | pbrook | int DMA_get_channel_mode (int nchan); |
42 | 87ecb68b | pbrook | int DMA_read_memory (int nchan, void *buf, int pos, int size); |
43 | 87ecb68b | pbrook | int DMA_write_memory (int nchan, void *buf, int pos, int size); |
44 | 87ecb68b | pbrook | void DMA_hold_DREQ (int nchan); |
45 | 87ecb68b | pbrook | void DMA_release_DREQ (int nchan); |
46 | 87ecb68b | pbrook | void DMA_schedule(int nchan); |
47 | 87ecb68b | pbrook | void DMA_init (int high_page_enable); |
48 | 87ecb68b | pbrook | void DMA_register_channel (int nchan, |
49 | 87ecb68b | pbrook | DMA_transfer_handler transfer_handler, |
50 | 87ecb68b | pbrook | void *opaque);
|
51 | 79383c9c | blueswir1 | #endif |