]>
Commit | Line | Data |
---|---|---|
845773ab IY |
1 | #ifndef HW_FDC_H |
2 | #define HW_FDC_H | |
3 | ||
63ffb564 | 4 | #include "isa.h" |
d288c7ba BS |
5 | #include "blockdev.h" |
6 | ||
87ecb68b PB |
7 | /* fdc.c */ |
8 | #define MAX_FD 2 | |
87ecb68b | 9 | |
63ffb564 BS |
10 | static inline void fdctrl_init_isa(DriveInfo **fds) |
11 | { | |
12 | ISADevice *dev; | |
87ecb68b | 13 | |
17801c78 BS |
14 | dev = isa_try_create("isa-fdc"); |
15 | if (!dev) { | |
16 | return; | |
17 | } | |
63ffb564 BS |
18 | if (fds[0]) { |
19 | qdev_prop_set_drive_nofail(&dev->qdev, "driveA", fds[0]->bdrv); | |
20 | } | |
21 | if (fds[1]) { | |
22 | qdev_prop_set_drive_nofail(&dev->qdev, "driveB", fds[1]->bdrv); | |
23 | } | |
24 | qdev_init_nofail(&dev->qdev); | |
25 | } | |
845773ab | 26 | |
63ffb564 BS |
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); | |
845773ab | 31 | #endif |