dummy_m68k: convert to memory API
[qemu.git] / hw / fdc.h
blob09f73c6a9f945dd5450f9c0da9a2eeec070a176a
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 void fdctrl_init_isa(DriveInfo **fds)
12 ISADevice *dev;
14 dev = isa_try_create("isa-fdc");
15 if (!dev) {
16 return;
18 if (fds[0]) {
19 qdev_prop_set_drive_nofail(&dev->qdev, "driveA", fds[0]->bdrv);
21 if (fds[1]) {
22 qdev_prop_set_drive_nofail(&dev->qdev, "driveB", fds[1]->bdrv);
24 qdev_init_nofail(&dev->qdev);
27 void fdctrl_init_sysbus(qemu_irq irq, int dma_chann,
28 target_phys_addr_t mmio_base, DriveInfo **fds);
29 void sun4m_fdctrl_init(qemu_irq irq, target_phys_addr_t io_base,
30 DriveInfo **fds, qemu_irq *fdc_tc);
31 #endif