Statistics
| Branch: | Revision:

root / hw / isa.h @ 6b35e7bf

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 f915a115 Gerd Hoffmann
    uint32_t iobase[2];
16 f915a115 Gerd Hoffmann
    qemu_irq *irqs[2];
17 f915a115 Gerd Hoffmann
    int nirqs;
18 f915a115 Gerd Hoffmann
};
19 f915a115 Gerd Hoffmann
20 f915a115 Gerd Hoffmann
typedef void (*isa_qdev_initfn)(ISADevice *dev);
21 f915a115 Gerd Hoffmann
struct ISADeviceInfo {
22 f915a115 Gerd Hoffmann
    DeviceInfo qdev;
23 f915a115 Gerd Hoffmann
    isa_qdev_initfn init;
24 f915a115 Gerd Hoffmann
};
25 f915a115 Gerd Hoffmann
26 f915a115 Gerd Hoffmann
ISABus *isa_bus_new(DeviceState *dev);
27 f915a115 Gerd Hoffmann
void isa_connect_irq(ISADevice *dev, int n, qemu_irq irq);
28 f915a115 Gerd Hoffmann
void isa_init_irq(ISADevice *dev, qemu_irq *p);
29 f915a115 Gerd Hoffmann
void isa_qdev_register(ISADeviceInfo *info);
30 f915a115 Gerd Hoffmann
ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2);
31 87ecb68b pbrook
32 32993977 Isaku Yamahata
extern target_phys_addr_t isa_mem_base;
33 87ecb68b pbrook
34 87ecb68b pbrook
void isa_mmio_init(target_phys_addr_t base, target_phys_addr_t size);
35 87ecb68b pbrook
36 87ecb68b pbrook
/* dma.c */
37 87ecb68b pbrook
int DMA_get_channel_mode (int nchan);
38 87ecb68b pbrook
int DMA_read_memory (int nchan, void *buf, int pos, int size);
39 87ecb68b pbrook
int DMA_write_memory (int nchan, void *buf, int pos, int size);
40 87ecb68b pbrook
void DMA_hold_DREQ (int nchan);
41 87ecb68b pbrook
void DMA_release_DREQ (int nchan);
42 87ecb68b pbrook
void DMA_schedule(int nchan);
43 87ecb68b pbrook
void DMA_init (int high_page_enable);
44 87ecb68b pbrook
void DMA_register_channel (int nchan,
45 87ecb68b pbrook
                           DMA_transfer_handler transfer_handler,
46 87ecb68b pbrook
                           void *opaque);
47 79383c9c blueswir1
#endif