root / hw / isa.h @ 67f0875e
History | View | Annotate | Download (1.3 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 | f915a115 | Gerd Hoffmann | }; |
18 | f915a115 | Gerd Hoffmann | |
19 | 81a322d4 | Gerd Hoffmann | typedef int (*isa_qdev_initfn)(ISADevice *dev); |
20 | f915a115 | Gerd Hoffmann | struct ISADeviceInfo {
|
21 | f915a115 | Gerd Hoffmann | DeviceInfo qdev; |
22 | f915a115 | Gerd Hoffmann | isa_qdev_initfn init; |
23 | f915a115 | Gerd Hoffmann | }; |
24 | f915a115 | Gerd Hoffmann | |
25 | f915a115 | Gerd Hoffmann | ISABus *isa_bus_new(DeviceState *dev); |
26 | 2091ba23 | Gerd Hoffmann | void isa_bus_irqs(qemu_irq *irqs);
|
27 | 3a38d437 | Jes Sorensen | qemu_irq isa_reserve_irq(int isairq);
|
28 | 2e15e23b | Gerd Hoffmann | void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq); |
29 | f915a115 | Gerd Hoffmann | void isa_qdev_register(ISADeviceInfo *info);
|
30 | 924f6d72 | Gerd Hoffmann | ISADevice *isa_create(const char *name); |
31 | 2e15e23b | Gerd Hoffmann | ISADevice *isa_create_simple(const char *name); |
32 | 87ecb68b | pbrook | |
33 | 32993977 | Isaku Yamahata | extern target_phys_addr_t isa_mem_base;
|
34 | 87ecb68b | pbrook | |
35 | 87ecb68b | pbrook | void isa_mmio_init(target_phys_addr_t base, target_phys_addr_t size);
|
36 | 87ecb68b | pbrook | |
37 | 87ecb68b | pbrook | /* dma.c */
|
38 | 87ecb68b | pbrook | int DMA_get_channel_mode (int nchan); |
39 | 87ecb68b | pbrook | int DMA_read_memory (int nchan, void *buf, int pos, int size); |
40 | 87ecb68b | pbrook | int DMA_write_memory (int nchan, void *buf, int pos, int size); |
41 | 87ecb68b | pbrook | void DMA_hold_DREQ (int nchan); |
42 | 87ecb68b | pbrook | void DMA_release_DREQ (int nchan); |
43 | 87ecb68b | pbrook | void DMA_schedule(int nchan); |
44 | 87ecb68b | pbrook | void DMA_init (int high_page_enable); |
45 | 87ecb68b | pbrook | void DMA_register_channel (int nchan, |
46 | 87ecb68b | pbrook | DMA_transfer_handler transfer_handler, |
47 | 87ecb68b | pbrook | void *opaque);
|
48 | 79383c9c | blueswir1 | #endif |