tcg: Fix spelling in comment (varables -> variables)
[qemu/ar7.git] / hw / isa.h
blob432d17ab2679dfbadfb1a77e70e00d162b539363
1 #ifndef HW_ISA_H
2 #define HW_ISA_H
4 /* ISA bus */
6 #include "ioport.h"
7 #include "memory.h"
8 #include "qdev.h"
10 typedef struct ISABus ISABus;
11 typedef struct ISADevice ISADevice;
12 typedef struct ISADeviceInfo ISADeviceInfo;
14 struct ISADevice {
15 DeviceState qdev;
16 MemoryRegion *io[32];
17 uint32_t isairq[2];
18 uint16_t ioports[32];
19 int nirqs;
20 int nioports;
21 int nio;
24 typedef int (*isa_qdev_initfn)(ISADevice *dev);
25 struct ISADeviceInfo {
26 DeviceInfo qdev;
27 isa_qdev_initfn init;
30 ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space_io);
31 void isa_bus_irqs(qemu_irq *irqs);
32 qemu_irq isa_get_irq(int isairq);
33 void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq);
34 void isa_register_ioport(ISADevice *dev, MemoryRegion *io, uint16_t start);
35 void isa_init_ioport(ISADevice *dev, uint16_t ioport);
36 void isa_init_ioport_range(ISADevice *dev, uint16_t start, uint16_t length);
37 void isa_qdev_register(ISADeviceInfo *info);
38 MemoryRegion *isa_address_space(ISADevice *dev);
39 ISADevice *isa_create(const char *name);
40 ISADevice *isa_try_create(const char *name);
41 ISADevice *isa_create_simple(const char *name);
43 extern target_phys_addr_t isa_mem_base;
45 void isa_mmio_setup(MemoryRegion *mr, target_phys_addr_t size);
46 void isa_mmio_init(target_phys_addr_t base, target_phys_addr_t size);
48 /* dma.c */
49 int DMA_get_channel_mode (int nchan);
50 int DMA_read_memory (int nchan, void *buf, int pos, int size);
51 int DMA_write_memory (int nchan, void *buf, int pos, int size);
52 void DMA_hold_DREQ (int nchan);
53 void DMA_release_DREQ (int nchan);
54 void DMA_schedule(int nchan);
55 void DMA_init(int high_page_enable, qemu_irq *cpu_request_exit);
56 void DMA_register_channel (int nchan,
57 DMA_transfer_handler transfer_handler,
58 void *opaque);
59 #endif