Gerd Hoffmann | ec82026 | 2009-08-20 15:22:19 +0200 | [diff] [blame] | 1 | #ifndef HW_IDE_H |
| 2 | #define HW_IDE_H |
| 3 | |
Markus Armbruster | 57c8886 | 2010-06-24 19:59:29 +0200 | [diff] [blame] | 4 | #include "isa.h" |
Michael S. Tsirkin | a2cb15b | 2012-12-12 14:24:50 +0200 | [diff] [blame^] | 5 | #include "pci/pci.h" |
Avi Kivity | 9d7f1b9 | 2011-11-09 16:10:07 +0200 | [diff] [blame] | 6 | #include "memory.h" |
Gerd Hoffmann | ec82026 | 2009-08-20 15:22:19 +0200 | [diff] [blame] | 7 | |
Markus Armbruster | 27d6bf4 | 2011-01-28 11:21:40 +0100 | [diff] [blame] | 8 | #define MAX_IDE_DEVS 2 |
| 9 | |
Gerd Hoffmann | ec82026 | 2009-08-20 15:22:19 +0200 | [diff] [blame] | 10 | /* ide-isa.c */ |
Hervé Poussineau | 48a18b3 | 2011-12-15 22:09:51 +0100 | [diff] [blame] | 11 | ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, |
Markus Armbruster | 57c8886 | 2010-06-24 19:59:29 +0200 | [diff] [blame] | 12 | DriveInfo *hd0, DriveInfo *hd1); |
Gerd Hoffmann | ec82026 | 2009-08-20 15:22:19 +0200 | [diff] [blame] | 13 | |
Gerd Hoffmann | 977e124 | 2009-08-20 15:22:20 +0200 | [diff] [blame] | 14 | /* ide-pci.c */ |
Gerd Hoffmann | f455e98 | 2009-08-28 15:47:03 +0200 | [diff] [blame] | 15 | void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table, |
Gerd Hoffmann | 977e124 | 2009-08-20 15:22:20 +0200 | [diff] [blame] | 16 | int secondary_ide_enabled); |
Stefano Stabellini | 679f4f8 | 2011-07-18 06:07:02 +0000 | [diff] [blame] | 17 | PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn); |
Markus Armbruster | 57c8886 | 2010-06-24 19:59:29 +0200 | [diff] [blame] | 18 | PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn); |
| 19 | PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn); |
Huacai Chen | 016512f | 2010-06-29 10:49:50 +0800 | [diff] [blame] | 20 | void vt82c686b_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn); |
Gerd Hoffmann | 977e124 | 2009-08-20 15:22:20 +0200 | [diff] [blame] | 21 | |
Gerd Hoffmann | b884220 | 2009-08-20 15:22:21 +0200 | [diff] [blame] | 22 | /* ide-macio.c */ |
Avi Kivity | 23c5e4c | 2011-08-08 16:09:17 +0300 | [diff] [blame] | 23 | MemoryRegion *pmac_ide_init (DriveInfo **hd_table, qemu_irq irq, |
Gerd Hoffmann | b884220 | 2009-08-20 15:22:21 +0200 | [diff] [blame] | 24 | void *dbdma, int channel, qemu_irq dma_irq); |
| 25 | |
Gerd Hoffmann | 3d2bf4a | 2009-08-20 15:22:22 +0200 | [diff] [blame] | 26 | /* ide-mmio.c */ |
Avi Kivity | a8170e5 | 2012-10-23 12:30:10 +0200 | [diff] [blame] | 27 | void mmio_ide_init (hwaddr membase, hwaddr membase2, |
Avi Kivity | 9d7f1b9 | 2011-11-09 16:10:07 +0200 | [diff] [blame] | 28 | MemoryRegion *address_space, |
Gerd Hoffmann | 3d2bf4a | 2009-08-20 15:22:22 +0200 | [diff] [blame] | 29 | qemu_irq irq, int shift, |
Gerd Hoffmann | f455e98 | 2009-08-28 15:47:03 +0200 | [diff] [blame] | 30 | DriveInfo *hd0, DriveInfo *hd1); |
Gerd Hoffmann | 3d2bf4a | 2009-08-20 15:22:22 +0200 | [diff] [blame] | 31 | |
Markus Armbruster | 9139046 | 2012-07-10 11:12:38 +0200 | [diff] [blame] | 32 | int ide_get_geometry(BusState *bus, int unit, |
| 33 | int16_t *cyls, int8_t *heads, int8_t *secs); |
| 34 | int ide_get_bios_chs_trans(BusState *bus, int unit); |
Markus Armbruster | c0897e0 | 2010-06-24 19:58:20 +0200 | [diff] [blame] | 35 | |
Isaku Yamahata | 7571790 | 2011-04-03 20:32:46 +0900 | [diff] [blame] | 36 | /* ide/core.c */ |
| 37 | void ide_drive_get(DriveInfo **hd, int max_bus); |
| 38 | |
Gerd Hoffmann | ec82026 | 2009-08-20 15:22:19 +0200 | [diff] [blame] | 39 | #endif /* HW_IDE_H */ |