uhci: tracing support
[qemu/opensuse.git] / hw / fdc.h
blob55a8d732c18b7bdce096f9fc6282b5ab86f2a6d9
1 #ifndef HW_FDC_H
2 #define HW_FDC_H
4 #include "isa.h"
5 #include "blockdev.h"
7 /* fdc.c */
8 #define MAX_FD 2
10 static inline ISADevice *fdctrl_init_isa(ISABus *bus, DriveInfo **fds)
12 ISADevice *dev;
14 dev = isa_try_create(bus, "isa-fdc");
15 if (!dev) {
16 return NULL;
19 if (fds[0]) {
20 qdev_prop_set_drive_nofail(&dev->qdev, "driveA", fds[0]->bdrv);
22 if (fds[1]) {
23 qdev_prop_set_drive_nofail(&dev->qdev, "driveB", fds[1]->bdrv);
25 qdev_init_nofail(&dev->qdev);
27 return dev;
30 void fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
31 target_phys_addr_t mmio_base, DriveInfo **fds);
32 void sun4m_fdctrl_init(qemu_irq irq, target_phys_addr_t io_base,
33 DriveInfo **fds, qemu_irq *fdc_tc);
34 void fdc_get_bs(BlockDriverState *bs[], ISADevice *dev);
36 #endif